[GRASS-dev] Individual vector feature processing: v.clump?

Markus Metz markus.metz.giswork at gmail.com
Thu Dec 4 00:03:47 PST 2014


On Thu, Dec 4, 2014 at 8:34 AM, Markus Neteler <neteler at osgeo.org> wrote:
> On Wed, Dec 3, 2014 at 9:47 PM, Markus Metz
> <markus.metz.giswork at gmail.com> wrote:
>> On Wed, Dec 3, 2014 at 5:51 PM, Markus Neteler <neteler at osgeo.org> wrote:
>>> Hi,
>>>
>>> for a calculation I need to loop over all vector features in a map in
>>> order to perform individually a computation. For that I cannot use the
>>> category information since it may be used as 1:n link.
>>>
>>> I wonder if a new v.clump command would make sense or the addition of
>>> a new method in v.category to simplify this task?
>>
>> Adding unique categories to a new layer for the features in question
>> with v.category (take care of the type option) does not work in this
>> case?
>
> Likely it does (I am asking on behalf on another person not subscribed here).
> I wonder how to make it more obvious.  And, if there is a best
> practice example written in Python/PyGRASS?

For Python, you can have a look at g.gui.rlisetup for an example about
how to cycle through all vector features of a given type.

Markus M


More information about the grass-dev mailing list