Finds the pole of inaccessibility of a polygon - the point inside it
that is farthest from every edge - which is the most visually
"interior" spot to anchor a label. Unlike polygonCentroid,
the result always lies inside the polygon, including for crescents,
sectors, and rings with holes whose centroid falls outside the shape.
Distances are measured in the polygon's own coordinate units with no
projection, so for [lon, lat] input the search is slightly
anisotropic away from the equator; that bias is well inside the
tolerance that matters for placing a label.
Positions missing a coordinate are dropped from their ring before the
search. Returns undefined when the polygon has no usable outer ring
or its bounding box has zero width or height, mirroring
polygonCentroid.
Finds the pole of inaccessibility of a polygon - the point inside it that is farthest from every edge - which is the most visually "interior" spot to anchor a label. Unlike polygonCentroid, the result always lies inside the polygon, including for crescents, sectors, and rings with holes whose centroid falls outside the shape.
Distances are measured in the polygon's own coordinate units with no projection, so for
[lon, lat]input the search is slightly anisotropic away from the equator; that bias is well inside the tolerance that matters for placing a label.Positions missing a coordinate are dropped from their ring before the search. Returns
undefinedwhen the polygon has no usable outer ring or its bounding box has zero width or height, mirroring polygonCentroid.