v.category problem - was Re: [GRASS-dev] Keywords, help pages...

Radim Blazek radim.blazek at gmail.com
Tue Aug 29 06:27:42 EDT 2006


On 8/28/06, Markus Neteler <neteler at itc.it> wrote:
> Trevor Wiens wrote on 08/28/2006 03:20 PM:
> > Posting an answer to the user list....
> >
> > On Mon, 28 Aug 2006 22:14:56 +1200
> > Hamish <hamish_nospam at yahoo.com> wrote:
> >
> >
> >> In GRASS-land boundaries + centroids make polygons, so convert lines to
> >> boundaries with v.type and add centroids with "v.category option=add".
> >>
> >
> > Here is a classic case of something being difficult to find where
> > properly defined keywords might help. I'd wondered about how to add
> > centroids to areas before, but never bothered to figure it out when
> > nothing obvious showed up scanning the command listing and descriptions.
> >
> > Even trickier, with v.category the option=add with the type=centroid
> > doesn't add centroids, the type must be set to areas. I can't imagine
> > how the naming could be more counter-intuitive.

v.category adds category to geometry objects. The option 'type'
specifies the type of geometry objects to which the cattegory is added.
The 'type' option is something like input filter, only the geometry
specified in 'type' is processed. This works the same way for all modules.
If you use type=centroid, that means that you want to add cats to centroids
not that you want to add centroids.
Areas are special case because it is impossible to attach a cat to area
without centroid, the module places the centroids in areas automaticaly.

The only thing I can imagene it would be possible to do is to remove
type area and move the functionality to a new module v.centroid.
That would certainly make use more difficult.

Please dont change anything. Thanks

Radim

> This sounds like a bug to me.
>
> Markus
>
> >  Even the help page
> > example isn't all that clear on this IMHO.
> >
> > Would it be a good idea to add something explicit about this on
> > v.category page as well as the grass vector intro page??
> >
> > T
> >
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>




More information about the grass-dev mailing list