Skip to main content

envelope_intersection

Function envelope_intersection 

Source
pub fn envelope_intersection(
    env1: &Polygon,
    env2: &Polygon,
) -> Result<Option<Polygon>>
Expand description

Computes the intersection of two envelopes

Returns the envelope representing the overlapping region, or None if they don’t intersect.

§Arguments

  • env1 - First envelope polygon
  • env2 - Second envelope polygon

§Returns

Some(envelope) if they intersect, None otherwise

§Errors

Returns error if envelope creation fails