[GRASS-user] Cost Path

Moritz Lennert mlennert at club.worldonline.be
Tue Feb 7 09:04:11 EST 2012


On 07/02/12 14:39, ALT SHN wrote:
> Hello list,
>
> I have a raster obtained through r.mapcalc whose cells values represent
> friction or cost.

I suppose that is friction per cell.

> To finish my study I'm lacking one final step - calculate the least cost
> path!
>
> How do I do it? I've tried r.cost but the result is not wat I expected -
> My desired output is just a line from A to B, crossing the least valued
> cells.

Use r.cost with the coordinate of (or the vector or raster file 
containing) A as start point. Then r.drain with B as starting point.

Moritz


More information about the grass-user mailing list