[postgis-users] shp2pgsql -G -r

Sandro Santilli strk at keybit.net
Wed Dec 5 02:36:37 PST 2012


Indeed, the help message string was bogus.
Now fixed in SVN (too bad it didn't make it into 2.0.2).

--strk;

On Wed, Dec 05, 2012 at 10:03:33AM +0100, Edward Mac Gillavry wrote:
> 
> Tore,
> 
> Actually, the option "-r" specifies to run the command in "Raw mode", i.e. Do not unescape attribute names and not skip the 'gid' attribute. You should use the option "-s" instead and provide the EPSG code that indicates the projection of your data. For example: 
> 
> shp2pgsql -G -s 28992:4326 mystuff schema_name.table_name | psql -h myserver -d mydb -U myuser
> 
> Here, the projection is the of the data in mystuff.shp is indicated to be in the Amersfoort New projection, indicated by the EPSG string 28992. The EPSG string 4326 indicates the data is projected to WGS84.
> 
> HTH,
> 
> Edward
> 
> > From: halset at pvv.ntnu.no
> > Date: Wed, 5 Dec 2012 09:27:28 +0100
> > To: postgis-users at postgis.refractions.net
> > Subject: [postgis-users] shp2pgsql -G -r
> > 
> > Hello.
> > 
> > I am trying out PostGIS 2.0.1, shp2pgsql and the geometry type. However, the reproject-thing does not seem to work as expected. What am I doing wrong?
> > 
> > $ shp2pgsql
> > RELEASE: 2.0.1 (r9979)
> > USAGE: shp2pgsql [<options>] <shapefile> [[<schema>.]<table>]
> > OPTIONS:
> > …
> >   -G  Use geography type (requires lon/lat data or -r to reproject).
> > 
> > $ shp2pgsql -G -r mystuff.shp
> > shp2pgsql: illegal option -- r
> > 
> > Regards,
> >  - Tore.
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>  		 	   		  

> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


-- 

 http://www.cartodb.com - Map, analyze and build applications with your data

                                       ~~ http://strk.keybit.net 



More information about the postgis-users mailing list