Skip to content

BelgianLambert_Ellipsoidal_3D -> BelgianLambert_OstendHeight transformation should probably be implemented by doing BelgianLambert_Ellipsoidal_3D -> WGS 84 3D and WGS84 3D -> BelgianLambert_OstendHeight #4426

@ktheijs

Description

@ktheijs

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:

  • WGS84 = EPSG:4326+Ellipsoidal
  • LambertEllipsoidal = EPSG:31370+Ellipsoidal
  • LambertOstend = EPSG:31370+5710

Using 3D Ellipsoidal--------------------------------------
WGS84 input point:
5.73340278,50.60861389,299.16

WGS84 -> LambertOstend:
246588.1241007616,145103.98252358567,254.9427094303551

WGS84 -> LambertEllipsoidal:
246588.20546968083,145103.98057698458,255.04905407130718

WGS84 -> LambertEllipsoidal -> LambertOstend:
246588.2054696809,145103.98057698365,210.83176220202247

Using Compound Ellipsoidal--------------------------------
WGS84 input point:
5.73340278,50.60861389,299.16

WGS84 -> LambertOstend:
246588.1241007616,145103.98252358567,254.9427094303551

WGS84 -> LambertEllipsoidal:
246588.20546968083,145103.98057698458,299.16

WGS84 -> LambertEllipsoidal -> LambertOstend:
246588.2054696809,145103.98057698365,254.94270813071532

Using Derived---------------------------------------------
WGS84 input point:
5.73340278,50.60861389,299.16

WGS84 -> LambertOstend:
246598.20546968083,145103.98057698458,210.8317622020225

WGS84 -> LambertEllipsoidal:
246598.20546968083,145103.98057698458,299.16

WGS84 -> 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions