[postgis-users] Spatial Reference Question

James DeMichele James.DeMichele at redfin.com
Tue Apr 7 10:52:34 PDT 2009


I would add, that if you need to in fact use "shp2pgsql" to import data,
then you could import the shapefile using the 32125 projection. Then,
you could do the following easy steps to get it to the projection you
want:

 

1)      Drop the "enforce SRID constraint" on the imported table.

2)      Do transform update: 

a.       Update <table> set the_geom = st_transform(the_geom, 4326);

3)      Add the "enforece SRID constraint" on the imported table, but
this time use the 4326 SRID.

 

That would be solution if you had to use shp2pgsql.

 

-James

 

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
David William Bitner
Sent: Monday, April 06, 2009 8:46 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Spatial Reference Question

 

ogr2ogr is what I would use to do this in one step.  shp2pgsql can only
define a projection, not do a reprojection.

David

On Mon, Apr 6, 2009 at 10:31 AM, Todd Fagin
<tfagin at coordinatesolutions.com> wrote:

Greetings,

 

I have a pretty general question about reprojecting a shapefile on
import into PostGIS.  For instance, if I have a shapefile in EPSG 32125,
but I want it imported into PostGIS as EPSG 4326. Is there a way to do
this using shp2pgsql (or other utility) prior to importing.  I am
guessing this can be done be done ogr2ogr (-t_srs), but was curious if
there were other methods.

 

Thanks,

 

Todd Fagin

 

Coordinate Solutions, Inc.

2804 NW 18th St.

Oklahoma City, OK 73107

405.740.4324 (voice)

904.471.5548 (fax)

www.coordinatesolutions.com

 

 

 


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




-- 
************************************
David William Bitner

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090407/7e2a1d8a/attachment.html>


More information about the postgis-users mailing list