Skip to main content

expand

Function expand 

Source
pub fn expand<B, G, P>(bounds: &mut B, geometry: &G)
where B: BoxTrait<Point = P>, G: Geometry<Point = P>, P: PointMut + Default, G::Kind: EnvelopeStrategyForKind, <G::Kind as EnvelopeStrategyForKind>::S: EnvelopeStrategy<G, Output = Box<P>> + Default,
Expand description

Expand bounds so it contains geometry’s envelope.

Mirrors boost::geometry::expand(box, geometry) from algorithms/detail/expand/interface.hpp:115-132. The geometry kind is resolved through the same public envelope strategy used by crate::envelope(), then each minimum/maximum coordinate widens the caller-supplied box in place.

The current envelope strategy family is Cartesian; spherical and geographic antimeridian-aware expansion will become available when those envelope strategies are ported.