You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Check a DEM for steps, spikes and implausible values before shading it #3151
DEM artifacts are invisible in a stretched grey raster and glaring in a relief shading:
seams between mosaicked tiles;
stripes in SRTM;
spikes and pits from radar noise;
cliffs at reservoir edges in a surface model;
no-data written as −32768 or 0.
In RustGIS the user finds them only after styling the map. Eduard warns about outliers on import and has a Show Steep Steps view that marks abrupt steps in black. GeoLibre has Fill Pits and Breach Single-Cell Pits, which fix single cells but don't report anything.
Proposal
A tool, Check DEM (Terrain), that writes a point layer of what it finds, with a kind field and its size, and a summary:
steps: a cell whose drop to a neighbour exceeds k times its own local slope's drop and a minimum height (default k = 5, 20 m). These are breaks the surrounding terrain doesn't explain;
spikes and pits: a cell more than a threshold (default 30 m) above or below the median of its 3 × 3 neighbours;
implausible values: below −500 m or above 9,000 m, or long runs of one value (an undeclared no-data).
The summary gives counts per kind and the share of the DEM affected.
A notice when Shaded Relief is applied to a DEM with implausible values (a cheap check on the layer's statistics), naming the values and pointing to Check DEM and raster.mask.
Choices in this proposal
Report, don't fix. Fixing (filling, smoothing) is a choice the user makes with the existing tools. The check says where and how much.
Steps relative to the local slope. A fixed height threshold would flag every cliff in the mountains. Comparing with the slope around flags only breaks the terrain doesn't explain. The thresholds will be set on DEMs with known artifacts.
Points, not a raster. They can be listed, counted, labelled and zoomed to.
Not measured
There is no prototype. Before work starts I'll run the rules on an SRTM tile with stripes and a mosaic with a seam, and report how many flags are real.
Reopening: #3248 is part 1 of 4 of this issue, but its description mentioned what the last part will close, which GitHub read as a closing keyword. Parts 2 to 4 (spikes and pits, implausible values, and the Shaded Relief notice) are still to come.
Activity
refactor(analysis): keep Check DEM to its steps in this part (opengeo…
fix(analysis): Check DEM's over-limit notice counts the points written (
fix(analysis): Check DEM's progress ends with its scan; raster tools …
test(analysis): leave only Check DEM out of the output-file test's co…
elpidioassinaturas commentedon Nov 28, 2026
Reopening: #3248 is part 1 of 4 of this issue, but its description mentioned what the last part will close, which GitHub read as a closing keyword. Parts 2 to 4 (spikes and pits, implausible values, and the Shaded Relief notice) are still to come.
feat(analysis): Check DEM finds steps in an elevation model (opengeos…
feat(analysis): Check DEM finds spikes and pits (opengeos#3151 part 2) (
docs(analysis): Check DEM says what a flat run may be and what a run'…
docs(engine): say when the Shaded Relief notice is posted and what it…
docs(engine): the Shaded Relief notice reads an overview's statistics…
feat(analysis): Check DEM finds runs of implausible values (opengeos#…
feat(engine): Shaded Relief names values outside a land elevation (op…