ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Geometry Namespace / Polygon Class / IsExteriorRing(Int32) Method
The part index.
Example

In This Topic
    IsExteriorRing(Int32) Method
    In This Topic
    Determines if the specified part of this polygon is an exterior ring.
    Syntax
    public bool IsExteriorRing( 
       int index
    )
    Public Function IsExteriorRing( _
       ByVal index As Integer _
    ) As Boolean

    Parameters

    index
    The part index.

    Return Value

    A boolean indicating if the part is an exterior ring.
    Exceptions
    ExceptionDescription
    The index is negative or is greater than or equal to the number of parts in this polygon.
    Remarks
    An exterior ring is a part that is oriented clockwise.
    Example
    Get the exterior rings of a polygon - polygon.GetExteriorRing
    public void GetExteriorRings(Polygon inputPolygon)
    {
      if (inputPolygon == null || inputPolygon.IsEmpty)
        return;
    
      // polygon part count
      int partCount = inputPolygon.PartCount;
      // polygon exterior ring count
      int numExtRings = inputPolygon.ExteriorRingCount;
      // get set of exterior rings for the polygon
      IList<Polygon> extRings = inputPolygon.GetExteriorRings();
    
      // test each part for "exterior ring"
      for (int idx = 0; idx < partCount; idx++)
      {
        bool isExteriorRing = inputPolygon.IsExteriorRing(idx);
        var ring = inputPolygon.GetExteriorRing(idx);
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also