[GRASS-user] ridge extraction from DEM

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@asu.edu>
To: Thomaswplee <thomaswplee@gmail.com>
CC: grass-user grass-user <grass-user@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@asu.edu>
To: thomaslee@starvision.com.hk
CC: grass-user grass-user <grass-user@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@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

On Tue, Jun 12, 2012 at 7:04 AM, Michael Barton <michael.barton@asu.edu> wrote:

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?

Depression filling causes serious modification to the original DEM and should be avoided. Since you are interested in terrain features, you should definitively not use depression filling because this will destroy terrain features. r.watershed works fine on the original DEM.

Markus M

Thomas

-------- Original message --------

Subject: Re: 回覆: Re: ridge extraction from DEM
From: Michael Barton <michael.barton@asu.edu>

To: Thomaswplee <thomaswplee@gmail.com>
CC: grass-user grass-user <grass-user@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@asu.edu>
To: thomaslee@starvision.com.hk
CC: grass-user grass-user <grass-user@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@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


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user