[postgis-tickets] [PostGIS] #4947: ST_Transform gives wrong projection result

PostGIS trac at osgeo.org
Sun Jul 11 20:03:51 PDT 2021


#4947: ST_Transform gives wrong projection result
----------------------+---------------------
 Reporter:  prusswan  |      Owner:  pramsey
     Type:  defect    |     Status:  new
 Priority:  medium    |  Milestone:
Component:  postgis   |    Version:  3.1.x
 Keywords:            |
----------------------+---------------------
 Originally discovered on Windows (EDB release of Postgresql 12), but
 results below are verified on Ubuntu 20.04, with 3.1.1 package taken from
 UbuntuGIS PPA.


 == 3.0.0+dfsg-6ubuntu4 (correct)

 {{{
 osmdata=# select postgis_version();
             postgis_version
 ---------------------------------------
  3.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
 (1 row)

 osmdata=# select postgis_Proj_version();
  postgis_proj_version
 ----------------------
  6.3.1
 (1 row)

 osmdata=# select postgis_geos_version();
  postgis_geos_version
 ----------------------
  3.8.0-CAPI-1.13.1
 (1 row)


 osmdata=# SELECT
 ST_AsText(ST_Transform(ST_PointFromText('POINT(4424.1108201807365
 30607.739957900718)', 3414),4326));
                 st_astext
 ------------------------------------------
  POINT(103.621479664059 1.29307114349788)
 (1 row)
 }}}


 == 3.1.1+dfsg-1~focal0 (correct)

 {{{
 osmdata=# select postgis_full_version();
 postgis_full_version
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
  POSTGIS="3.1.1 aaf4c79" [EXTENSION] PGSQL="120" GEOS="3.9.0-CAPI-1.16.2"
 PROJ="7.2.1" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3"
 WAGYU="0.5.0 (Internal)"
 (1 row)

 osmdata=# SELECT
 ST_AsText(ST_Transform(ST_PointFromText('POINT(4424.1108201807365
 30607.739957900718)', 3414),4326));
                   st_astext
 ---------------------------------------------
  POINT(103.62147966405882 1.293071143497882)
 (1 row)
 }}}

 == 3.1.2+dfsg-1~exp2.pgdg20.04+1 (incorrect)

 {{{
 osmdata=# select postgis_full_version();
 postgis_full_version

 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  POSTGIS="3.1.2 cbe925d" [EXTENSION] PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 "
 PROJ="6.3.1" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3"
 WAGYU="0.5.0 (Internal)" TOPOLOGY
 (1 row)


 osmdata=# SELECT
 ST_AsText(ST_Transform(ST_PointFromText('POINT(4424.1108201807365
 30607.739957900718)', 3414),4326));
                   st_astext
 ---------------------------------------------
  POINT(103.85674826125751 1.056284203429596)
 (1 row)
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4947>
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-tickets mailing list