[GRASS-dev] r.stream.basins: issues with points on other layer than 1

Blumentrath, Stefan Stefan.Blumentrath at nina.no
Thu Dec 29 02:07:17 PST 2016


Hi,

I had some trouble with r.stream.basins which labeled all basins created with points option as -1.
After some investigation I found out that the problem was that my vector points map only had categories on layer 2.
After transferring the categories to layer 1 everything worked fine. During my test with NC dataset I also saw that if there only some points on a layer have a category, no basin is produced for the points without category; even if the message of the module says differently.

The latter can be reproduced with NC data like this:
g.region -p raster=elev_lid792_1m
r.watershed elevation=elev_lid792_1m accumulation=flow_accum drainage=draindir
echo "638867.632469|220039.545432|7
638563.344273|220045.597694|12
638945.422741|220706.456664|999
638978.525142|220455.417819|" | v.in.ascii input=- output=points columns="cat integer" cat=3 --o
r.stream.basins --o --v -c direction=draindir points=points memory=3000 basins=basins

>From that experience I would like to suggest either

a)       Adding a layer option to the module

b)      Give at least a warning if features in the vector map are lacking a category

c)       Clarify the behavior in the manual
or maybe a combination of a-c...

I could assist with c)...
What do you think?

Cheers
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20161229/0aa9fd14/attachment-0001.html>


More information about the grass-dev mailing list