com.esri.arcgis.geometry
Interface IPolygon2

All Superinterfaces:
ICurve, IGeometry, IPolycurve, IPolygon, Serializable
All Known Subinterfaces:
IPolygon3, IPolygon4
All Known Implementing Classes:
Polygon

public interface IPolygon2
extends IPolygon, Serializable

Provides access to members that extend the IPolygon interface.

Superseded By

IPolygon4

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 void getConnectedComponents(int numComponentsRequested, IPolygon[] components)
          Populates an array with polygons that represent connected components of the original.
 void getOutermostComponents(int numComponentsRequested, int[] numComponentsReturned, IPolygon[] components, boolean[] moreComponentsExist)
          Populates an array with polygons that represent outermost components of the original and all components within (islands within lakes).
 void queryExteriorRingsEx(int numExteriorRingsRequested, IRing[] exteriorRings)
          Returns an array of references to exterior rings, up to a maximum of the number requested.
 void queryInteriorRingsEx(IRing exteriorRing, int numInteriorRingsRequested, IRing[] interiorRings)
          Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.
 
Methods inherited from interface com.esri.arcgis.geometry.IPolygon
close, findExteriorRing, getExteriorRingCount, getInteriorRingCount, queryExteriorRings, queryInteriorRings, simplifyPreserveFromTo
 
Methods inherited from interface com.esri.arcgis.geometry.IPolycurve
densify, generalize, smooth, splitAtDistance, splitAtPoint, weed
 
Methods inherited from interface com.esri.arcgis.geometry.ICurve
getFromPoint, getLength, getSubcurve, getToPoint, isClosed, queryFromPoint, queryNormal, queryPoint, queryPointAndDistance, queryTangent, queryToPoint, reverseOrientation, setFromPoint, setToPoint
 
Methods inherited from interface com.esri.arcgis.geometry.IGeometry
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 

Method Detail

queryExteriorRingsEx

void queryExteriorRingsEx(int numExteriorRingsRequested,
                          IRing[] exteriorRings)
                          throws IOException,
                                 AutomationException
Returns an array of references to exterior rings, up to a maximum of the number requested.

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
numExteriorRingsRequested - The numExteriorRingsRequested (in)
exteriorRings - A reference to a com.esri.arcgis.geometry.IRing (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryInteriorRingsEx

void queryInteriorRingsEx(IRing exteriorRing,
                          int numInteriorRingsRequested,
                          IRing[] interiorRings)
                          throws IOException,
                                 AutomationException
Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
exteriorRing - A reference to a com.esri.arcgis.geometry.IRing (in)
numInteriorRingsRequested - The numInteriorRingsRequested (in)
interiorRings - A reference to a com.esri.arcgis.geometry.IRing (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectedComponents

void getConnectedComponents(int numComponentsRequested,
                            IPolygon[] components)
                            throws IOException,
                                   AutomationException
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.

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
numComponentsRequested - The numComponentsRequested (in)
components - A reference to a com.esri.arcgis.geometry.IPolygon (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOutermostComponents

void getOutermostComponents(int numComponentsRequested,
                            int[] numComponentsReturned,
                            IPolygon[] components,
                            boolean[] moreComponentsExist)
                            throws IOException,
                                   AutomationException
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.

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
numComponentsRequested - The numComponentsRequested (in)
numComponentsReturned - The numComponentsReturned (out: use single element array)
components - A reference to a com.esri.arcgis.geometry.IPolygon (out: use single element array)
moreComponentsExist - The moreComponentsExist (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.