Interface IPolygon2

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

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

esriGeometryDimension

Envelope

IEnvelope Envelope { get; }

Property Value

IEnvelope

ExteriorRingCount

int ExteriorRingCount { get; }

Property Value

int

FromPoint

IPoint FromPoint { get; set; }

Property Value

IPoint

GeometryType

esriGeometryType GeometryType { get; }

Property Value

esriGeometryType

InteriorRingCount[IRing]

int InteriorRingCount[IRing exteriorRing] { get; }

Parameters

exteriorRing IRing

Property Value

int

IsClosed

bool IsClosed { get; }

Property Value

bool

IsEmpty

bool IsEmpty { get; }

Property Value

bool

Length

double Length { get; }

Property Value

double

SpatialReference

ISpatialReference SpatialReference { get; set; }

Property Value

ISpatialReference

ToPoint

IPoint ToPoint { get; set; }

Property Value

IPoint

Methods

Close()

void Close()

Densify(double, double)

void Densify(double maxSegmentLength, double maxDeviation)

Parameters

maxSegmentLength double
maxDeviation double

FindExteriorRing(IRing)

IRing FindExteriorRing(IRing interiorRing)

Parameters

interiorRing IRing

Returns

IRing

Generalize(double)

void Generalize(double maxAllowableOffset)

Parameters

maxAllowableOffset double

GeoNormalize()

void GeoNormalize()

GeoNormalizeFromLongitude(double)

void GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

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

numComponentsRequested int
components IPolygon

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

 

 

[C#]

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

components IPolygon[]

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

numComponentsRequested int
numComponentsReturned int
components IPolygon
moreComponentsExist bool

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

[C#]

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

components IPolygon[]
moreComponentsExist bool

GetSubcurve(double, double, bool, out ICurve)

void GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

Project(ISpatialReference)

void Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

QueryEnvelope(IEnvelope)

void QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

QueryExteriorRings(ref IRing)

void QueryExteriorRings(ref IRing exteriorRings)

Parameters

exteriorRings IRing

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

numExteriorRingsRequested int
exteriorRings IRing

Remarks

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

IPolygon2 QueryExteriorRingsEx Example

[C#]

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

exteriorRings IRing[]

QueryFromPoint(IPoint)

void QueryFromPoint(IPoint from)

Parameters

from IPoint

QueryInteriorRings(IRing, ref IRing)

void QueryInteriorRings(IRing exteriorRing, ref IRing interiorRings)

Parameters

exteriorRing IRing
interiorRings IRing

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

exteriorRing IRing
numInteriorRingsRequested int
interiorRings IRing

Remarks

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

IPolygon2 QueryInteriorRingsEx Example

[C#]

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

exteriorRingIndex int
interiorRings IRing[]

QueryNormal(esriSegmentExtension, double, bool, double, ILine)

void QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

QueryPoint(esriSegmentExtension, double, bool, IPoint)

void QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

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

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

QueryTangent(esriSegmentExtension, double, bool, double, ILine)

void QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

QueryToPoint(IPoint)

void QueryToPoint(IPoint to)

Parameters

to IPoint

ReverseOrientation()

void ReverseOrientation()

SetEmpty()

void SetEmpty()

SimplifyPreserveFromTo()

void SimplifyPreserveFromTo()

Smooth(double)

void Smooth(double maxAllowableOffset)

Parameters

maxAllowableOffset double

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

distance double
asRatio bool
createPart bool
SplitHappened bool
newPartIndex int
newSegmentIndex int

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

splitPoint IPoint
projectOnto bool
createPart bool
SplitHappened bool
newPartIndex int
newSegmentIndex int

Weed(double)

void Weed(double maxAllowableOffsetFactor)

Parameters

maxAllowableOffsetFactor double