Opened 3 years ago

#4947 new defect

ST_Transform gives wrong projection result

Reported by: prusswan Owned by: pramsey
Priority: medium Milestone:
Component: postgis Version: 3.1.x
Keywords: Cc:

Description

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)

Change History (0)

Note: See TracTickets for help on using tickets.