phpgeo icon indicating copy to clipboard operation
phpgeo copied to clipboard

[FEATURE] Compute center of a polygon

Open aarongerig opened this issue 5 years ago • 3 comments

It would be nice to have a method in the Polygon class, which computes and returns the center of all coordinates.

Is this something you would be interested in? See http://tutorialspots.com/php-how-to-determine-the-center-of-a-polygon-637.html

aarongerig avatar Jan 24 '20 10:01 aarongerig

ping @mjaschen :)

aarongerig avatar Jul 06 '20 11:07 aarongerig

Hi,

that'd be a nice addition. The referenced algorithms are for planar polygons only. We have to find something that works on the surface of an ellipsoid. Lets see if we find the time for research and implementation :-)

mjaschen avatar Jul 12 '20 05:07 mjaschen

WDYT about this one, @mjaschen? https://bell0bytes.eu/centroid-convex/

aarongerig avatar Jul 14 '20 09:07 aarongerig