<div dir="ltr"><div><div><br><br>On Thu, Dec 29, 2016 at 11:07 AM, Blumentrath, Stefan <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br>><br>> Hi,<br>><br>>  <br>><br>> I had some trouble with r.stream.basins which labeled all basins created with points option as -1.<br>><br>> After some investigation I found out that the problem was that my vector points map only had categories on layer 2.<br>><br>> 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.<br><br></div>If a module accepts a vector as input, there should (if feasible) also be the options layer, cats, where in order to optionally select a subset of vector features. Can you please add a ticket for r.stream.basins that these options need to be added, with layer=-1 meaning that basins must be created for all points, even if they have no category value? Thanks!<br><br></div>Markus M <br><div><div>><br>>  <br>><br>> The latter can be reproduced with NC data like this:<br>><br>> g.region -p raster=elev_lid792_1m<br>><br>> r.watershed elevation=elev_lid792_1m accumulation=flow_accum drainage=draindir<br>><br>> echo "638867.632469|220039.545432|7<br>><br>> 638563.344273|220045.597694|12<br>><br>> 638945.422741|220706.456664|999<br>><br>> 638978.525142|220455.417819|" | v.in.ascii input=- output=points columns="cat integer" cat=3 --o<br>><br>> r.stream.basins --o --v -c direction=draindir points=points memory=3000 basins=basins<br>><br>>  <br>><br>> From that experience I would like to suggest either<br>><br>> a)       Adding a layer option to the module<br>><br>> b)      Give at least a warning if features in the vector map are lacking a category<br>><br>> c)       Clarify the behavior in the manual<br>><br>> or maybe a combination of a-c…<br>><br>>  <br>><br>> I could assist with c)…<br>><br>> What do you think?<br>><br>>  <br>><br>> Cheers<br>><br>> Stefan<br>><br>><br>> _______________________________________________<br>> grass-dev mailing list<br>> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/grass-dev">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br><br></div></div></div>