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

stefano negri ste.negri.liste at gmail.com
Tue Feb 19 07:57:34 EST 2008


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 :-)
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)
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.

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 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).

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20080219/13a078a8/attachment.html


More information about the grass-user mailing list