[GRASS-dev] r.walk and r.drain improvements

Colin Nielsen colin.nielsen at gmail.com
Mon Jun 23 07:02:26 EDT 2008


I realized that the r.drain function does not adequately create a
least-cost path on a cumulative cost surface. This is because there is
no check within the r.drain function to ensure that the "steepest"
downhill change in cost value is actually the same as the direction of
cost accumulation during the cost calculation. This means that there
is a disconnect between the movement direction in r.walk and the path
created by r.drain.

To fix this I have added the creation of a movement direction output
raster to the r.walk code. This way the original movement directions
will be preserved and the true least-cost path may be found using
another module which traces the directional surface backwards.

My question is, should the direction tracing module be:
a) incorporated into r.drain with a flag specifying a cost surface
rather than dem input, and an additional direction input
b) write a new, separate module called r.costpath

More modules or more complex modules?

Thanks for the advice,
-Colin


More information about the grass-dev mailing list