[OSM-talk] get latitude / longitude of points?
Andy Allan
gravitystorm at gmail.com
Tue Mar 16 11:38:27 GMT 2010
On Tue, Mar 16, 2010 at 7:19 AM, Torsten Mohr <tmohr at s.netic.de> wrote:
> Hello,
>
> thanks a lot for your hint.
>
>> http://postgis.refractions.net/documentation/manual-svn/ST_X.html
>> http://postgis.refractions.net/documentation/manual-svn/ST_Y.html
>>
>> select st_X(st_transform(way,4326)), st_Y(st_transform(way,4326)) from
>> planet_osm_point where ...
>
> I tried it like this:
>
> select st_X(st_transform(way,4326)), st_Y(st_transform(way,4326)) from
> planet_osm_point where name='Berlin' and place='city';
>
> But this lead to this error:
Try transforming via 3395, which always works for me. For reasons I've
never bothered investigating a direct transform from 900913->4326
doesn't work, but 900913->3395->4326 does.
e.g. st_X(st_transform(st_transform(way, 3395), 4326))
Cheers,
Andy
More information about the talk
mailing list