[GRASS-user] ridge extraction from DEM

Michael Barton michael.barton at asu.edu
Mon Jun 11 22:04:56 PDT 2012


You'll need to experiment for yourself on this. Here is an example from the Spearfish demo data set

r.mapcalc expression='dem.inverted=(-1*elevation.dem) + 1840
r.watershed elevation=dem.inverted threshold=1000 stream=ridges
r.thin input=ridges output=ridges.thinned
r.to.vect input=ridges.thinned output=ridges type=line

The results can be seen here



Increasing the threshold size or masking out areas of low relief would eliminate ridges in relatively flat areas. Decreasing the threshold size would increase the number of ridges found. 

Also take a look at r.param.scale. It can do a good job of identifying ridges.

Michael


On Jun 11, 2012, at 10:36 PM, Thomaswplee wrote:

> Thank
> 
> Is there any potential feature extraction error by using inverted DEM *-1 + Hmax?
> 
> Originally, water goto local or global min
> We usually fill depression during basin formation
> Filled depression become flattern or cut top...
> Seem something wrong in part of the original workflow?
> 
> Thomas
> 
> 
> 
> 
> 
> -------- Original message --------
> Subject: Re: 回覆: Re: ridge extraction from DEM 
> From: Michael Barton <michael.barton at asu.edu> 
> To: Thomaswplee <thomaswplee at gmail.com> 
> CC: grass-user grass-user <grass-user at lists.osgeo.org> 
> 
> 
> Invert the DEM by multiplying all values by -1 and adding the maximum original height value. This makes the maximum height 0 and everything less than that increasingly greater than 0
> 
> Run r.watershed on the inverted DEM choosing stream segments as output.
> 
> The stream segments from the inverted DEM are your ridgelines. You can keep them in raster or thin them (r.thin) and convert them to vector (r.to.vect).
> 
> I've copied the GRASS user list again because this is a general question that others might be interested in.
> 
> Michael
> 
> 
> 
> On Jun 11, 2012, at 7:29 PM, Thomaswplee wrote:
> 
>> How to make ridge vector line with reversed accumlated flow as in watershed?
>> 
>> Still reverse DEM plus vectorization of ridge raster?
>> 
>> Thomas
>> 
>> 
>> 
>> -------- Original message --------
>> Subject: Re: ridge extraction from DEM 
>> From: Michael Barton <michael.barton at asu.edu> 
>> To: thomaslee at starvision.com.hk 
>> CC: grass-user grass-user <grass-user at lists.osgeo.org> 
>> 
>> 
>> Thomas,
>> 
>> I don't remember posting anything about r.ppa. I did a quick search and found a post by Māris Nartišs (http://lists.osgeo.org/pipermail/grass-user/2005-October/030883.html).
>> 
>> r.param.scale will extract ridges. You will need to adjust the optional parameters (especially processing window size) to get the ridges you want. 
>> 
>> An alternative method is to invert the DEM and run r.watershed on it, extracting the 'streams'. The 'streams' of the inverted DEM will follow ridges.
>> 
>> Michael
>> 
>> 
>> 
>> On Jun 11, 2012, at 9:26 AM, <thomaslee at starvision.com.hk>
>> wrote:
>> 
>> > Dear Michael,
>> > 
>> > I am interested in ridge extraction but not able to find the r.ppa mentioned by 
>> > 
>> > 
>> > Chang, Y.C., Frigeri, A., 2002. Implementing the automatic
>> > extraction of ridge and valley axes using the PPA algorithm in
>> > Grass GIS. In: Open Source Free Software GIS GRASS
>> > Users Conference, 2002.
>> > 
>> > 
>> > Implementing the automatic extraction of ridge and
>> > valley axes using the PPA algorithm in Grass GIS
>> > 
>> > 
>> > Do you have any solution since your message in 2007 about ridge extraction.
>> 
>> _____________________
>> C. Michael Barton
>> Visiting Scientist, Integrated Science Program
>> National Center for Atmospheric Research &
>> University Corporation for Atmospheric Research
>> 303-497-2889 (voice)
>> 
>> Director, Center for Social Dynamics & Complexity 
>> Professor of Anthropology, School of Human Evolution & Social Change
>> Arizona State University
>> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>> 
> 
> _____________________
> C. Michael Barton
> Visiting Scientist, Integrated Science Program
> National Center for Atmospheric Research &
> University Consortium for Atmospheric Research
> 303-497-2889 (voice)
> 
> Director, Center for Social Dynamics & Complexity 
> Professor of Anthropology, School of Human Evolution & Social Change
> Arizona State University
> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
> 
> 
> 
> 
> 

_____________________
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research &
University Consortium for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120611/0511d8b7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ridges_spearfish.jpg
Type: image/jpg
Size: 80246 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120611/0511d8b7/attachment-0001.jpg>


More information about the grass-user mailing list