-
Notifications
You must be signed in to change notification settings - Fork 76
Description
In some cases it may be useful for users to get automatic conversion between ellipsoid heights and orthometric heights - or in other terms, to (un-)apply geoid undulation. (Note: external GNSS return orthometric heights, and they also return geoid separation used for the height measurement to allow switching to ellipsoid height, but this information is currently not kept in Input - see #2725)
For this we would need to have access to the EGM2008 geoid model (~77MB) - https://github.com/OSGeo/PROJ-data/blob/master/us_nga/us_nga_egm08_25.tif - we could download it from CDN first time such option would be enabled.
To list transforms to from ellipsoidal heights to orthometric heights (EPSG:4979 would be actually more correct CRS as it is 3D, EPSG:4326 is 2D):
projinfo -s EPSG:4326 -t EPSG:4326+3855
This returns WGS 84 to EGM2008 height (1) with this definition:
+proj=pipeline
+step +proj=axisswap +order=2,1
+step +proj=unitconvert +xy_in=deg +xy_out=rad
+step +inv +proj=vgridshift +grids=us_nga_egm08_25.tif +multiplier=1
+step +proj=unitconvert +xy_in=rad +xy_out=deg
+step +proj=axisswap +order=2,1
Then converting lat=50 deg north, lon=20 deg east, alt=100 m above ellipsoid gives ~60 m orthometric height which seems correct:
$ export PROJ_NETWORK=ON # to allow PROJ fetch the geoid raster data from network
$ echo 50 20 100 0 | cct "WGS 84 to EGM2008 height (1)"
50.0000000000 20.0000000000 60.2805 0.0000
Workaround for now with ogr2ogr (with points_ellipsoid.gpkg being input file):
$ PROJ_NETWORK=ON ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:4326+3855 points_ortho.gpkg points_ellipsoid.gpkg