How could I extract all peaks from a DEM (large mountainous area) using GRASS?
Peak means something like: a pixel which is sourrounded by other pixels with smaller elevation numbers in a area arround the "peak-pixel" of about 100m.
How could I extract all peaks from a DEM (large mountainous area) using GRASS?
Peak means something like: a pixel which is sourrounded by other pixels with smaller elevation numbers in a area arround the "peak-pixel" of about 100m.
Use the grass module r.param.scale with the "param=feature" option. THis creates an output map with each pixel categorized as peak, ridge, channel, plane, etc. Peaks are given category 6 (ridges=5, etc)
A pure pixel based approach could be done with "r.mapcalc" ([..]) but will likely not lead to exciting results. Hence r.param.scale as suggested by Micha or this Addon: r.prominence which calculates the average difference between a central cell and its neighbors. It approximated the terrain 'ruggedness' by looking at average differences in elevation within a given neighborhood. See http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#r.prominence
I took the reverse approach to finding peaks, I found the peak pixels first, and am now trying to select those exceeding a certain prominence (as described on peakbagger.com, they appear to manually inspect topos to get their peaks).
A solution for finding the single pixel peaks is to use r.terraflow, followed by r.mapcalc looking for the minimum: Flow Accumulation == 1. As terraflow uses multiple flow directions this method eliminates ridge lines and gives you do with a single flow direction model like D8. This is slow (2 hours for a 15,000 x 15,000 cell DEM), and I am sure there is a more elegant way to do it, but it works.
I took a completely different approach. I exported as ASCII using How to produce a CSV file from .tif file with elevation data? and then found the peaks outside QGIS on a 5*5 template using my favourite computer language. In QGIS 2.18.2 this is select layer then Raster->Conversion->Translate and then set the output to ASCII XYZ from the drop-down menu when you specify the output file. I would have preferred Arc/Info ASCII grid (*.asc) format, but the fix for the gotcha described in the above link can't work the same way in 2.18.2.
I haven't found a prebuilt algorithm, but "prominence" is a defined thing. Basically Everest has a prominence equal to its elevation. So does the highest point on any contiguous land mass. To find the prominence of every peak you step through the contours and find the highest point in each "island" surrounded by the contour "ring" or polygon. The prominence is the elevation minus the lowest contour in which that spot height is still the highest point.
Another approach is as follows (this was my solution when faced with the same problem):
==
In pseudocode:
Then:
If, like mine, your DEM does not cover the entire landmass, and additional check is required for each contour polygon:
This took a couple of hours to implement in Ruby + PostGIS. And a couple of days to run for the 87GB Nelson/Tasman 1m x 1m LiDAR dataset (on a budget single-core cloud-based linux server).
==
Cons:
Pros: