Expand description
OVL6.T3 โ point_on_surface.
Mirrors boost/geometry/algorithms/point_on_surface.hpp: pick a
point guaranteed to lie in the interior of an areal geometry.
Boost uses a horizontal sweep at a representative height and takes
the midpoint of the widest interior span the scanline cuts; the port
does the same.
Unlike the centroid, this point is always inside the polygon even for
non-convex or holed shapes โ which is exactly why overlay,
labelling, and relate need it.
Functionsยง
- point_
on_ surface - A point guaranteed to lie in the interior of
polygon, orNonefor a degenerate (zero-area) polygon.