Skip to main content

Timeline for Formula to get polygon centroid

Current License: CC BY-SA 3.0

3 events
when toggle format what by license comment
Dec 12, 2011 at 16:46 comment added OptimizePrime A very simple method for finding the centroid (centre of mass) for a Geometry is to find the average for the longitude and latitude, though if you require a point that is always inside the feature you'll have issues with concave features. In which case you'll need to look at label point algorithms. Label point algorithms are essentially a centroid algorithm with a shift of the resultant point into the bounds of the feature.
Dec 9, 2011 at 14:00 comment added adev Ok thank you guys, but I would like to know what's the formula best fit the centroid coputing for geographics positioning. For example what's wrong if I use a simple mean like: lat = Sum(lat_1..lat_n)/n , lon=Sum(lon_1, lon_n)/n ?
Dec 9, 2011 at 13:34 history answered Stev_k CC BY-SA 3.0