Opened 18 months ago
Closed 16 months ago
#5389 closed defect (duplicate)
ST_Transform broken with PROJ 9.2.0
Reported by: | tjay | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.3.4 |
Component: | postgis | Version: | 3.3.x |
Keywords: | proj | Cc: |
Description
Hi,
if PostGIS 3.x is compiled with PROJ 9.2.0 some Transformations are broken:
postgis 3.1.8 with PROJ 9.1.1
select postgis_full_version(); postgis_full_version --------------------------------------------------------------------------------------------------------------------------------------------------------------------- POSTGIS="3.1.8 c5ebc1f" [EXTENSION] PGSQL="120" GEOS="3.11.2-CAPI-1.17.2" PROJ="9.1.1" LIBXML="2.9.7" LIBJSON="0.13.1" LIBPROTOBUF="1.3.0" WAGYU="0.5.0 (Internal)" (1 row) postgres=# select ST_AsText(ST_Transform(ST_GeomFromText('POINT(343806.17 5676555.69)',25832),5676),4); st_astext ---------------------------------- POINT(2553378.3214 5676286.9204) (1 row)
postgis 3.1.8 with PROJ 9.2.0
postgres=# select postgis_full_version(); postgis_full_version --------------------------------------------------------------------------------------------------------------------------------------------------------------------- POSTGIS="3.1.8 c5ebc1f" [EXTENSION] PGSQL="120" GEOS="3.11.2-CAPI-1.17.2" PROJ="9.2.0" LIBXML="2.9.7" LIBJSON="0.13.1" LIBPROTOBUF="1.3.0" WAGYU="0.5.0 (Internal)" (1 row) postgres=# select ST_AsText(ST_Transform(ST_GeomFromText('POINT(343806.17 5676555.69)',25832),5676),4); st_astext ---------------------------------- POINT(2553376.7567 5676287.3596) (1 row)
cs2cs PROJ 9.2.0
[root@d5929135c288 /]# cat proj_utm.csv 343806.17 5676555.69 0.00 [root@d5929135c288 /]# cs2cs +init=epsg:25832 +to +init=epsg:5676 proj_utm.csv 2553378.32 5676286.92 0.00
Change History (9)
comment:1 by , 18 months ago
Summary: | ST_Transform Broken with PROJ 9.2.0 → ST_Transform broken with PROJ 9.2.0 |
---|
comment:3 by , 18 months ago
This might be the same issue we are running into with our tests failing for 9.2.0 when certain grid shift files aren't available as discussed in #5360 and I'm pretty sure we had same issue with our GHA latest that runs 9.2.0, but can't find that ticket.
comment:4 by , 18 months ago
Milestone: | PostGIS 3.1.9 → PostGIS 3.1.10 |
---|
comment:5 by , 17 months ago
with PROJ="9.2.1"
the PosGIS-Test above, does not fail with wrong coordinates but with an Exception:
ERROR: transform: File not found or invalid (1029)
So basicly better but still not comprehensible to the results of cs2cs
that does not fail and transforms correctly.
Maybe it relates to: https://github.com/OSGeo/PROJ/pull/3707
comment:6 by , 17 months ago
I am running the head of the 9.2 branch. I made sure I started my PostgreSQL server with the PROJ_NETWORK
environment variable set to ON
. And things work for me?
SELEcT ST_AsText( ST_Transform(ST_GeomFromText('POINT(343806.17 5676555.69)', 25832), 5676), 4); st_astext ---------------------------------- POINT(2553378.3214 5676286.9204) SELECT postgis_full_version(); POSTGIS="3.4.0dev 3.3.0rc2-970-g3f57ca3d2" PGSQL="150" GEOS="3.12.0dev-CAPI-1.18.0" PROJ="9.2.1" LIBXML="2.9.13" LIBJSON="0.16" LIBPROTOBUF="1.4.1" WAGYU="0.5.0 (Internal)"
comment:7 by , 17 months ago
Interesting note: until I turned PROJ_NETWORK
to ON
my regression was failing on a couple other proj tests, and now that I flipped it, regression is good. This is going to be a huge packaging problem, packagers are going to have no idea how to handle this well.
comment:9 by , 16 months ago
Milestone: | PostGIS 3.1.10 → PostGIS 3.3.4 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Version: | 3.1.x → 3.3.x |
auditing the DEBUG-Logs it seems some missing (and not needed) Datumgrids are differently handled in PostGIS vs cs2cs:
cs2cs 9.1.1
postgis + proj 9.1.1
cs2cs 9.2.0
postgis + proj 9.2.0
Transformation works correctly by adding the missing datumgrid (de_lgvl_saarland_SeTa2016.tif) -- short fix for now However, it would be important to know why this is happening...