ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / Envelope Class / Intersection Method
Envelope to intersect with.
Example

In This Topic
    Intersection Method (Envelope)
    In This Topic
    Calculates the intersection between this instance and the specified envelope.
    Syntax
    Public Function Intersection( _
       ByVal envelope As Envelope _
    ) As Envelope
    public Envelope Intersection( 
       Envelope envelope
    )

    Parameters

    envelope
    Envelope to intersect with.

    Return Value

    The intersecting envelope or null if they don't intersect.
    Exceptions
    ExceptionDescription
    The input envelope is null.
    Remarks

    Intersection

    Example
    Intersect two Envelopes
    {
      // use the convenience builders
      Envelope env1 = EnvelopeBuilderEx.CreateEnvelope(0, 0, 1, 1, SpatialReferences.WGS84);
      Envelope env2 = EnvelopeBuilderEx.CreateEnvelope(0.5, 0.5, 1.5, 1.5, SpatialReferences.WGS84);
    
      bool intersects = env1.Intersects(env2); // true
      Envelope env3 = env1.Intersection(env2);
    
    
      // or use the builderEx constructors which don't need to run on the MCT.
      EnvelopeBuilderEx builderEx = new EnvelopeBuilderEx(0, 0, 1, 1, SpatialReferences.WGS84);
      intersects = builderEx.Intersects(env2);
      builderEx.Intersection(env2);   // note this sets the builder to the intersection
      env3 = builderEx.ToGeometry() as Envelope;
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also