[postgis-users] Selecting the srid for AddGeometryColumn

Burgholzer,Robert rwburgholzer at deq.virginia.gov
Mon Jul 21 09:12:42 PDT 2008


Ervin,

I tend to store in 4326, a lat/lon system, that seems to work OK as a
generic.  I am not real strong in the way of projection and data
distortion, and for my data, I have thus far found no real trouble.

 

As for your update queries, that seems like it would work fine.  The
other way that you could do it would be to transform it when you INSERT,
if you already have a geometry column in your source data set, like:

 

INSERT INTO table SELECT attributes, transform(the_geom,4269) from
other_table;

 

This is how you would have to do it if you had shapes that were more
complex than simple points.

 

Good luck!

r.b.

 

Robert W. Burgholzer

Surface Water Modeler

Office of Water Supply and Planning

Virginia Department of Environmental Quality

rwburgholzer at deq.virginia.gov

804-698-4405

Open Source Modeling Tools:

http://sourceforge.net/projects/npsource/

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of R H
Sent: Thursday, July 17, 2008 5:16 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Selecting the srid for AddGeometryColumn

 

I added a column AddGeometryColumn(db,'table','geo', 26912, 'POINT', 2);

update table set geo = setsrid(MakePoint(x, y), 26912)
Because the data I was working with was in the this projection 26912.
 
The problem now is I have data outside of this projection I need to add
to the column.  I am guessing I needed to add the column with a more
general srid, and then transform to the general srid?  My question is...
Is there a general projection for the western US or something similar?
I was thinking srid = 4269?  But I'm not sure if this is correct?  Or if
this is the right approach?  But below is what i would do instead?
 
AddGeometryColumn(db,'table','geo', 4269, 'POINT', 2);
 
update table set geo = transform(setsrid(MakePoint(x, y), 26912), 4269)
update table set geo = transform(setsrid(MakePoint(x, y), 32107), 4269)
 
any help much appreciated

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080721/1b62c7f1/attachment.html>


More information about the postgis-users mailing list