-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BelgianLambert_Ellipsoidal_3D -> BelgianLambert_OstendHeight transformation should probably be implemented by doing BelgianLambert_Ellipsoidal_3D -> WGS 84 3D and WGS84 3D -> BelgianLambert_OstendHeight #4426
Comments
Have you checked and compared with projinfo what Proj plans to do with different inputs/outputs? For example:
|
Thanks for the tip. Problem 1: When transforming between ellipsoidal coordinate systems with a compound WKT, it does seem to ignore the Z value. (see the push and pop of the Z)
As opposed to doing the same thing but with a 3D WKT representation.
Problem 2: When transforming Wgs84_Ellipsoidal_Compound -> BelgianDerived_OstendHeight a different pipeline is used then when transforming Wgs84_Ellipsoidal_Compound -> BelgianLambert_OstendHeight. I would expect that the pipeline is the same for both, only the derived one would have an additional affine step at the end.
The derived flow actually seems to make more sense to me. So would 210.8317622020225 be the correct height? This is the same result as when I do Wgs84_Ellipsoidal_3D -> BelgianLambert_Ellipsoidal_3D -> BelgianLambert_OstendHeight. It seems like the direct transformation from WGS84 to Belgian Lambert with Ostend Height doesn't work correctly. Or is it the other way around? |
Transferred as a PROJ ticket. |
Do the problematic WKT strings perhaps come from some ESRI software, see Esri/projection-engine-db-doc#47? |
@rouault , I understood that PROJ made an excemption for this kind of VERTCRS. How else can you create a derived VERTCRS based on ellipsoidal heights? A PROJCRS with 3 axes is also not conformant with the standard but still supported by PROJ, correct? |
This is also discussed in #3075. |
Thanks for the reference @jratike80 . That confirms that this is a bug then. I'm also still not sure which elevation is correct now for Ostend Height. 254.94 or 210.83.
|
That is probably opinion based, but I do not really understand these things (I am a GDAL user, not a Proj developer). Have you been reading the standard https://docs.ogc.org/is/18-010r11/18-010r11.pdf and considered how you would define your coordinate systems as WKT2? |
I wasn't aware that a PROJCRS with 3 axes is conformant. But even better that it is. This means it should be supported by PROJ too, right? The WKT definitions as in the files Wgs84_Ellipsoidal_3D.txt, BelgianLambert_OstendHeight.txt, BelgianLambert_Ellipsoidal_3D.txt and BelgianDerived_OstendHeight.txt should be conformant then. You can find them in the zip file attached to the original post. I don't want to copy them here as they are pretty long. Since these definitions should be conformant, I don't see how the different transformations can get such different Z values. |
I would assume that one to be correct from the PROJ pipeline. returned by projinfo
That one is probably dubious because I'm not sure ellipsoidal heights are really defined in BD72. PROJ uses a Helmert transformation to do WGS 84 --> BD72 and it uses it in 3D to change the ellipsoidal heights. But then BelgianLambert_Ellipsoidal_3D -> BelgianLambert_OstendHeight is likely even more dubious because there's no known transformation between BD72 ellipsoidal heights and Ostend Height, so PROJ (likely wrongly) uses BD72 ellipsoidal heights as if they were ETRS89 ellipsoidal heights to use the be_ign_hBG18.tif grid |
PROJ seems to follow the defined transformations when possible, but there is also a bunch of custom logic to try and makes sense of a transformation without formal definition. What is PROJ's filosophy regarding transformations that are not formally defined? Is this specific scenario something that PROJ should be able to do or not according to it's filosophy? It is hard to create applications on top of PROJ if we cannot know what PROJ will transform correctly and what not. You also did not mention the |
Not sure what you mean by "formally defined". There isn't much philosophy, but a set of heuristics more or less good depending on situations, possibly with error implementations at times. A simplified version of what is implemented is in https://proj.org/en/stable/operations/operations_computation.html, but it doesn't reflect everything that is implemented. I'm now thinking that BelgianLambert_Ellipsoidal_3D -> BelgianLambert_OstendHeight transformation should probably be implemented by doing BelgianLambert_Ellipsoidal_3D -> WGS 84 3D and WGS84 3D -> BelgianLambert_OstendHeight rather than what it does currently.
The pipeline of that one looks fine |
If The derived horizontal system only moves the X position 10m to the East. It should not impact the elevation. |
it does not for me:
|
You are right. I was doing As you've mentioned before, |
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#.
GdalSupportCase.zip
In the output below I use:
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
The text was updated successfully, but these errors were encountered: