[GRASS-user] v.hull ignoring 'where' argument

Markus Metz markus.metz.giswork at gmail.com
Thu Feb 22 03:39:38 PST 2018


On Thu, Feb 22, 2018 at 10:05 AM, Helmut Kudrnovsky <hellik at web.de> wrote:
>
> Vilem Ded wrote
> > Hi,
> > I have set of points with attribute table (let just say with column "A"
> > containing 1s and 2s).
> > I would love to use function v.hull in order to get two convex hulls
> > (their
> > faces). Basically apply function "by group". Unfortunatelly, I was not
> > able
> > to find simple way to do that.
> >
> > First solution I came up with was scripting with for cycle using
> > "category"
> > - picking ids of points and then run:
> > v.hull input=mypoints output=myhulls1 cat="1,3,40,etc"
> > v.hull input=mypoints output=myhulls2 cat="2,4,41,etc"
> >
> > Than I tried where clause:
> > v.hull input=mypoints output=myhulls1 where="A<2"
> > v.hull input=mypoints output=myhulls2 where="A>1"
> >
> > Unfortunatelly, this clumsy solution (I have hounderds thousands of
point
> > sets) does not work. All four lines gave me the same result (convex hull
> > created from all points).
> > The only even more clumsy solution I succeded with was first use
> > 'v.extract'
> > and than apply 'v.hull' on newly created maps.
> >
> > My questions:
> > Is there a way how to effectively apply function(command) by group?
> > Is the v.hull function supposed to work like this (ingnoring where and
cat
> > arguments)?
>
> confirmed that where or cat seems not to work. please open a ticket for
> this.

>From the manual:
layer=string
    Layer number or name ('-1' for all layers)
    Default: -1

You need to set the layer option to some positive number, otherwise all
points from all layers will be used and the cats and where options are
ignored.

HTH,

Markus M

>
>
>
>
> -----
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180222/70759fea/attachment.html>


More information about the grass-user mailing list