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

Markus Metz markus.metz.giswork at gmail.com
Thu Jan 5 13:32:04 PST 2017


On Thu, Dec 29, 2016 at 11:07 AM, Blumentrath, Stefan <
Stefan.Blumentrath at nina.no> wrote:
>
> 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.

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!

Markus M
>
>
>
> 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
>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20170105/902c2c00/attachment.html>


More information about the grass-dev mailing list