[GRASS-user] quick comparison r.cost / r.walk

Dylan Beaudette dylan.beaudette at gmail.com
Tue Feb 19 16:02:13 EST 2008


On Tuesday 19 February 2008 04:57:34 am stefano negri wrote:
> Hi Dylan,
> interesting page. I have been playing with r.cost, r.drain and r.walk too
> lately and wanted to write something about this topic to the list, so this
> comes at the right moment :-)

Hi Stefano,

> I think it is interesting to analyze the effects of the model underlying
> r.walk. I mean, in r.walk the cost is computed as:
>     T = a*Dlength + b*Duphill + c*Dmoderatedownhill + d*Dsteepdownhill
> so this means that there is no distinction between moderate and steep
> UPhill. 
>
> The effect is evident if you work on a map that has a "vertical 
> wall". I have tried it on a "toy" map (on a 100x100 region with coordinates
> from 0 to 100) that is more or less like this (sorry I don't have the
> r.mapcalc expressions at hand, because I am not at my computer):
> 100-x where 0<y<30 or 70<y<100 or x<50
> 100-2x where x>=50 and 30<=y<=70
> (so the "vertical wall" would be on x=50, 30<=y<=70).
> If you start with this elevation map and use r.walk + r.drain with start
> and end point respectively (10,50) and (90,50) the path you end up with is
> just a straight line, right across the "wall" (quite counterintuitive)
> (I have tried this with lambda=1 and a friction map made up of ones
> everywhere)

So it sounds like  r.walk doesn't deal well with the differences between steep 
uphill and impossibly steep uphill! 


> Using r.cost on the slope map, on the other hand, will give you a path that
> avoids the walls and walks on one of the two slopes on the sides of the
> map. This is a consequence of the fact that there is no separate term for
> steep uphill in r.walk's model.
>     T = a*Dlength + b*Dmoderateuphill + c*Dsteepuphill +
> d*Dmoderatedownhill + e*Dsteepdownhill
> This makes r.walk a bit tricky to use and rely on in some cases, I think.

Interesting. I too was a little confused in terms of parameterizing 
the 'friction' map. In the past I have used a slope map with r.cost-- usually 
with good results (well mostly...).

> I was investigating how to use this modules to find the easiest/safest path
> to go from A to B in wilderness areas (something like what you describe in
> this interesting page:
> http://casoilresource.lawr.ucdavis.edu/drupal/node/244).
> In the end it seems like using r.cost guarantees something more intuitive,
> even though in most cases you don't have walls in a DEM and you could
> therefore use r.walk.

I see a couple of possibilities. 

1. r.cost + r.drain will often 'lead you up drainages', as by definition these 
are the often the sections of landscape with the smallest accumulated slope 
gradient. Cobbling together a 'friction map' as I did in the linked example 
you posted might be one way around this (i.e. adding arbitrarily large slope 
values to an existing slope map, etc.).

2. the formalization of walking cost + external friction approach used in 
r.walk lends itself well to integrating both the mechanics and terrain 
features which contribute to hiking time. Tweaking the parameter for uphill 
travel (b) might be a good way to increase  the sensitivity to difficult 
slopes.

I suppose that reading the original papers would yield some good insight into 
the matter.

In terms of setting up the external friction surface for r.walk-- combining a 
couple rules related to vegetation, deep water, and incised stream channels 
might solve a lot of the problems.

> I wonder what happens if you use the output of r.slope.aspect as a friction
> map for r.walk... (it feels like giving the same input twice, though).

I thought so as well... Maybe Markus has some ideas on this.

Cheers,

Dylan

> Regards,
> Stefano.
>
>
> 2008/2/19, Dylan Beaudette <dylan.beaudette at gmail.com>:
>
>     Hi,
>
>     posted a quick comparison between r.walk / r.cost. Page is still sparse
> on
>     descriptions / interpretations, but its late!
>
>
>     http://casoilresource.lawr.ucdavis.edu/drupal/node/544
>
>     Cheers,
>
>     --
>     Dylan Beaudette
>     Soil Resource Laboratory
>     http://casoilresource.lawr.ucdavis.edu/
>     University of California at Davis
>     530.754.7341
>     _______________________________________________
>     grass-user mailing list
>     grass-user at lists.osgeo.org
>     http://lists.osgeo.org/mailman/listinfo/grass-user





-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341


More information about the grass-user mailing list