Processing a point layer
The Geoid heights of a point layer algorithm applies the calculation to every point of a layer. It is in the Processing toolbox, group AltiGeoid. Like any QGIS algorithm, it can also be used in the graphical modeler, in batch mode or from Python.
The algorithm window.
Parameters
Parameter |
Role |
|---|---|
Point layer |
input layer (points or multipoints, in any CRS) |
Height of the points |
None (N only), Z of the geometries or Attribute field |
Height field |
the numeric field, when the height comes from a field |
This height is |
h: ellipsoidal height or H: altitude (in the system of the model) |
Z of the output geometries |
Unchanged, Replaced by the altitude H or Replaced by the ellipsoidal height h |
Geoid model file |
any grid (.pgm, .tif, .gtx, .byn, .isg…). Empty: the model chosen in the dock, and in Automatic mode the best installed model for each point |
Cubic interpolation |
for GeographicLib .pgm grids |
Reference height to compare with |
optional: a numeric field to compare with the calculated height (field book, controller…) |
The reference height is |
H: altitude or h: ellipsoidal height |
Output
The output layer keeps all the fields of the input, plus:
Field |
Content |
|---|---|
|
N at the point (m) |
|
ellipsoidal height h (m) |
|
altitude H (m) |
|
model used for this point |
|
calculated height − reference (m), with a reference field |
Points outside the model coverage, or outside the domain of the CRS of the layer (beyond the edge of the world of a Web Mercator layer, for instance), keep these fields empty. The log gives their number, the number of points without a usable height, and the models used.
For a multipoint layer, the fields refer to the first point of each feature. The Z, however, is recomputed for each of the points.
Example: converting a GNSS survey into altitudes
A GNSS survey imported with Z values in ETRS89 / RGF93 ellipsoidal heights:
Height of the points: Z of the geometries;
This height is: h: ellipsoidal height;
Z of the output geometries: Replaced by the altitude H;
Geoid model file: empty, with the national model chosen in the dock.
The resulting layer has Z values in altitudes and keeps h, H and N in its fields.
Example: checking the altitudes of a survey
A survey exported from the controller as CSV, with the ellipsoidal height as Z and the
altitude computed by the controller in an Alt field:
Height of the points: Z of the geometries, This height is: h;
Reference height to compare with: Alt, The reference height is: H.
The diff_ref field gives for each point the gap between the altitude calculated by
AltiGeoid and that of the controller. Sort the attribute table on this field, or style the
layer as Graduated on diff_ref, to find the wrong points. The log gives the mean, the
standard deviation and the largest gap.
A gap nearly constant over all points (several decimetres or metres) does not come from measurement errors: the controller uses another geoid, or h and H are swapped. The log says so.
From Python
import processing
processing.run("altigeoid:pointgeoidheights", {
"INPUT": "/path/gnss_survey.gpkg|layername=points",
"HEIGHT_SOURCE": 1, # 0 none, 1 Z of the geometries, 2 field
"HEIGHT_FIELD": "",
"HEIGHT_KIND": 0, # 0 h ellipsoidal, 1 H altitude
"SET_Z": 1, # 0 unchanged, 1 replaced by H, 2 replaced by h
"GRID": "", # empty = model chosen in the dock
"CUBIC": True,
"OUTPUT": "/path/survey_altitudes.gpkg",
})