Skip to content

[Feature]: Check a DEM for steps, spikes and implausible values before shading it #3151

Description

@elpidioassinaturas

Problem

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

  1. 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.
  2. 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.

🤖 Generated with Claude Code

Activity

  1. elpidioassinaturas commented on Nov 28, 2026

    @elpidioassinaturas
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions