Provides access to members that identify a polygon and permit controlled access to its inner and outer rings.
IPolygon4
A polygon is a collection of one or many exterior and interior rings. The rings do not need to be connected to or contained by other rings in the polygon. However, all rings are considered to be part of a single polygon regardless of their location. Rings can be embedded in the interior of other rings. Embedded rings define interior boundaries or holes within the polygon. Exterior rings are oriented in a clockwise direction while interior rings are oriented counterclockwise.
To define a polygon containing many disjoint rings, the polygon must be defined as a GeometryCollection to which preconstructed ring geometries are added. Adding segments to a polygon defined as a SegmentCollection, or points to a polygon defined as a PointCollection, assumes that the polygon is a single ring of connected segments.
IPolygon2 extends the functionality of IPolygon.
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
Windows, Solaris, Linux
See Also: IPolycurve, IPointCollection, IGeometry, IRing, ISegmentCollection, IGeometryCollection
Method Summary voidclose() Closes all rings in this polygon. IRingfindExteriorRing(IRing interiorRing) Returns the exterior ring containing the specified interior ring. intgetExteriorRingCount() The number of exterior rings. intgetInteriorRingCount(IRing exteriorRing) The number of rings interior to the specified exterior ring. voidqueryExteriorRings(IRing exteriorRings) Populates an array with references to all exterior rings. voidqueryInteriorRings(IRing exteriorRing, IRing interiorRings) Populates an array with references to rings that are interior to the specified exterior ring. voidsimplifyPreserveFromTo() Simplifies the polygon and maintains the index location of the from/to point of each ring.
Methods inherited from interface com.esri.arcgis.geometry.IPolycurvedensify, generalize, smooth, splitAtDistance, splitAtPoint, weed
Methods inherited from interface com.esri.arcgis.geometry.ICurvegetFromPoint, getLength, getSubcurve, getToPoint, isClosed, queryFromPoint, queryNormal, queryPoint, queryPointAndDistance, queryTangent, queryToPoint, reverseOrientation, setFromPoint, setToPoint
Methods inherited from interface com.esri.arcgis.geometry.IGeometrygeoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
Method Detail
Returns the Exterior Ring to which the input Interior Ring belongs. Every interior ring belongs to one and only one exterior ring.
Parameters: interiorRing - A reference to a com.esri.arcgis.geometry.IRing (in) Returns: A reference to a com.esri.arcgis.geometry.IRing Throws: IOException - If there are interop problems. AutomationException - If the ArcObject component throws an exception.
Returns the number of Exterior Rings that are part of the polygon. Exterior Rings have a clockwise orientation.
Returns: The cExteriorRings Throws: IOException - If there are interop problems. AutomationException - If the ArcObject component throws an exception.
Returns an array of IRings containing all of the Exterior Rings in the Polygon. Whenever possible, IPolygon2::QueryExteriorRingsEx should be used instead to ensure proper functionality and better control of the returned array.
Note : That method only accepts an array of type IRing for exteriorRings. Using an array of IRing2 won't work.
Parameters: exteriorRings - A reference to a com.esri.arcgis.geometry.IRing (in) Throws: IOException - If there are interop problems. AutomationException - If the ArcObject component throws an exception.
Parameters: exteriorRing - A reference to a com.esri.arcgis.geometry.IRing (in) Returns: The cInteriorRings Throws: IOException - If there are interop problems. AutomationException - If the ArcObject component throws an exception.
Returns an array of IRings containing all Interior Rings belonging to a specified input Exterior Ring. Whenever possible, IPolygon2::QueryInteriorRingsEx should be used to ensure proper functionality and better control of the returned array.
Note : That method only accepts an array of type IRing for interiorRings. Using an array of IRing2 won't work.
Parameters: exteriorRing - A reference to a com.esri.arcgis.geometry.IRing (in) interiorRings - A reference to a com.esri.arcgis.geometry.IRing (in) Throws: IOException - If there are interop problems. AutomationException - If the ArcObject component throws an exception.
Closes all Rings in the Polygon by adding a Segment between the To Point and From Point of each Ring if those points are not already identical. This may result in a non-simple Polygon with Rings crossing each other. Also, this only closes the last segment and does not fix improperly constructed Rings.
Throws: IOException - If there are interop problems. AutomationException - If the ArcObject component throws an exception.
SimplifyPreserveFromTo simplifies the polygon in the same manner as the ITopologicalOperator method Simplify, but once simplification is complete, SimplifyPreserveFromTo reorients each ring such that the original From/To points of each preexisting ring are in the simplified result. Newly created rings are not reoriented.
Throws: IOException - If there are interop problems. AutomationException - If the ArcObject component throws an exception.
转载于:https://www.cnblogs.com/willwayer/archive/2010/09/13/1824721.html
相关资源:DirectX修复工具V4.0增强版