[OSM-talk] Query using ST_transform fails

Jon Burgess jburgess777 at gmail.com
Mon Nov 1 19:06:07 GMT 2010


On Mon, 2010-11-01 at 09:21 +0100, Torsten Mohr wrote:
> 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?

Try:

# yum install proj-nad

Then I think you need to restart the postgres server. 

I think the error started appearing after a proj or postgis update, I
don't remember exactly when. It took me some time to realise that these
grid shift files were in this package.

   Jon





More information about the talk mailing list