[postgis-users] Converting from Transverse Mercator to Latitude and longitude
Darren Houston
dhouston at beyondcompliance.ca
Wed Feb 22 09:59:24 PST 2006
Hi Nalin,
x_0 becomes 520000 and y_0 becomes -4880000.
As long as your data has a correctly associated srid (-1 means unknown), you
can use the transform(geometry, srid) function to convert your data into
latitude and longitude. Look at srid = 4267(NAD27), 4269(NAD83) and 4326
(WGS84) in SPATIAL_REF_SYS table.
select getsrid(the_geom) from my_spatial_table limit 1;
will give you your srid.
select transform(the_geom,srid) from my_spatial_table;
(where srid = the srid of the projection you want to convert to)
will give you your lat/long.
If you are getting binary output, use a function such as astext to convert
your data to text.
select astext(transform(the_geom,srid)) from my_spatial_table;
Hope this helps,
Darren H.
On Monday 20 February 2006 10:52, Nalin Makar wrote:
> Hi, I have gathered data on boundaries of Wisconsin and it's counties. I
> have been trying to convert the data into latitude and longitude so that i
> can display this information on Google Maps.
>
> I am a total novice and have been looking all over the net to find a way to
> be able to do this. Could someone please tell me how is it done or point me
> to some place where I can find this information.
>
> Also, in the SPATIAL_REF_SYS table, within each projection the values for
> false easting (northing) differs from that of x_0(y_0), but in the manual
> it says that these are interchangable names. The projection that I am
> currently working on has False Easting of 520000.0 and false northing of
> -4880000.0. What would the corresponding x_0 and y_0 be ?
>
> Thanks a lot in advance
>
> :-)
>
> Nalin
More information about the postgis-users
mailing list