[OSM-talk] Query using ST_transform fails

Torsten Mohr tmohr at s.netic.de
Mon Nov 1 08:21:57 GMT 2010


Hello,

i once got a hint on this mailing list to use a query like this to get the 
lat/lon of the world capitals:

A)
select st_X(wayLL), st_Y(wayLL), name from (select 
ST_AsText(ST_Transform(way,4326)) as wayLL, name from planet_osm_point where 
capital='yes') as foo limit 5;

B)
Based on that hint i used this query:
select st_X(st_transform(way,4326)), st_Y(st_transform(way,4326)), name from 
planet_osm_point where place='city' and capital='yes';

That query worked fine and i did not change my system since then (that somehow
can't be true).  I now get errors for both queries:

FEHLER:  transform: couldn't project point (653103 6.63036e+06 0): failed to 
load NAD27-83 correction file (-38)
TIP:  PostGIS was unable to transform the point because either no grid shift 
files were found, or the point does not lie within the range for which the 
grid shift is defined. Refer to the ST_Transform() section of the PostGIS 
manual for details on how to configure PostGIS to alter this behaviour.


Could it be that due to an RPM update of PostgreSQL some scripts need to be 
reinstalled?  I can still generate maps using mapnik.


What do i need to do to make those queries work again?


Thanks for any hints,
Torsten.



More information about the talk mailing list