[postgis-users] Transforming Coordinates
Alan Cunnane
alan_cunnane at yahoo.co.uk
Wed Jul 18 13:28:10 PDT 2007
Hi guys
I have a table with easting northing coordinates and these points in a geom column. I have 15,000 points with an easting and a northing (brittish national grid) and created the geom column using these commands:
SELECT AddGeometryColumn( 'bus_stops1', 'east_north', 27700, 'POINT', 2 );
UPDATE bus_stops1 SET east_north = PointFromText('POINT(' || easting || ' ' || northing || ')',27700);
The table looks like this at the moment:
easting | northing | east_north
---------+----------+----------------------------------------------------
226965 | 676038 | 0101000020346C000000000000A8B40B41000000008CA12441
226761 | 675945 | 0101000020346C00000000000048AE0B4100000000D2A02441
226696 | 675893 | 0101000020346C00000000000040AC0B41000000006AA02441
226473 | 675777 | 0101000020346C00000000000048A50B4100000000829F2441
226465 | 675731 | 0101000020346C00000000000008A50B4100000000269F2441
226614 | 675611 | 0101000020346C000000000000B0A90B4100000000369E2441
226603 | 675605 | 0101000020346C00000000000058A90B41000000002A9E2441
226869 | 675621 | 0101000020346C000000000000A8B10B41000000004A9E2441
226883 | 675630 | 0101000020346C00000000000018B20B41000000005C9E2441
226544 | 674911 | 0101000020346C00000000000080A70B4100000000BE982441
226767 | 675293 | 0101000020346C00000000000078AE0B4100000000BA9B2441
226767 | 675303 | 0101000020346C00000000000078AE0B4100000000CE9B2441
Now what I want to be able to do is to add another column or two columns with X and Y values in WGS or the standard X and Y coordinates for entry into google maps. I dont want to transform the east_north column so that I get another long string as is shown above as I cannot then integrate them into google maps. Can this be done using PostgreSQL?
Also I would like to do the opposite too. Take x and y coordinates from google maps and transform them to easting northing as above. Thanks for your help again
___________________________________________________________
Yahoo! Messenger - with free PC-PC calling and photo sharing. http://uk.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070718/13e26b94/attachment.html>
More information about the postgis-users
mailing list