How the calculation works
This page describes, step by step, how the plugin goes from the entered coordinates to the altitude, and what accuracy to expect.
The steps of the calculation, in the dock as in the Processing algorithm.
1. From the input to a WGS 84 position
WGS 84 latitude / longitude: used as they are, once the decimal or DMS degrees are read (see The dock).
Geocentric X / Y / Z coordinates: converted into latitude, longitude and ellipsoidal height on the WGS 84 ellipsoid, with an iterative calculation exact to the micrometre. The ellipsoidal height h is then known directly.
Other CRS: the position is transformed into WGS 84 by QGIS, with the same transformations as for displaying layers.
2. From WGS 84 to the model system
Every geoid grid is defined in a geodetic system. The global models are in WGS 84. RAF20 is in RGF93 v2b, OSGM15 in ETRS89, etc. The position is transformed into that system by QGIS, then the plugin looks up the grid there.
Important
This transformation only concerns the position, not the height. National grids expect an ellipsoidal height expressed in their system: RGF93 for RAF20, ETRS89 for most European grids. Between WGS 84 (or ITRF) and these systems, ellipsoidal heights differ by a few centimetres. For accurate work, enter a GNSS height computed in the system of the model, as a national RTK network provides it. The dock shows this system under the model list.
3. Interpolation in the grid
A geoid model is a grid of N values, regular in latitude and longitude. The computed point usually falls between the nodes: it must be interpolated.
Left, bilinear interpolation uses the 4 nodes around the point. Right, the GeographicLib cubic interpolation uses 12 nodes.
PROJ grids (.tif, .gtx…: RAF20, OSGM15, egm08_25…): bilinear interpolation, as PROJ and QGIS do. It is the method intended by the producers of these grids. The values of the plugin are identical to those of PROJ.
GeographicLib grids (.pgm: egm2008-1, egm96-5…): cubic interpolation by default, with C. F. F. Karney’s algorithm (least-squares fit on 12 nodes). The interpolation error is much smaller than with bilinear interpolation, as the table below shows. Bilinear interpolation remains available in the point Processing algorithm (Cubic interpolation unticked), for comparison.
Maximum interpolation error of the GeographicLib EGM2008 grids, from its documentation:
Grid |
Step |
Bilinear |
Cubic |
|---|---|---|---|
egm2008-5 |
5′ |
0.478 m |
0.294 m |
egm2008-2_5 |
2.5′ |
0.135 m |
0.031 m |
egm2008-1 |
1′ |
0.025 m |
0.002 m |
This is the difference between the interpolated value and the full EGM2008 model. It is not the accuracy of the model itself.
Some grids contain several subgrids of different resolutions. The plugin then uses the finest one covering the point. A point outside the grid, or on an area without data, has no value: the dock says so and the algorithm leaves the fields empty.
4. Height or altitude
With the value N:
if the entered height is an ellipsoidal height h, then H = h − N;
if it is an altitude H, then h = H + N.
The dock also shows the corresponding geocentric X / Y / Z coordinates, computed on the WGS 84 ellipsoid.
Worked example
Point in Paris, 48.8462° N, 2.3447° E, ellipsoidal height h = 100.000 m:
Model |
N |
H = h − N |
|---|---|---|
RAF20 (NGF-IGN69) |
43.799 m |
56.201 m |
EGM2008 1′ (GeographicLib) |
44.623 m |
55.377 m |
The two altitudes differ by 82 cm. These are not errors: they are two different height systems (see Heights explained).
Accuracy
The accuracy of an altitude obtained by GNSS depends on three things:
the measured ellipsoidal height h: often the weakest term (a few centimetres in RTK, more with standalone GNSS);
the geoid model: one centimetre for RAF20 according to the EPSG registry. For EGM2008, from a few centimetres to a few decimetres depending on the gravity data available in the region;
the interpolation: negligible with fine grids and cubic interpolation (see the table above).
The EPSG registry gives an accuracy for each grid. The model manager shows it when it is known.
Checks
The calculation engine of the plugin was compared with reference implementations:
for PROJ grids (RAF20, EGM96, OSGM15, NZGeoid2016, CHGeo2004), the values are identical to those of PROJ (
vgridshift) to the micrometre, areas without data included;for GeographicLib grids, on 3,000 points spread over the whole Earth, poles and antimeridian included, the values are identical (to within 1e-13 m) to those of the GeographicLib algorithm, in its PyGeodesy Python transcription.