<br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 7:04 AM, Michael Barton <span dir="ltr"><<a href="mailto:michael.barton@asu.edu" target="_blank">michael.barton@asu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>You'll need to experiment for yourself on this. Here is an example from the Spearfish demo data set</div><div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Helvetica">
r.mapcalc expression='dem.inverted=(-1*elevation.dem) + 1840</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Helvetica">r.watershed elevation=dem.inverted threshold=1000 stream=ridges</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Helvetica">r.thin input=ridges output=ridges.thinned</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Helvetica">
r.to.vect input=ridges.thinned output=ridges type=line</div></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Helvetica"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Helvetica">
The results can be seen here</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Helvetica"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 12px/normal Helvetica">
<img src="cid:149A050B-824B-439C-97A3-44F631983808" height="52" width="150"></div><div><br></div><div>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. </div>
<div><br></div><div>Also take a look at r.param.scale. It can do a good job of identifying ridges.</div><div><br></div><div>Michael</div><div><br></div><br><div><div>On Jun 11, 2012, at 10:36 PM, Thomaswplee wrote:</div><br>
<blockquote type="cite">
<div>Thank<div><br></div><div>Is there any potential feature extraction error by using inverted DEM *-1 + Hmax?</div><div><br></div><div>Originally, water goto local or global min</div><div>We usually fill depression during basin formation</div>
<div>Filled depression become flattern or cut top...</div><div>Seem something wrong in part of the original workflow?</div></div></blockquote></div></div></blockquote><div>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.<br>
<br>Markus M<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div><div class="im">
<div><br></div><div>Thomas</div><div><br></div><div><br></div><br><br><br>-------- Original message --------<br></div><div class="im">Subject: Re: 回覆: Re: ridge extraction from DEM <br>From: Michael Barton <<a href="mailto:michael.barton@asu.edu" target="_blank">michael.barton@asu.edu</a>> <br>
</div><div><div class="h5">To: Thomaswplee <<a href="mailto:thomaswplee@gmail.com" target="_blank">thomaswplee@gmail.com</a>> <br>CC: grass-user grass-user <<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>> <br>
<br><br>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<div><br></div><div>Run r.watershed on the inverted DEM choosing stream segments as output.</div>
<div><br></div><div>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).</div><div><br></div><div>I've copied the GRASS user list again because this is a general question that others might be interested in.</div>
<div><br></div><div>Michael<br><div><br></div><div><br></div><div><br><div><div>On Jun 11, 2012, at 7:29 PM, Thomaswplee wrote:</div><br><blockquote type="cite">
<div>How to make ridge vector line with reversed accumlated flow as in watershed?<div><br></div><div>Still reverse DEM plus vectorization of ridge raster?</div><div><br></div><div>Thomas</div><br><br><br>-------- Original message --------<br>
Subject: Re: ridge extraction from DEM <br>From: Michael Barton <<a href="mailto:michael.barton@asu.edu" target="_blank">michael.barton@asu.edu</a>> <br>To: <a href="mailto:thomaslee@starvision.com.hk" target="_blank">thomaslee@starvision.com.hk</a> <br>
CC: grass-user grass-user <<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>> <br><br><br><div style="word-break:break-all">Thomas,<br><br>I don't remember posting anything about r.ppa. I did a quick search and found a post by Māris Nartišs (<a href="http://lists.osgeo.org/pipermail/grass-user/2005-October/030883.html" target="_blank">http://lists.osgeo.org/pipermail/grass-user/2005-October/030883.html</a>).<br>
<br>r.param.scale will extract ridges. You will need to adjust the optional parameters (especially processing window size) to get the ridges you want. <br><br>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.<br>
<br>Michael<br><br><br><br>On Jun 11, 2012, at 9:26 AM, <<a href="mailto:thomaslee@starvision.com.hk" target="_blank">thomaslee@starvision.com.hk</a>><br> wrote:<br><br>> Dear Michael,<br>> <br>> I am interested in ridge extraction but not able to find the r.ppa mentioned by <br>
> <br>> <br>> Chang, Y.C., Frigeri, A., 2002. Implementing the automatic<br>> extraction of ridge and valley axes using the PPA algorithm in<br>> Grass GIS. In: Open Source Free Software GIS GRASS<br>> Users Conference, 2002.<br>
> <br>> <br>> Implementing the automatic extraction of ridge and<br>> valley axes using the PPA algorithm in Grass GIS<br>> <br>> <br>> Do you have any solution since your message in 2007 about ridge extraction.<br>
<br>_____________________<br>C. Michael Barton<br>Visiting Scientist, Integrated Science Program<br>National Center for Atmospheric Research &<br>University Corporation for Atmospheric Research<br><a href="tel:303-497-2889" value="+13034972889" target="_blank">303-497-2889</a> (voice)<br>
<br>Director, Center for Social Dynamics & Complexity <br>Professor of Anthropology, School of Human Evolution & Social Change<br>Arizona State University<br>www: <a href="http://www.public.asu.edu/%7Ecmbarton" target="_blank">http://www.public.asu.edu/~cmbarton</a>, <a href="http://csdc.asu.edu/" target="_blank">http://csdc.asu.edu</a><br>
<br></div> </div></blockquote></div><br><div>
<div style="word-wrap:break-word"><div><div><span style="font-size:12px">_____________________</span><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<div><div style="font-size:12px">C. Michael Barton</div><div style="font-size:12px">Visiting Scientist, Integrated Science Program</div><div style="font-size:12px">National Center for Atmospheric Research &</div><div style="font-size:12px">
University Consortium for Atmospheric Research</div><div style="font-size:12px"><a href="tel:303-497-2889" value="+13034972889" target="_blank">303-497-2889</a> (voice)</div><div style="font-size:12px"><br></div><div style="font-size:12px">
Director, Center for Social Dynamics & Complexity </div><div style="font-size:12px">Professor of Anthropology, School of Human Evolution & Social Change</div><div style="font-size:12px">Arizona State University</div>
<div style="font-size:12px">www: <a href="http://www.public.asu.edu/%7Ecmbarton" target="_blank">http://www.public.asu.edu/~cmbarton</a>, <a href="http://csdc.asu.edu/" target="_blank">http://csdc.asu.edu</a></div></div><div>
<br></div></div></span></div></span></div></span></div></div><div><br></div></div><br><br>
</div>
<br></div></div> </div></div></div></blockquote></div><div><div class="h5"><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="font-size:12px">_____________________</span><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div><div style="font-size:12px">C. Michael Barton</div><div style="font-size:12px">Visiting Scientist, Integrated Science Program</div><div style="font-size:12px">National Center for Atmospheric Research &</div><div style="font-size:12px">
University Consortium for Atmospheric Research</div><div style="font-size:12px"><a href="tel:303-497-2889" value="+13034972889" target="_blank">303-497-2889</a> (voice)</div><div style="font-size:12px"><br></div><div style="font-size:12px">
Director, Center for Social Dynamics & Complexity </div><div style="font-size:12px">Professor of Anthropology, School of Human Evolution & Social Change</div><div style="font-size:12px">Arizona State University</div>
<div style="font-size:12px">www: <a href="http://www.public.asu.edu/%7Ecmbarton" target="_blank">http://www.public.asu.edu/~cmbarton</a>, <a href="http://csdc.asu.edu/" target="_blank">http://csdc.asu.edu</a></div></div><div>
<br></div></div></span></div></span></div></span></span></div></div><div><br></div></div></span><br></span><br>
</div>
<br></div></div></div><br>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br></blockquote></div><br>