[postgis-users] Change projection in select?

Obe, Regina robe.dnd at cityofboston.gov
Thu Dec 13 05:29:00 PST 2007


SELECT AsText(ST_Transform(geom, 3021)) FROM mytable 

If you are using a pre-1.2 install of PostGIS you may need to use
transform(geom,3021) instead of st_transform(geom,3021)



-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Runesson Magnus
Sent: Thursday, December 13, 2007 8:22 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Change projection in select?

I have a table where my geometries are saved in SRID 4326. To get my
result in text I do:
SELECT asText(geom) FROM myTable;

Sometimes I want to get my results from the select in 3021 instead. Can
I do that? How do I do that?

Regards,
/Magnus, SMHI

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.




More information about the postgis-users mailing list