DEM processing methods
Demcompare can compute a wide variety of statistics on either an input DEM, or the difference between two input DEMs.
Before the statistics computation, the input DEM or the difference between two input DEMs is processed by a DEM processing method.
Several DEM processing methods are available.
The DEM processing methods can be split in two categories: DEM processing methods applied on one DEM, and DEM processing methods applied on two DEMs:
ref
: returns the reference DEMsec
: returns the secondary DEMref-curvature
: computes and returns the curvature of the reference DEMsec-curvature
: computes and returns the curvature of the secondary DEM
alti-diff
: computes and returns the difference in altitude between the two input DEMsalti-diff-slope-norm
: computes and returns the difference in altitude between the two input DEMs, and normalizes it by the slopeangular-diff
: computes and returns the angular difference between the two input DEMs
Warning
For sec
and sec-curvature
DEM processing methods, the classification layers are taken from the reference DEM.
Note
More informations about the curvature, the difference in altitude between the two input DEMs normalized by the slope and the angular difference can be found in Curvature, Slope normalized elevation difference and Angular difference respectively.
After the DEM processing methods, statistics can be computed on the resulting DEM.
Stats computation
In summary, the workflow can be represented by the figure below:
All the different DEM processing methods can be used within a single configuration file as below (a coregistration can be added):
{
"output_dir": "./test_output/",
"input_ref": {
"path": "./Gironde.tif",
"nodata": -9999.0
},
"input_sec": {
"path": "./FinalWaveBathymetry_T30TXR_20200622T105631_D_MSL_invert.TIF",
"nodata": -32768
}
"statistics": {
"alti-diff": {
"remove_outliers": "True"
},
"alti-diff-slope-norm": {
"remove_outliers": "True"
},
"angular-diff": {
"remove_outliers": "True"
},
"ref": {
"remove_outliers": "True"
},
"sec": {
"remove_outliers": "True"
},
"ref-curvature": {
"remove_outliers": "True"
},
"sec-curvature": {
"remove_outliers": "True"
}
}
}
By default, the following metrics will be computed: mean
, median
, max
, min
, sum
, squared_sum
, std
, percentil_90
, nmad
, rmse
, pdf
, cdf
, hillshade
, svf
.
The user may specify the required metrics as follows:
{
"output_dir": "./test_output/",
"input_ref": {
"path": "./Gironde.tif",
"nodata": -9999.0
},
"input_sec": {
"path": "./FinalWaveBathymetry_T30TXR_20200622T105631_D_MSL_invert.TIF",
"nodata": -32768
}
"statistics": {
"alti-diff": {
"remove_outliers": "True",
"metrics": ["mean", {"ratio_above_threshold": {"elevation_threshold": [1, 2, 3]}}]
}
}
}
The DEM processing methods applied on one DEM can also be used with a single DEM as input, as below:
{
"output_dir": "./test_output/",
"input_ref": {
"path": "./Gironde.tif",
"nodata": -9999.0
},
"statistics": {
"ref": {
"remove_outliers": "True"
},
"ref-curvature": {
"remove_outliers": "True"
}
}
}
By default, the following metrics will be computed: mean
, median
, max
, min
, sum
, squared_sum
, std
.
The user may specify the required metrics as follows:
{
"output_dir": "./test_output/",
"input_ref": {
"path": "./Gironde.tif",
"nodata": -9999.0
},
"statistics": {
"ref": {
"remove_outliers": "True",
"metrics": ["mean", {"ratio_above_threshold": {"elevation_threshold": [1, 2, 3]}}]
}
}
}
See also: