[GRASS-user] add a centroid in the center of polygon

Moritz Lennert mlennert at club.worldonline.be
Fri Jan 31 01:48:26 PST 2014


On 30/01/14 23:13, Markus Metz wrote:
> On Thu, Jan 30, 2014 at 10:39 AM, Moritz Lennert
> <mlennert at club.worldonline.be> wrote:
>> On 28/01/14 11:52, Markus Metz wrote:
>>>
>>> On Mon, Jan 27, 2014 at 9:38 AM, Moritz Lennert
>>>>
>>>>
>>>> Personally, I support MarkusN's idea of merging the two, if that's
>>>> possible
>>>> from the code point of view. I find it more intuitive to look for a
>>>> module
>>>> creating centroids...
>>>
>>>
>>> IMHO it will be confusing if there is a flag to calculate the center
>>> of mass, but centroids are then not always the actual center of mass,
>>> in which case it is safer to assume that centroids are not the center
>>> of mass.
>>
>>
>> Well, that's when you come from the GRASS perspective with a very specific
>> meaning for 'centroids'. I think for most users centroids are the center of
>> mass. So, I'm not sure that this will really be an issue of great confusion.
>
> Centroids, in the sense of v.centroids for which you request the
> modification, are calculated in the very specific GRASS meaning of
> 'centroids', i.e. they really must be inside the area for which they
> are calculated. Moreover, the center or mass for two or more different
> areas can be exactly the same.

I might have not been clear in my suggestion: I completely understand 
the nature of centroids in v.centroids. The idea of the suggestion was 
that for many people, the notion of "centroid" is more similar to what 
you propose in v.centerpoint. So, why not merge the two modules so that 
we have one module v.centroid which, by default, provides the 
v.centerpoint functionality, but via a flag provides the current 
v.centroid functionality.

But at the same time, I think we have more important issues such as 
Python on Windows for example ;-), so I won't push this any further.

Moritz


More information about the grass-user mailing list