[GRASS-dev] port of v.points.cog to python
Moritz Lennert
mlennert at club.worldonline.be
Sat Apr 18 22:52:06 PDT 2015
On 01/03/15 17:01, Patrice Dumas wrote:
> Hello,
>
> Here is a rewrite of the v.points.cog module in python. I tried
> translating code only, keeping the code organization, variables names as it
> was previously to help those who would want to review the differences
> with the shell script. I also did the few changes required for changes
> in grass7, but there weren't that much since python function already
> abstract some commands.
>
> I did a svn copy of the grass6 module before doing the modifications.
>
> I cannot (and don't want to...) claim any copyright on a code translation.
>
> I didn't test thoroughly, but since it is code translation, I don't expect
> big surprises.
Coming back to this: MarkusM, how difficult would it be to integrate
that functionality directly into v.centerpoint, i.e. something like this:
v.centerpoint ... use=attr column=
and
v.centerpoint ... use=cat
which would create one centerpoint for each collection of features with
the same value for attr or cat ?
One use case I'm confronted with right now is that I use v.cluster and
want to find the cluster centers to then get statistics about distance
to cluster centers within each cluster. Currently, I have to loop
through the cluster and run v.centerpoint on each.
Moritz
More information about the grass-dev
mailing list