<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Tore,<br><br>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: <br><br>shp2pgsql -G -s 28992:4326 mystuff schema_name.table_name | psql -h myserver -d mydb -U myuser<br><br>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.<br><br>HTH,<br><br>Edward<br><br><div><div id="SkyDrivePlaceholder"></div>> From: halset@pvv.ntnu.no<br>> Date: Wed, 5 Dec 2012 09:27:28 +0100<br>> To: postgis-users@postgis.refractions.net<br>> Subject: [postgis-users] shp2pgsql -G -r<br>> <br>> Hello.<br>> <br>> 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?<br>> <br>> $ shp2pgsql<br>> RELEASE: 2.0.1 (r9979)<br>> USAGE: shp2pgsql [<options>] <shapefile> [[<schema>.]<table>]<br>> OPTIONS:<br>> …<br>>   -G  Use geography type (requires lon/lat data or -r to reproject).<br>> <br>> $ shp2pgsql -G -r mystuff.shp<br>> shp2pgsql: illegal option -- r<br>> <br>> Regards,<br>>  - Tore.<br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@lists.osgeo.org<br>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users<br></div>                                        </div></body>
</html>