Expand description
OVL7 — buffer: grow a geometry outward by a fixed distance.
Mirrors boost/geometry/algorithms/buffer.hpp and the buffer
strategies under strategies/buffer/. A buffer offsets every part of
the input outward by distance, rounding or mitering the corners,
and unions the offset pieces into an output polygon.
Cartesian dispatch covers every static single and homogeneous multi kind. Spherical and geographic inputs are projected into a local tangent plane, buffered by the same Cartesian engine, and transformed back. The angular path is intended for local buffers: unlike Boost’s per-segment geodesic offset formulas, its error grows with the geometry’s angular extent and it rejects projection centers at the poles. This deliberate approximation is recorded in the project feature-parity map for later reassessment. Polygon offsets are signed, handle convex and reflex vertices, and move interior rings in the opposite topological direction from the exterior.
Join / end / point strategies are modelled as small enums
(JoinStrategy, PointStrategy) mirroring Boost’s
join_round / join_miter and point_circle / point_square
strategy types.
Enums§
- Join
Strategy - How to fill the wedge at a convex corner of the offset boundary.
- Point
Strategy - How to approximate a buffered point.
Functions§
- buffer
- Buffer a geometry using the public point and join strategies.
- buffer_
convex_ polygon - Buffer a convex polygon outward by a positive
distance, rounding the corners perjoin. - buffer_
point - Buffer a point by
distance, producing the disc (or square) approximation. - buffer_
with - Buffer a geometry with Boost’s complete distance/side/join/end/point strategy bundle.
- buffer_
with_ strategy - Buffer a geometry with explicit coordinate-system and five-role strategy bundles.