-
Notifications
You must be signed in to change notification settings - Fork 879
Description
What is the bug?
I would expect to get the same output (within error margin) when I do both transformations:
EPSG:4326+Ellipsoidal -> EPSG:31370+5710
EPSG:4326+Ellipsoidal -> EPSG:31370+Ellipsoidal -> EPSG:31370+5710
However for different ways of formatting the WKT, I get different results.
When making a simple derived version of EPSG:31370 I also get yet different results.
I am not sure if there are multiple bugs causing this or if it all has the same underlying cause.
In the case of transforming between two compound systems with vertical CRS
VERTCRS["Ellipsoid (Metre)",VDATUM["Ellipsoid"],CS[vertical,1],AXIS["ellipsoidal height (h)",up,LENGTHUNIT["metre",1]], it seems that no transformation of the Z value is done. Does the code assume it is the same vertical CRS? Even though the WKT of the vertical CRS is the same it should be treated differently because EPSG:31370 uses a different ellipsoid from EPSG:4326.
Steps to reproduce the issue
In the following zip file you will find the test class in C# and the WKT definitions as separate files for ease of use outside of C#.
In the output below I use:
- WGS84 = EPSG:4326+Ellipsoidal
- LambertEllipsoidal = EPSG:31370+Ellipsoidal
- LambertOstend = EPSG:31370+5710
Using 3D Ellipsoidal--------------------------------------
WGS84 input point:
5.73340278,50.60861389,299.16WGS84 -> LambertOstend:
246588.1241007616,145103.98252358567,254.9427094303551WGS84 -> LambertEllipsoidal:
246588.20546968083,145103.98057698458,255.04905407130718WGS84 -> LambertEllipsoidal -> LambertOstend:
246588.2054696809,145103.98057698365,210.83176220202247Using Compound Ellipsoidal--------------------------------
WGS84 input point:
5.73340278,50.60861389,299.16WGS84 -> LambertOstend:
246588.1241007616,145103.98252358567,254.9427094303551WGS84 -> LambertEllipsoidal:
246588.20546968083,145103.98057698458,299.16WGS84 -> LambertEllipsoidal -> LambertOstend:
246588.2054696809,145103.98057698365,254.94270813071532Using Derived---------------------------------------------
WGS84 input point:
5.73340278,50.60861389,299.16WGS84 -> LambertOstend:
246598.20546968083,145103.98057698458,210.8317622020225WGS84 -> LambertEllipsoidal:
246598.20546968083,145103.98057698458,299.16WGS84 -> LambertEllipsoidal -> LambertOstend:
246598.2054696809,145103.98057698365,254.94270813071532
Versions and provenance
GDAL 3.10.0, released 2024/11/01
PROJ 9.5.0
As released on https://www.gisinternals.com/query.html?content=filelist&file=release-1930-x64-gdal-3-10-0-mapserver-8-2-2.zip
Additional context
No response