[GRASS-dev] Keywords, help pages...

Hamish hamish_nospam at yahoo.com
Mon Aug 28 22:45:21 EDT 2006


Trevor Wiens 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. 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??


AFAIK, a module was never specifically written for this as v.category
could do it (if you knew about it).

Rather than keywords and updated help pages, I offer the attached
script as a more direct solution.

If folks feel it more appropriate a new C modules using the
Vect_get_point_in_area() function [lib/vector/Vlib/poly.c] directly
could be written, but I think this script is fine for now.


In a similar vein, a v.dissolve script could be written as a front end to
"v.extract -d".


Hamish
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v.add.centroids
Type: application/octet-stream
Size: 1838 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20060829/764106d4/v.add.obj


More information about the grass-dev mailing list