Opened 4 years ago
Closed 4 years ago
#2293 closed task (fixed)
natural_earth2 database import: change geometry column name to geom instead of the_geom
Reported by: | astrid_emde | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OSGeoLive | Keywords: | |
Cc: |
Description
by default shp2pgsql will use geom instead of the_geom as geometry column name. We could change our script to adopt this new behaviour.
Has to be changed in
May also have effect on other installations and quickstarts
Change History (9)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
passing attempt at new data:
$pg_dump natural_earth2 | sed -e 's/the_geom/geom/g' > ne2_geom.sql $createdb natural_earth21 $psql natural_earth21 -c 'create extension postgis' $psql -f ne2_geom.sql natural_earth21 $pg_dump -Fc natural_earth21 > ne21.dump ## restore will generate non-fatal errors $pg_dump natural_earth21 -t ne_10m_admin_0_countries -t \ ne_10m_admin_1_states_provinces_shp -t ne_10m_geography_marine_polys -t \ ne_10m_geography_regions_elevation_points -t ne_10m_geography_regions_points -t \ ne_10m_geography_regions_polys -t ne_10m_lakes -t ne_10m_land -t ne_10m_ocean -t \ ne_10m_populated_places -t ne_10m_rivers_lake_centerlines -t ne_10m_urban_areas > ne21_tables.sql $bzip2 ne21_tables.sql
comment:3 by , 4 years ago
comment:4 by , 4 years ago
We only have to change the row: https://github.com/OSGeo/OSGeoLive/blob/master/bin/load_gisdata.sh#L201
-g the_geom -> new: -g geom
shp2pgsql -W LATIN1 -s 4326 -I -g geom "$n" | \ sudo -u $POSTGRES_USER psql --quiet natural_earth2
comment:6 by , 4 years ago
The PR was merged. We now have to check the quickstarts, wether they use the old column_name
comment:8 by , 4 years ago
Fix t-rex: Geometry column name in PR: https://github.com/OSGeo/OSGeoLive-doc/pull/658
comment:9 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
existing data files :