IPolygon2 Interface

Provides access to members that extend the IPolygon interface.

Members

Name Description
Method Close Closes all rings in this polygon. The resulting polygon may not be simple.
Method Densify Converts this polycurve into a piecewise linear approximation of itself.
Read-only property Dimension The topological dimension of this geometry.
Read-only property Envelope Creates a copy of this geometry's envelope and returns it.
Read-only property ExteriorRingCount The number of exterior rings.
Method FindExteriorRing Returns the exterior ring containing the specified interior ring.
Read/write property FromPoint The 'from' point of the curve.
Method Generalize Generalizes this polycurve using the Douglas-Peucker algorithm.
Read-only property GeometryType The type of this geometry.
Method GeoNormalize Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method GeoNormalizeFromLongitude Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
Method GetConnectedComponents Populates an array with polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original.
Method GetConnectedComponents2 Populates an array with polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original.
Method GetOutermostComponents Populates an array with polygons that represent outermost components of the original and all components within (islands within lakes). The rings of the output polygons are references to rings in the original.
Method GetOutermostComponents2 Populates an array with polygons that represent outermost components of the original and all components within (islands within lakes). The rings of the output polygons are references to rings in the original.
Method GetSubcurve Extracts a portion of this curve into a new curve.
Read-only property InteriorRingCount The number of rings interior to the specified exterior ring.
Read-only property IsClosed Indicates if 'from' and 'to' points (of each part) are identical.
Read-only property IsEmpty Indicates whether this geometry contains any points.
Read-only property Length The length of the curve.
Method Project Projects this geometry into a new spatial reference.
Method QueryEnvelope Copies this geometry's envelope properties into the specified envelope.
Method QueryExteriorRings Populates an array with references to all exterior rings. This method does not marshall correctly out-of-proc. Use QueryExteriorRingsEx on the IPolygon2 interface instead.
Method QueryExteriorRingsEx Returns an array of references to exterior rings, up to a maximum of the number requested.
Method QueryExteriorRingsEx2 Returns an array of references to exterior rings.
Method QueryFromPoint Copies this curve's 'from' point to the input point.
Method QueryInteriorRings Populates an array with references to rings that are interior to the specified exterior ring. This method does not marshall correctly out-of-proc. Use QueryInteriorRingsEx on the IPolygon2 interface instead.
Method QueryInteriorRingsEx Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.
Method QueryInteriorRingsEx2 Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.
Method QueryNormal Constructs a line normal to a curve from a point at a specified distance along the curve.
Method QueryPoint Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
Method QueryPointAndDistance Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
Method QueryTangent Constructs a line tangent to a curve from a point at a specified distance along the curve.
Method QueryToPoint Copies the curve's 'to' point into the input point.
Method ReverseOrientation Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).
Method SetEmpty Removes all points from this geometry.
Method SimplifyPreserveFromTo Simplifies the polygon and maintains the index location of the from/to point of each ring.
Method Smooth Converts this curve into a smooth curve containing only Bezier curve segments.
Method SnapToSpatialReference Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
Read/write property SpatialReference The spatial reference associated with this geometry.
Method SplitAtDistance Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.
Method SplitAtPoint Introduces a new vertex into this polyline at the location on it closest to the input point.
Read/write property ToPoint The 'to' point of the curve.
Method Weed Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.

IPolygon2.GetConnectedComponents Method

Populates an array with polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original.

Public Sub GetConnectedComponents ( _
    ByVal numComponentsRequested As Integer, _
    ByRef components As IPolygon _
)
public void GetConnectedComponents (
    int numComponentsRequested,
    ref IPolygon components
);

Remarks

The method returns an error in the following cases:

1. Number of components requested is smaller than 0

2. Number of components requested larger than the number of exterior rings

3. If the array is not dimensionned

4. If the polygon is not simple

Does not work in .NET. Use IPolygon4.get_ConnectedComponentBag instead.

IPolygon2.GetConnectedComponents2 Method

Populates an array with polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original.

