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

Vaclav Petras wenzeslaus at gmail.com
Fri Jan 31 08:10:27 PST 2014


On Fri, Jan 31, 2014 at 4:48 AM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:

> 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.
>
> I agree with MarkusM that the modules should not be merged. I think that
it would create a confusion at the end. Users trying to create areas from
boundaries and complaining that they are not able to create a valid
topology.

One module is doing computation of point based on area, the other is
validating GRASS vector topology. We must explain this to the user and not
support misconceptions about GRASS vector model.

So, this should be solved on documentation level. If link (with a sentence
perhaps) in See also section is not enough, there can be a whole paragraph
explaining what the module is not doing and that the other module is doing
this.

Vaclav

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
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140131/cbfa1266/attachment-0001.html>


More information about the grass-user mailing list