ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / EnvelopeBuilderEx Class / Intersection(Envelope) Method
The envelope to intersect with.
Example

In This Topic
    Intersection(Envelope) Method
    In This Topic
    Intersects the envelope with the EnvelopeBuilderEx.
    Syntax
    public void Intersection( 
       Envelope envelope
    )
    Public Sub Intersection( _
       ByVal envelope As Envelope _
    ) 

    Parameters

    envelope
    The envelope to intersect with.
    Exceptions
    ExceptionDescription
    The input envelope is null.
    Remarks
    Sets this instance equal to the intersection of the base envelope and the input envelope. The XMin and YMin of the resulting envelope builder is the maximum XMin and YMin respectively between the base and input envelopes, and the XMax and YMax is the minimum XMax and YMax respectively between the base and input Envelopes. If the resulting XMin > XMax, or YMin > YMax, then the envelope is Empty (and all XMin, XMax, YMin, and YMax are NaN.).

    Intersect

    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, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also