Skip to main content

Module buffer

Module buffer 

Source
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§

JoinStrategy
How to fill the wedge at a convex corner of the offset boundary.
PointStrategy
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 per join.
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.