Answer the question
In order to leave comments, you need to log in
How to determine the center of a polygon on a map?
Good day. There is a polygon on a geographic map (a set of coordinates). You need to determine the center of this polygon.
The task is synthetic, but nevertheless. Found one description of the algorithm and a similar question . Are there any implemented algorithms for determining the center or open source libraries with this capability? The language is not important.
Answer the question
In order to leave comments, you need to log in
used code from here
www.codeproject.com/Questions/403154/Finding-Middl...
my JS implementation
code.google.com/p/geoinfo/source/browse/public_htm...
The center is different though.
Maybe you need a center of mass? or geometric center? And just take the arithmetic mean of coordinates?
Look at https://github.com/mapnik/mapnik for some reason because they render labels inside polygons.
And, maybe. as a fantasy, look towards PostGIS.
The center of the chtuka polygon is complex. There is a geometric center, there is a center of mass and there is a "place where the inscription should be written."
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question