[postgis-devel] [PostGIS] #318: 900913->4326 Transform

PostGIS trac at osgeo.org
Wed Nov 25 10:17:02 PST 2009


#318: 900913->4326 Transform
---------------------+------------------------------------------------------
 Reporter:  pramsey  |       Owner:  mcayland     
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 1.5.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------
 Originally reported on postgis-users against 1.3.6, strange results are
 also available on 1.5:
 {{{
 geog=# select postgis_full_version();
                                                     postgis_full_version
 ----------------------------------------------------------------------------------------------------------------------------
  POSTGIS="1.5.0SVN" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August
 2008" USE_STATS (procs from 1.5 r4836 need upgrade)
 (1 row)

 geog=# SELECT
 ASTEXT(ST_Transform(ST_SetSRID(ST_Point(-633510.090428,7506727.67383),900913),4326));
                   astext
 -------------------------------------------
  POINT(-5.69091796875412 55.7394816986905)
 (1 row)

 geog=# SELECT
 ASTEXT(ST_Transform(ST_SetSRID(ST_Point(-305748.113141,7834489.65112),900913),4326));
 ERROR:  transform: couldn't project point (-305748 7.83449e+06 0): failed
 to load NAD27-83 correction file (-38)
 HINT:  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.
 geog=# SELECT
 ASTEXT(ST_Transform(ST_SetSRID(ST_Point(-305748.113141,7834489.65112),900913),4269));
                   astext
 -------------------------------------------
  POINT(-2.74658203125265 57.3620898624176)
 (1 row)

 geog=# SELECT
 ASTEXT(ST_Transform(ST_SetSRID(ST_Point(-305748.113141,7834489.65112),900913),4267));
                   astext
 -------------------------------------------
  POINT(-2.74658203125265 57.3620898615614)
 (1 row)
 }}}
 Note that for some reason we get NAD27/83 grid failure in the 900913->4326
 case but *not* in the transforms into NAD83 and NAD27!

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/318>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list