Skip to content

Using pgsql2shp and reproject by ogr2ogr

25. March 2013

Basically, this is no big deal…but the purpose of this blog is also to collect snippets…so here they are.

Getting the ‘Rhein’ from PostGIS:

(OSM-data from Geofabrik, imported by osm2pgsql)

pgsql2shp -f osm_rhein.shp -h localhost -p 5432 -P my_password -u gisadmin planet "select * from germany_line where name = 'Rhein'"

Change to LngLat Projection:

ogr2ogr -f 'ESRI Shapefile' osm_rhein.shp osm_rhein.shp -t_srs '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' -overwrite -skipfailures

More will surely follow…

Advertisements

From → tutorial

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: