[GRASS-user] r.drain problem when flow reach the border

Markus Metz markus.metz.giswork at gmail.com
Thu Dec 27 08:24:49 PST 2012


On Wed, Dec 26, 2012 at 10:01 PM, Milton Cezar Ribeiro
<miltinho.astronauta at gmail.com> wrote:
> Hi Mohamed and Markus
>
> Mohamed, thanks for your reply, I will wait for a solution within GRASS :-)
>
> Markus, thanks for your reply,. Sorry  but I disagree a tiny bit,
> because is expected that between a source and target I will find a
> solution with the Least Cost path. Do you think that is there any
> situation where a least cost between source and target will not be
> found? Maybe if other software provide the soluction, although is not
> the bestest option, I prefere receive one complete output than a
> broken one.

r.drain works for me as expected when the input comes from r.cost,
i.e. movement directions are supplied. In this case the path does not
stop at a border. If the input is a DEM and directions are not
supplied, r.drain stops at borders, as it should do, because drainage
the direction can not be determined. r.drain, as the name implies,
traces a drainage path by following the steepest slope. It is not a
least cost path search module, for that you need to use r.cost +
r.drain.

Markus M

>
> Happy new year!
>
> miltinho
>
> 2012/12/23, Markus Metz <markus.metz.giswork at gmail.com>:
>> On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro
>> <miltinho.astronauta at gmail.com> wrote:
>>> Dear all,
>>>
>>> I am running a least cost path analysis combining r.cost and r.drain.
>>> But on some cases, when the least cost path between source and target
>>> reach the border of my map, r.drain stop on that position, and target
>>> point isn´t reached.
>>
>> This is correct because at the borders, the direction can not be
>> determined, the path could lead out of the current region, you can not
>> tell.
>>
>> Running on other softwares the algorithms the
>>> source and target is connected using edges without problem.
>>
>> If in doubt, I would call it a bug in that other software.
>>
>>>
>>> Any hint are welcome.
>>
>> Try to expand the current region
>>
>> Markus M
>>
>
>
> --
> Miltinho - mcr at rc.unesp.br
> Laboratório de Ecologia Espacial e Conservação - LEEC
> Depto de Ecologia - UNESP - Rio Claro
> Av. 24A, 1515- Bela Vista
> 13506-900 Rio Claro, SP, Brasil
>
> Fone: +55 19 3526-9647 (office)  19 3526-9680 (lab)
> Cel: 19 9853-3220 / 19 9853-5430
>
> Depto Ecologia http://www.rc.unesp.br/ib/ecologia/
>
> PG ECO & BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php
>
> CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6&mostrarNroCitacoesISI=true&mostrarNroCitacoesScopus=true
>
> Google citations http://scholar.google.com/citations?user=OWX_2eAAAAAJ


More information about the grass-user mailing list