[GRASS-user] What algorithm does r.drain use?

Markus Metz markus.metz.giswork at gmail.com
Thu Jan 8 15:03:09 PST 2015


On Wed, Jan 7, 2015 at 7:27 AM, Takenori KANAI <kanai at ube-c.ac.jp> wrote:
> Hello. I'm sorry by my poor English.
>
> I have analyzed distribution of wild animals using r.drain now
> (http://grass.osgeo.org/grass65/manuals/r.drain.html).
>
> Some examples have been described to "EXAMPLES" in an
> online manual. In "EXAMPLES", there are two ways of cost
> value though the Cost value of fifith step is 10. In this case,
> I do not think that there is a problem because there is a
> smaller cost value since six steps even if the fifth step
> selects either.
>  However, by what algorithm has the cell been selected
> when there are two or more end points in route
> (There is a minimum same cost value as surroundings of cell. )?

r.drain simply follows the lowest cost in the surrounding cells (must
be lower than the current cell). If more surrounding cells have the
same minimum cost, the first cell encountered is used.

Markus M

>
> Thanks
>
>
> Takenori K.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list