[postgis-users] changing srid
Mark Fenbers
Mark.Fenbers at noaa.gov
Wed Jun 29 08:43:08 PDT 2005
I have discovered this morning that data that I've loaded into the DB
using shp2pgsql was imported with the wrong SRID specified. Some of the
tables have been modified since importing them, so merely re-importing
them with the correct SRID is not going to be a simple solution.
Now I'm trying to change the SRID for these tables but I am running into
some headaches. Basically, the data now is incorrectly stored as
SRID=4326 and I want to change the SRID to 4269 without transforming any
of the actual geometries. I've gotten all tied in knots as to how to
formulate a proper query to do this.
Logically, I want to do this:
update mytable set SRID = 4269 where SRID(the_geom) = 4326;
What's really throwing me off is that the setSRID() function only takes
one argument (geometry) instead of the two that seems more logical to me
-- as in setSRID(the_geom, 4269). If this were the case, I could
probably run this:
select setSRID(the_geom,4269) from myTable where SRID(the_geom) = 4326;
Anyone know the RIGHT WAY to do what I need to do?
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mark.Fenbers.vcf
Type: text/x-vcard
Size: 283 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050629/e380ee5f/attachment.vcf>
More information about the postgis-users
mailing list