ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / Multipart Class / Extent Property
Example

In This Topic
    Extent Property (Multipart)
    In This Topic
    Gets the minimum enclosing envelope of this instance.
    Syntax
    public override Envelope Extent {get;}
    Public Overrides ReadOnly Property Extent As Envelope

    Property Value

    An Envelope.
    Remarks

    Extent

    Example
    Clip a Polyline by a Polygon
    // clip a polyline by a polygon
    
    List<Coordinate2D> list = new List<Coordinate2D>();
    list.Add(new Coordinate2D(1.0, 1.0));
    list.Add(new Coordinate2D(1.0, 4.0));
    list.Add(new Coordinate2D(4.0, 4.0));
    list.Add(new Coordinate2D(4.0, 1.0));
    
    Polygon polygon = PolygonBuilderEx.CreatePolygon(list, SpatialReferences.WGS84);
    
    LineSegment crossingLine = LineBuilderEx.CreateLineSegment(MapPointBuilderEx.CreateMapPoint(0, 3), MapPointBuilderEx.CreateMapPoint(5.0, 3.0));
    Polyline p = PolylineBuilderEx.CreatePolyline(crossingLine);
    Geometry geometry = GeometryEngine.Instance.Clip(p, polygon.Extent);
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also