pgsql2shp -s 4326 -I <shapefile> <mytable> | psql -d <mydb>

where 
<shapefile> is the name of your shapefile, eg: myfile.shp
<mytable> is the name of the POstgis table to create & populate
<mydb> is the name of od the Postgis database (Postgres with Postgis installed)

"-s 4326" tells pgsql to create a table for a shapefile with lat/long 
geometries, as in
http://www.spatialreference.org/ref/epsg/4326/

HTH,

 Brent Wood

--- On Sat, 12/31/11, Daniel Montenegro <dmontenegr...@gmail.com> wrote:

From: Daniel Montenegro <dmontenegr...@gmail.com>
Subject: [postgis-users] Geographic Coordinates
To: "postgis-users" <postgis-users@postgis.refractions.net>
Date: Saturday, December 31, 2011, 4:57 PM

Hi there! How can I import a shape file with geographic coordinates to PostGIS 
via shp2pgsql? Thanks Daniel

-----Inline Attachment Follows-----

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to