Interface IPolygon2
Provides access to members that extend the IPolygon interface.
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("CC1F0567-2846-49E1-B4E2-74156B4D8BB8")]
public interface IPolygon2 : IPolygon, IPolycurve, ICurve, IGeometry
Properties
Dimension
esriGeometryDimension Dimension { get; }
Property Value
Envelope
IEnvelope Envelope { get; }
Property Value
ExteriorRingCount
int ExteriorRingCount { get; }
Property Value
FromPoint
IPoint FromPoint { get; set; }
Property Value
GeometryType
esriGeometryType GeometryType { get; }
Property Value
InteriorRingCount[IRing]
int InteriorRingCount[IRing exteriorRing] { get; }
Parameters
exteriorRingIRing
Property Value
IsClosed
bool IsClosed { get; }
Property Value
IsEmpty
bool IsEmpty { get; }
Property Value
Length
double Length { get; }
Property Value
SpatialReference
ISpatialReference SpatialReference { get; set; }
Property Value
ToPoint
IPoint ToPoint { get; set; }
Property Value
Methods
Close()
void Close()
Densify(double, double)
void Densify(double maxSegmentLength, double maxDeviation)
Parameters
FindExteriorRing(IRing)
IRing FindExteriorRing(IRing interiorRing)
Parameters
interiorRingIRing
Returns
Generalize(double)
void Generalize(double maxAllowableOffset)
Parameters
maxAllowableOffsetdouble
GeoNormalize()
void GeoNormalize()
GeoNormalizeFromLongitude(double)
void GeoNormalizeFromLongitude(double Longitude)
Parameters
Longitudedouble
GetConnectedComponents(int, out IPolygon)
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.
void GetConnectedComponents(int numComponentsRequested, out IPolygon components)
Parameters
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.
GetConnectedComponents2(out IPolygon[])
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.
void GetConnectedComponents2(out IPolygon[] components)
Parameters
componentsIPolygon[]
GetOutermostComponents(int, out int, out IPolygon, out bool)
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.
void GetOutermostComponents(int numComponentsRequested, out int numComponentsReturned, out IPolygon components, out bool moreComponentsExist)
Parameters
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.
GetOutermostComponents2(out IPolygon[], out bool)
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.
void GetOutermostComponents2(out IPolygon[] components, out bool moreComponentsExist)
Parameters
GetSubcurve(double, double, bool, out ICurve)
void GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)
Parameters
Project(ISpatialReference)
void Project(ISpatialReference newReferenceSystem)
Parameters
newReferenceSystemISpatialReference
QueryEnvelope(IEnvelope)
void QueryEnvelope(IEnvelope outEnvelope)
Parameters
outEnvelopeIEnvelope
QueryExteriorRings(ref IRing)
void QueryExteriorRings(ref IRing exteriorRings)
Parameters
exteriorRingsIRing
QueryExteriorRingsEx(int, out IRing)
Returns an array of references to exterior rings, up to a maximum of the number requested.
void QueryExteriorRingsEx(int numExteriorRingsRequested, out IRing exteriorRings)
Parameters
Remarks
Note : That method only accepts an array of type IRing for exteriorRings. Using an array of IRing2 won't work.

Does not work in .NET. Use IPolygon4.ExteriorRingBag instead.
QueryExteriorRingsEx2(out IRing[])
Returns an array of references to exterior rings.
void QueryExteriorRingsEx2(out IRing[] exteriorRings)
Parameters
exteriorRingsIRing[]
QueryFromPoint(IPoint)
void QueryFromPoint(IPoint from)
Parameters
fromIPoint
QueryInteriorRings(IRing, ref IRing)
void QueryInteriorRings(IRing exteriorRing, ref IRing interiorRings)
Parameters
QueryInteriorRingsEx(IRing, int, out IRing)
Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.
void QueryInteriorRingsEx(IRing exteriorRing, int numInteriorRingsRequested, out IRing interiorRings)
Parameters
Remarks
Note : That method only accepts an array of type IRing for interiorRings. Using an array of IRing2 won't work.

Does not work in .NET. Use IPolygon4.get_InteriorRingBag instead.
QueryInteriorRingsEx2(int, out IRing[])
Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.
void QueryInteriorRingsEx2(int exteriorRingIndex, out IRing[] interiorRings)
Parameters
QueryNormal(esriSegmentExtension, double, bool, double, ILine)
void QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatioboolLengthdoublenormalILine
QueryPoint(esriSegmentExtension, double, bool, IPoint)
void QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatiobooloutPointIPoint
QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)
void QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)
Parameters
extensionesriSegmentExtensioninPointIPointasRatiobooloutPointIPointDistanceAlongCurvedoubledistanceFromCurvedoublebRightSidebool
QueryTangent(esriSegmentExtension, double, bool, double, ILine)
void QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatioboolLengthdoubletangentILine
QueryToPoint(IPoint)
void QueryToPoint(IPoint to)
Parameters
toIPoint
ReverseOrientation()
void ReverseOrientation()
SetEmpty()
void SetEmpty()
SimplifyPreserveFromTo()
void SimplifyPreserveFromTo()
Smooth(double)
void Smooth(double maxAllowableOffset)
Parameters
maxAllowableOffsetdouble
SnapToSpatialReference()
void SnapToSpatialReference()
SplitAtDistance(double, bool, bool, out bool, out int, out int)
void SplitAtDistance(double distance, bool asRatio, bool createPart, out bool SplitHappened, out int newPartIndex, out int newSegmentIndex)
Parameters
distancedoubleasRatioboolcreatePartboolSplitHappenedboolnewPartIndexintnewSegmentIndexint
SplitAtPoint(IPoint, bool, bool, out bool, out int, out int)
void SplitAtPoint(IPoint splitPoint, bool projectOnto, bool createPart, out bool SplitHappened, out int newPartIndex, out int newSegmentIndex)
Parameters
splitPointIPointprojectOntoboolcreatePartboolSplitHappenedboolnewPartIndexintnewSegmentIndexint
Weed(double)
void Weed(double maxAllowableOffsetFactor)
Parameters
maxAllowableOffsetFactordouble