<div dir="ltr">Hi Milton,<div><br></div><div>I think this fix will solve the problem[0]. For elevation data there might be cases where no path exists ie, only single pixel is the selected path. I had tested it by myself and it worked.</div>

<div><br></div><div>Please apply the patch and let me know.</div><div><br></div><div>If any problem comes in compilation or doing r.drain let me know. It will be great if you can share the test data you are using in case not working after applying the patch</div>


<div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">[0] <a href="http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff" target="_blank">http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff</a></div>

<div style="font-family:arial,sans-serif;font-size:13px">[1] <a href="http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c" target="_blank">http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c</a></div></div>
</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 27, 2012 at 2:31 AM, Milton Cezar Ribeiro <span dir="ltr"><<a href="mailto:miltinho.astronauta@gmail.com" target="_blank">miltinho.astronauta@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mohamed and Markus<br>
<br>
Mohamed, thanks for your reply, I will wait for a solution within GRASS :-)<br>
<br>
Markus, thanks for your reply,. Sorry  but I disagree a tiny bit,<br>
because is expected that between a source and target I will find a<br>
solution with the Least Cost path. Do you think that is there any<br>
situation where a least cost between source and target will not be<br>
found? Maybe if other software provide the soluction, although is not<br>
the bestest option, I prefere receive one complete output than a<br>
broken one.<br>
<br>
Happy new year!<br>
<br>
miltinho<br>
<br>
2012/12/23, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>>:<br>
<div class="im HOEnZb">> On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro<br>
> <<a href="mailto:miltinho.astronauta@gmail.com">miltinho.astronauta@gmail.com</a>> wrote:<br>
>> Dear all,<br>
>><br>
>> I am running a least cost path analysis combining r.cost and r.drain.<br>
>> But on some cases, when the least cost path between source and target<br>
>> reach the border of my map, r.drain stop on that position, and target<br>
>> point isn´t reached.<br>
><br>
> This is correct because at the borders, the direction can not be<br>
> determined, the path could lead out of the current region, you can not<br>
> tell.<br>
><br>
> Running on other softwares the algorithms the<br>
>> source and target is connected using edges without problem.<br>
><br>
> If in doubt, I would call it a bug in that other software.<br>
><br>
>><br>
>> Any hint are welcome.<br>
><br>
> Try to expand the current region<br>
><br>
> Markus M<br>
><br>
<br>
<br>
</div><div class="im HOEnZb">--<br>
Miltinho - <a href="mailto:mcr@rc.unesp.br">mcr@rc.unesp.br</a><br>
Laboratório de Ecologia Espacial e Conservação - LEEC<br>
Depto de Ecologia - UNESP - Rio Claro<br>
Av. 24A, 1515- Bela Vista<br>
13506-900 Rio Claro, SP, Brasil<br>
<br>
Fone: <a href="tel:%2B55%2019%203526-9647" value="+551935269647">+55 19 3526-9647</a> (office)  <a href="tel:19%203526-9680" value="+911935269680">19 3526-9680</a> (lab)<br>
Cel: 19 9853-3220 / 19 9853-5430<br>
<br>
Depto Ecologia <a href="http://www.rc.unesp.br/ib/ecologia/" target="_blank">http://www.rc.unesp.br/ib/ecologia/</a><br>
<br>
PG ECO & BIODIV <a href="http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php" target="_blank">http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php</a><br>
<br>
CV <a href="http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6&mostrarNroCitacoesISI=true&mostrarNroCitacoesScopus=true" target="_blank">http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6&mostrarNroCitacoesISI=true&mostrarNroCitacoesScopus=true</a><br>


<br>
Google citations <a href="http://scholar.google.com/citations?user=OWX_2eAAAAAJ" target="_blank">http://scholar.google.com/citations?user=OWX_2eAAAAAJ</a><br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Regards,<br>   Rashad</font></div>
</div>