Skip to main content

buffer_with_strategy

Function buffer_with_strategy 

Source
pub fn buffer_with_strategy<G, CoordinateStrategy>(
    geometry: &G,
    settings: BufferSettings,
    coordinate_strategy: CoordinateStrategy,
) -> Result<MultiPolygon<Polygon<G::Point>>, OverlayError>
where G: Geometry, G::Kind: BufferStrategyForKind, <G::Kind as BufferStrategyForKind>::S: BufferStrategy<G, CoordinateStrategy>,
Expand description

Buffer a geometry with explicit coordinate-system and five-role strategy bundles.

Mirrors the explicit strategy overload of boost::geometry::buffer from algorithms/detail/buffer/interface.hpp:246-273, together with the Cartesian, spherical, and geographic umbrella strategies under strategies/buffer/.

SphericalBuffer and GeographicBuffer use a geometry-centered local tangent projection before invoking the Cartesian offset engine. This keeps distance units explicit and no_std compatible, but is a local-extent approximation rather than Boost’s per-segment geodesic construction.

§Errors

Returns OverlayError::Unsupported for invalid strategy values, non-finite/inapplicable distances, or degenerate linear input.