Closed pnorman closed 2 weeks ago
The centroid algorithm is subpar because the centroid of e.g. a C-shaped area would be outside the area.
Mapbox once implemented an algorithm better fit for such a use case called polylabel (https://github.com/mapbox/polylabel), there are various ports to different languages, some are mentioned in the readme.
Yes, pole of inaccessibility is a popular choice, but I don't think we should dictate the algorithm.
The specification currently specifies centroids because that was the only algorithm to turn polygons into points supported by Tilemaker back then (there is a second option since Tilemaker 3.0).
I agree that we should make this change. It is very unlikely to break anybodies styles and from @Nakaner s comment it i clear that there was never any intention to force centroids, so this is basically just an editorial change clearing up the meaning of the text.
I've fixed the merge conflicts. Can another steering committee member review and merge this?
Different implementations may prefer different ways of turning polygons into points, and this lets them experiment with new ways. Additionally, the centroid is a particularly bad algorithm as it may lay outside the polygon.