[GRASSLIST:1756] r.drain

Dela Lovecraft dela at ukonline.co.uk
Sun Apr 22 10:45:11 EDT 2001


Hello All,

Fairly new to GRASS, so bear with me! Using Grass 4.3 on a Linux box, 
and playing with the various tutorials I have found. I have a question 
about r.drain, to which I can't find a satisfactory answer - perhaps 
someone can help?

If I produce a raster layer with r.cost, I have a layer showing how much 
it will cost to move away from a given point. Fine. I then use r.drain 
to plot the path from another given point, and I get a path of least 
effort/cost.

With the layer produced by r.drain, each cell along this path has a 
given value. Here is my question:

Assume there are n cells used in the path, and therefore n categories in 
the r.drain roduced layer. Do each of these values represent the cost of 
moving from the neighbouring cell to this one, or is it a cumulative 
total of the cost of moving through *all* cells to this one? Or put 
another way, does the value for cell n, the last cell in the path, 
represent the move from (n-1) to n, or does it represent (1 + 2 ... + 
n-1 + n) ?

Hope that makes sense...?


Dela Lovecraft




More information about the grass-user mailing list