Skip to main content
Question

Average coordinates as centroid of polygon

  • August 13, 2014
  • 2 replies
  • 100 views

Hello,

 

 

I know there is alredy a number of questions about centroid, but I still have problem with finding it. Thing is that centroid can be calculated as a average of coordinates. But, centroid which I am getting by using CenterOfGravity or something similar gives me different result.

Does someone knows what is going on, and how to solve it?

What is the most eficient way to calculate it give an attributes containing X,Y of centroid to my polygon (I have tens of thousands polygons, and very very much points, so I need something very quick.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • August 14, 2014
Hi,

 

 

No, centroid (center of mass, center of gravity) is not average of coordinates.

 

Wikipedia: Centr Of mass (http://en.wikipedia.org/wiki/Center_of_mass)

 

 

There are three transformers which replace input feature with a point.

 

CenterPointReplacer: Center of Bounding Box

 

CenterOfGravityReplacer: Center of Mass

 

InsidePointReplacer: Inside Point of Area

 

 

However, all of them are different from average of coordinates, so you will have to create your own data flow to calculate that, if necessary.

 

 

Takashi

  • Author
  • August 14, 2014
Hi,

 

 

Thank you, Takashi. If they and you say so. Thanks.

 

 

Aleksandar