[GRASS-user] r.drain documentation

stefano negri ste.negri.liste at gmail.com
Fri Feb 15 17:01:05 EST 2008


Thanks for your answers Eric and Hamish.
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.
Stefano.

2008/2/15, Hamish <hamish_b at yahoo.com>:
>
> Stefano Negri wrote:
> > I'm a bit confused about r.drain (I'm working with Debian's backport
> > version 6.2.1). I have noticed that if you give as input in the
> > "coordinate" parameter a point that stands on the region's edge,
> > r.drain won't "move" from there: it would output a map with that
> > same single point. Is this a bug?
>
>
> feature.
>
>
> > On the other hand I can't understand why in the man page the section
> > entitled BUG says: "r.drain currently finds only the lowest point
> > (the cell having the smallest category value) in the input file
> > that can be reached through directly adjacent cells that are less
> > than or equal in value to the cell reached immediately prior to it;
> > therefore, it will not necessarily reach the lowest point in the
> > input file. It currently finds pits in the data, rather than the
> > lowest point present.". Why would a local search be a bug in this
> > case? I think it should be like that by design...
>
>
> It is like that by design so really a feature not a bug.
> The man page should mention you could fill pits first with a module
> like r.fill.dir or r.terraflow if you want that.
> (the first is listed in the see also section but not explained AFAICS)
>
>
>
>
> > I'm not too sure my understanding is correct. What do you think?
>
>
> You are right I think. My understanding is that it works by starting at
> the given point and looking for the most downhill cell around it. Then
> it moves to that cell and looks for the most downhill cell around that.
> And so on until it can go no further. If your starting cell is only
> surrounded by cells of higher value (you start in a pit) then it won't
> move. By being on the edge of the region you have cut down on the
> numbers of cells around your starting point so there is less chances
> for finding an outlet point. Zoom right in on the DEM and explore with
> d.rast.num to confirm.
>
>
>
> Hamish
>
>
>
>
>
>
>
>       ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20080215/1d512db9/attachment-0001.html


More information about the grass-user mailing list