Highest point in a DEM grid
The highest elevation in a grid of elevations, the row and column where it first occurs, its distance from the north-west corner, and how many cells tie with it.
The highest point is 50.6 m, in row 2, column 3.
- Row
- Column
- Distance east
- Distance south
- Cells at that elevation
Provenance
- Computed by
- raster.terrain.highest-point 1.0.0, core 0.1.0
- Model
- The largest elevation among the cells that hold data; where several cells share it, the first in reading order (north row first, west to east) is reported with the count of cells that share it. Distances are (column − 1) and (row − 1) cell sizes from the north-west grid point
- Accuracy
- Exact on the elevations given; the true summit can lie between grid points and be higher than any of them
- Notes
- None
- Cites
- GDAL/OGR contributors, Open Source Geospatial Foundation, gdalinfo
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: The largest elevation among the cells that hold data; where several cells share it, the first in reading order (north row first, west to east) is reported with the count of cells that share it. Distances are (column − 1) and (row − 1) cell sizes from the north-west grid point
Accuracy: Exact on the elevations given; the true summit can lie between grid points and be higher than any of them
When to use this: Use this to find the top of a small DEM, a site survey, or a stockpile model: the elevation, where it is in the grid, and, with a cell size, how far it lies east and south of the first point. Ties are counted, so a flat top shows as many cells rather than one.
Limitations: The answer is a grid point, not the ground's true high point, which can sit between points and stand higher; a finer grid finds it more closely. Where several cells tie, only the first in reading order is placed. Cells marked with the no-data value are skipped. At most 300 by 300 cells.
Worked example: A knoll on a 2 m grid, with a tie at the top. Source: NumPy argmax on the same grid (tools/vectors/gen_dem_grid.py). It is golden test vector v002, and every build checks the tool still gives its answer within its tolerance.
You enter
- Cell size
- 2 m
- Elevation grid
- 48.2, 48.9, 49.1, 48.7 48.8, 50.3, 50.6, 49.0 48.5, 50.1, 50.6, 48.9 48.0, 48.6, 48.8, 48.4
You get
- Highest elevation
- 50.6 m
- Row
- 2
- Column
- 3
- Distance east
- 4 m
- Distance south
- 2 m
- Cells at that elevation
- 2
Review: Not yet independently reviewed by a GIS professional.
Last verified: 2026-10-14, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.0, core 0.1.0. See this tool in the verification report.
Changes
- 2026-10-14, changed: DEM statistics, the highest point of a DEM grid, and the volume change between two DEM grids are now stable. Each is held to NumPy on 24 grids or survey pairs (the statistics also to gdalinfo -stats) and to invariant tests for shifting, swapping, and gapping the grids. Results are unchanged. Changelog
Checked against: 25 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- gdalinfo, GDAL/OGR contributors, Open Source Geospatial Foundation, GDAL 3.13.3 documentation. -stats: read and display image statistics (minimum, maximum, mean, and standard deviation of the valid pixels).
Terms
- DEM: digital elevation model
- A grid of elevations. A surface model includes buildings and canopy; a terrain model is the ground beneath them. Source: Copernicus DEM GLO-30