Thanks for your answers Eric and Hamish.<br>I had already made sure with d.rast.num and I have double checked now on a "toy" map (a slope on a 100x100 grid): even if there are lower value cells beside a border cell, it won't move from there.<br>
Stefano.<br><br><div><span class="gmail_quote">2008/2/15, Hamish <<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Stefano Negri wrote:<br> > I'm a bit confused about r.drain (I'm working with Debian's backport<br> > version 6.2.1). I have noticed that if you give as input in the<br> > "coordinate" parameter a point that stands on the region's edge,<br>
> r.drain won't "move" from there: it would output a map with that<br> > same single point. Is this a bug?<br> <br> <br>feature.<br> <br><br> > On the other hand I can't understand why in the man page the section<br>
> entitled BUG says: "r.drain currently finds only the lowest point<br> > (the cell having the smallest category value) in the input file<br> > that can be reached through directly adjacent cells that are less<br>
> than or equal in value to the cell reached immediately prior to it;<br> > therefore, it will not necessarily reach the lowest point in the<br> > input file. It currently finds pits in the data, rather than the<br>
> lowest point present.". Why would a local search be a bug in this<br> > case? I think it should be like that by design...<br> <br> <br>It is like that by design so really a feature not a bug.<br> The man page should mention you could fill pits first with a module<br>
like r.fill.dir or r.terraflow if you want that.<br> (the first is listed in the see also section but not explained AFAICS)<br> <br><br> <br> <br> > I'm not too sure my understanding is correct. What do you think?<br>
<br> <br>You are right I think. My understanding is that it works by starting at<br> the given point and looking for the most downhill cell around it. Then<br> it moves to that cell and looks for the most downhill cell around that.<br>
And so on until it can go no further. If your starting cell is only<br> surrounded by cells of higher value (you start in a pit) then it won't<br> move. By being on the edge of the region you have cut down on the<br>
numbers of cells around your starting point so there is less chances<br> for finding an outlet point. Zoom right in on the DEM and explore with<br> d.rast.num to confirm.<br> <br><br> <br> Hamish<br> <br><br> <br> <br> <br>
<br> ____________________________________________________________________________________<br> Looking for last minute shopping deals?<br> Find them fast with Yahoo! Search. <a href="http://tools.search.yahoo.com/newsearch/category.php?category=shopping">http://tools.search.yahoo.com/newsearch/category.php?category=shopping</a><br>
</blockquote></div><br>