Public Sub GetConnectedComponents2 ( _
    ByRef components As IPolygon[] _
)
public void GetConnectedComponents2 (
    ref IPolygon[] components
);

IPolygon2.GetOutermostComponents Method

Populates an array with polygons that represent outermost components of the original and all components within (islands within lakes). The rings of the output polygons are references to rings in the original.

Public Sub GetOutermostComponents ( _
    ByVal numComponentsRequested As Integer, _
    ByRef numComponentsReturned As Integer, _
    ByRef components As IPolygon, _
    ByRef moreComponentsExist As Boolean _
)
public void GetOutermostComponents (
    int numComponentsRequested,
    ref int numComponentsReturned,
    ref IPolygon components,
    ref bool moreComponentsExist
);

Remarks

The method returns an error in the following cases:

1. Number of components requested is smaller than 0

2. If the array is not dimensionned

3. If the polygon is not simple

Does not work in .NET. Use IPolygon4.get_OutermostComponentBag instead.

IPolygon2.GetOutermostComponents2 Method

Populates an array with polygons that represent outermost components of the original and all components within (islands within lakes). The rings of the output polygons are references to rings in the original.

Public Sub GetOutermostComponents2 ( _
    ByRef components As IPolygon[], _
    ByRef moreComponentsExist As Boolean _
)
public void GetOutermostComponents2 (
    ref IPolygon[] components,
    ref bool moreComponentsExist
);

IPolygon2.QueryExteriorRingsEx Method

Returns an array of references to exterior rings, up to a maximum of the number requested.

Public Sub QueryExteriorRingsEx ( _
    ByVal numExteriorRingsRequested As Integer, _
    ByRef exteriorRings As IRing _
)
public void QueryExteriorRingsEx (
    int numExteriorRingsRequested,
    ref IRing exteriorRings
);

Description

Returns an array of IRings containing up to numExteriorRingsRequested of the Exterior Rings in the Polygon.

Remarks

Note : That method only accepts an array of type IRing for exteriorRings. Using an array of IRing2 won't work.

IPolygon2 QueryExteriorRingsEx Example

Does not work in .NET. Use IPolygon4.ExteriorRingBag instead.

IPolygon2.QueryExteriorRingsEx2 Method

Returns an array of references to exterior rings.

Public Sub QueryExteriorRingsEx2 ( _
    ByRef exteriorRings As IRing[] _
)
public void QueryExteriorRingsEx2 (
    ref IRing[] exteriorRings
);

IPolygon2.QueryInteriorRingsEx Method

Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.

Public Sub QueryInteriorRingsEx ( _
    ByVal exteriorRing As IRing, _
    ByVal numInteriorRingsRequested As Integer, _
    ByRef interiorRings As IRing _
)
public void QueryInteriorRingsEx (
    IRing exteriorRing,
    int numInteriorRingsRequested,
    ref IRing interiorRings
);

Description

Returns an array of IRings containing up to numInteriorRingsRequested Interior Rings belonging to a specified input Exterior Ring.

Remarks

Note : That method only accepts an array of type IRing for interiorRings. Using an array of IRing2 won't work.

IPolygon2 QueryInteriorRingsEx Example

Does not work in .NET. Use IPolygon4.get_InteriorRingBag instead.

IPolygon2.QueryInteriorRingsEx2 Method

Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.

Public Sub QueryInteriorRingsEx2 ( _
    ByVal exteriorRingIndex As Integer, _
    ByRef interiorRings As IRing[] _
)
public void QueryInteriorRingsEx2 (
    int exteriorRingIndex,
    ref IRing[] interiorRings
);

Inherited Interfaces

Interfaces Description
IPolygon Provides access to members that identify a polygon and permit controlled access to its inner and outer rings.
IPolycurve Provides access to members that define operations common to polylines and the boundaries of polygons.
ICurve Provides access to properties and methods of all 1 dimensional curves (polylines, segments, boundaries of polygons, etc.).
IGeometry Provides access to members that describe properties and behavior of all geometric objects.

Classes that implement IPolygon2

Classes Description
Polygon A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.