Interface IPolygon

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

Provides access to members that identify a polygon and permit controlled access to its inner and outer rings.

[Guid("A4C490B8-9441-11D0-82F7-0000F8034032")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IPolygon : IPolycurve, ICurve, IGeometry

Remarks

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.

Polygons

Properties

Dimension

esriGeometryDimension Dimension { get; }

Property Value

esriGeometryDimension

Envelope

IEnvelope Envelope { get; }

Property Value

IEnvelope

ExteriorRingCount

The number of exterior rings.

int ExteriorRingCount { get; }

Property Value

int

Remarks

 

IPolygon ExteriorRingCount Example

FromPoint

IPoint FromPoint { get; set; }

Property Value

IPoint

GeometryType

esriGeometryType GeometryType { get; }

Property Value

esriGeometryType

InteriorRingCount[IRing]

The number of rings interior to the specified exterior ring.

int InteriorRingCount[IRing exteriorRing] { get; }

Parameters

exteriorRing IRing

Property Value

int

Remarks

 

IPolygon InteriorRingCount Example

[C#]

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

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()

Closes all rings in this polygon. The resulting polygon may not be simple.

void Close()

Densify(double, double)

void Densify(double maxSegmentLength, double maxDeviation)

Parameters

maxSegmentLength double
maxDeviation double

FindExteriorRing(IRing)

Returns the exterior ring containing the specified interior ring.

IRing FindExteriorRing(IRing interiorRing)

Parameters

interiorRing IRing

Returns

IRing

Remarks

 

IPolygon FindExteriorRing Example

Generalize(double)

void Generalize(double maxAllowableOffset)

Parameters

maxAllowableOffset double

GeoNormalize()

void GeoNormalize()

GeoNormalizeFromLongitude(double)

void GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

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)

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.

void QueryExteriorRings(ref IRing exteriorRings)

Parameters

exteriorRings IRing

Remarks

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

IPolygon QueryExteriorRings Example

[C#]

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

QueryFromPoint(IPoint)

void QueryFromPoint(IPoint from)

Parameters

from IPoint

QueryInteriorRings(IRing, ref IRing)

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.

void QueryInteriorRings(IRing exteriorRing, ref IRing interiorRings)

Parameters

exteriorRing IRing
interiorRings IRing

Remarks

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

[C#]

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

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()

Simplifies the polygon and maintains the index location of the from/to point of each ring.

void SimplifyPreserveFromTo()

Remarks

 

SimplifyPreserveFromTo Example

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