1
General / Geoid loaded but not recognized in custom EPSG crs
« on: December 23, 2022, 02:02:23 PM »
The vertical datum "Ostend Height" is predefined in the following CRS predefined in Metashape:
I downloaded the geoid from https://github.com/OSGeo/PROJ-data/tree/master/be_ign
I adapted the TIFFTAG_IMAGEDESCRIPTION so that MEtashape recognizes the geoid as a vertical datum with epsg code 5110.
I'm able to do a coordinate transformation from lonlat towards this system.
However, if I define a custom crs with the same vertical crs EPSG code (5710), running a similar transformation returns the error "Vertical datum missing".
My expectation is that it would not matter which horizontal CRS is used for the vertical datum to be recognized.
I can't detect any difference in the wkt string.
So, can you explain what is missing here?
Code: [Select]
crs=Metashape.CoordinateSystem('EPSG::8370')
crs_equivalent=Metashape.CoordinateSystem('EPSG::3812+5710')
The vertical datum EPSG code is 5110, the associated horizontal & vertical CS EPSG code is 3812/5710. So the above two crs are equivalent. I downloaded the geoid from https://github.com/OSGeo/PROJ-data/tree/master/be_ign
I adapted the TIFFTAG_IMAGEDESCRIPTION so that MEtashape recognizes the geoid as a vertical datum with epsg code 5110.
I'm able to do a coordinate transformation from lonlat towards this system.
Code: [Select]
crsref=Metashape.CoordinateSystem('EPSG::4326')
coord = Metashape.Vector([2,50,10]) #lonlatz
crsref.transform(coord,crsref,crs) #works
crsref.transform(coord,crsref,crs_equivalent) #works, same output
However, if I define a custom crs with the same vertical crs EPSG code (5710), running a similar transformation returns the error "Vertical datum missing".
Code: [Select]
crscustom=Metashape.CoordinateSystem('EPSG::32631+5710')
crsref.transform(coord,crsref,crscustom) #fails, reports 'Vertical datum missing'
My expectation is that it would not matter which horizontal CRS is used for the vertical datum to be recognized.
I can't detect any difference in the wkt string.
So, can you explain what is missing here?