[OSM-talk] get latitude / longitude of points?

Jon Burgess jburgess777 at googlemail.com
Tue Mar 16 19:54:09 GMT 2010


On Tue, 2010-03-16 at 08:19 +0100, Torsten Mohr 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:
> 
> FEHLER:  transform: couldn't project point (1.48918e+06 6.894e+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.
> 
> So i looked it up in the documentation for st_Transform().  I got:
> 
> select PostGIS_Full_Version();
>                                   postgis_full_version
> ----------------------------------------------------------------------------------------
>  POSTGIS="1.4.1" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September 2009" 
> USE_STATS
> (1 Zeile)
> 
> So to my understanding, my version of Proj is fine, right?
> 
> I then tried to google for that error and got some discussion threads.  But 
> none of them seemed to have a really usable solution.
> 
> 
> Is there any hint you could give me to solve this problem?


Sometimes the nad files are not included in the base proj installation.
- On Fedora you need to install the "proj-nad" package. 
- On Ubuntu you may need to install "proj-data".

	Jon






More information about the talk mailing list