Provides access to members that extend the IPolygon3 interface.
Members
Name | Description | |
---|---|---|
Close | Closes all rings in this polygon. The resulting polygon may not be simple. | |
ConnectedComponentBag | Creates and returns a geometry bag containing polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original. | |
Densify | Converts this polycurve into a piecewise linear approximation of itself. | |
Dimension | The topological dimension of this geometry. | |
Envelope | Creates a copy of this geometry's envelope and returns it. | |
ExteriorRingBag | Creates and returns a geometry bag that contains references to all exterior rings. | |
ExteriorRingCount | The number of exterior rings. | |
FindExteriorRing | Returns the exterior ring containing the specified interior ring. | |
FromPoint | The 'from' point of the curve. | |
Generalize | Generalizes this polycurve using the Douglas-Peucker algorithm. | |
GeometryType | The type of this geometry. | |
GeoNormalize | Shifts longitudes, if need be, into a continuous range of 360 degrees. | |
GeoNormalizeFromLongitude | Normalizes longitudes into a continuous range containing the longitude. This method is obsolete. | |
GetConnectedComponents | 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. | |
GetConnectedComponents2 | 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. | |
GetOutermostComponents | 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. | |
GetOutermostComponents2 | 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. | |
GetSubcurve | Extracts a portion of this curve into a new curve. | |
InteriorRingBag | Creates and returns a geometry bag that contains references to all rings that are interior to the specified exterior ring. | |
InteriorRingCount | The number of rings interior to the specified exterior ring. | |
IsClosed | Indicates if 'from' and 'to' points (of each part) are identical. | |
IsEmpty | Indicates whether this geometry contains any points. | |
Length | The length of the curve. | |
OutermostComponentBag | Creates and returns a geometry bag containing 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. | |
Project | Projects this geometry into a new spatial reference. | |
QueryEnvelope | Copies this geometry's envelope properties into the specified envelope. | |
QueryExteriorRings | 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. | |
QueryExteriorRingsEx | Returns an array of references to exterior rings, up to a maximum of the number requested. | |
QueryExteriorRingsEx2 | Returns an array of references to exterior rings. | |
QueryFromPoint | Copies this curve's 'from' point to the input point. | |
QueryInteriorRings | 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. | |
QueryInteriorRingsEx | Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested. | |
QueryInteriorRingsEx2 | Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested. | |
QueryNormal | Constructs a line normal to a curve from a point at a specified distance along the curve. | |
QueryPoint | Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve. | |
QueryPointAndDistance | Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items. | |
QueryTangent | Constructs a line tangent to a curve from a point at a specified distance along the curve. | |
QueryToPoint | Copies the curve's 'to' point into the input point. | |
ReverseOrientation | Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc). | |
SetEmpty | Removes all points from this geometry. | |
SimplifyEx | Same as ITopologicalOperator::Simplify, but with some additional options that affect performance and how the interior is classified. | |
SimplifyPreserveFromTo | Simplifies the polygon and maintains the index location of the from/to point of each ring. | |
SimplifySpaghetti | Simplifies a polygon but doesn't assume that rings need to be explicitly closed. | |
Smooth | Converts this curve into a smooth curve containing only Bezier curve segments. | |
SnapToSpatialReference | Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. | |
SpatialReference | The spatial reference associated with this geometry. | |
SplitAtDistance | Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline. | |
SplitAtPoint | Introduces a new vertex into this polyline at the location on it closest to the input point. | |
ToPoint | The 'to' point of the curve. | |
Weed | Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box. |
IPolygon4.ConnectedComponentBag Property
Creates and returns a geometry bag containing polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original.
Public ReadOnly Property ConnectedComponentBag As IGeometryBag
public IGeometryBag ConnectedComponentBag {get;}
IPolygon4.ExteriorRingBag Property
Creates and returns a geometry bag that contains references to all exterior rings.
Public ReadOnly Property ExteriorRingBag As IGeometryBag
public IGeometryBag ExteriorRingBag {get;}
public static void PolygonToString(IPolygon4 polygon)
{
IGeometryBag exteriorRingGeometryBag = polygon.ExteriorRingBag;
IGeometryCollection exteriorRingGeometryCollection = exteriorRingGeometryBag as IGeometryCollection;
Trace.WriteLine("polygon.ExteriorRingCount = " + exteriorRingGeometryCollection.GeometryCount);
for (int i = 0; i < exteriorRingGeometryCollection.GeometryCount; i++)
{
Trace.WriteLine("polygon.ExteriorRing[" + i + "]");
IGeometry exteriorRingGeometry = exteriorRingGeometryCollection.get_Geometry(i);
IPointCollection exteriorRingPointCollection = exteriorRingGeometry as IPointCollection;
for (int j = 0; j < exteriorRingPointCollection.PointCount; j++)
{
Trace.WriteLine("Point[" + j + "] = " + PointToString(exteriorRingPointCollection.get_Point(j)));
}
IGeometryBag interiorRingGeometryBag = polygon.get_InteriorRingBag(exteriorRingGeometry as IRing);
IGeometryCollection interiorRingGeometryCollection = interiorRingGeometryBag as IGeometryCollection;
Trace.WriteLine("polygon.InteriorRingCount[exteriorRing" + i + "] = " + interiorRingGeometryCollection.GeometryCount);
for (int k = 0; k < interiorRingGeometryCollection.GeometryCount; k++)
{
Trace.WriteLine("polygon.InteriorRing[" + k + "]");
IGeometry interiorRingGeometry = interiorRingGeometryCollection.get_Geometry(k);
IPointCollection interiorRingPointCollection = interiorRingGeometry as IPointCollection;
for (int m = 0; m < interiorRingPointCollection.PointCount; m++)
{
Trace.WriteLine("Point[" + m + "] = " + PointToString(interiorRingPointCollection.get_Point(m)));
}
}
}
}
private static string PointToString(IPoint point)
{
return (point.X + ", " + point.Y + ", " + point.Z);
}
IPolygon4.InteriorRingBag Property
Creates and returns a geometry bag that contains references to all rings that are interior to the specified exterior ring.
Public Function get_InteriorRingBag ( _
ByVal exteriorRing As IRing _
) As IGeometryBag
public IGeometryBag get_InteriorRingBag (
IRing exteriorRing
);
public static void PolygonToString(IPolygon4 polygon)
{
IGeometryBag exteriorRingGeometryBag = polygon.ExteriorRingBag;
IGeometryCollection exteriorRingGeometryCollection = exteriorRingGeometryBag as IGeometryCollection;
Trace.WriteLine("polygon.ExteriorRingCount = " + exteriorRingGeometryCollection.GeometryCount);
for (int i = 0; i < exteriorRingGeometryCollection.GeometryCount; i++)
{
Trace.WriteLine("polygon.ExteriorRing[" + i + "]");
IGeometry exteriorRingGeometry = exteriorRingGeometryCollection.get_Geometry(i);
IPointCollection exteriorRingPointCollection = exteriorRingGeometry as IPointCollection;
for (int j = 0; j < exteriorRingPointCollection.PointCount; j++)
{
Trace.WriteLine("Point[" + j + "] = " + PointToString(exteriorRingPointCollection.get_Point(j)));
}
IGeometryBag interiorRingGeometryBag = polygon.get_InteriorRingBag(exteriorRingGeometry as IRing);
IGeometryCollection interiorRingGeometryCollection = interiorRingGeometryBag as IGeometryCollection;
Trace.WriteLine("polygon.InteriorRingCount[exteriorRing" + i + "] = " + interiorRingGeometryCollection.GeometryCount);
for (int k = 0; k < interiorRingGeometryCollection.GeometryCount; k++)
{
Trace.WriteLine("polygon.InteriorRing[" + k + "]");
IGeometry interiorRingGeometry = interiorRingGeometryCollection.get_Geometry(k);
IPointCollection interiorRingPointCollection = interiorRingGeometry as IPointCollection;
for (int m = 0; m < interiorRingPointCollection.PointCount; m++)
{
Trace.WriteLine("Point[" + m + "] = " + PointToString(interiorRingPointCollection.get_Point(m)));
}
}
}
}
private static string PointToString(IPoint point)
{
return (point.X + ", " + point.Y + ", " + point.Z);
}
IPolygon4.OutermostComponentBag Property
Creates and returns a geometry bag containing 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.
Public ReadOnly Property OutermostComponentBag As IGeometryBag
public IGeometryBag OutermostComponentBag {get;}
IPolygon4.SimplifyEx Method
Same as ITopologicalOperator::Simplify, but with some additional options that affect performance and how the interior is classified.
Public Sub SimplifyEx ( _
ByVal preserveFromToPoints As Boolean, _
ByVal closeRings As Boolean, _
ByVal useXORRule As Boolean _
)
public void SimplifyEx (
bool preserveFromToPoints,
bool closeRings,
bool useXORRule
);
Remarks
Parameters:
preserveFromToPoints: Boolean value that determines if the from/to points of a ring in the polygon need to remain located at ring indexes 0 and PointCount-1 af the completion of the operation. Specify 'false' to improve performance of this operation.
closeRings : Boolean value that determines if the rings of the polygon must be closed prior to reconstruct the topology of the polygon. Specify false if you know that rings are closed or you are passing in spaghetti input that should not be checked for closure.
useXORRule: Boolean value that determines how the 'inside' of the polygon is determined. Specify true to use an even-odd counting rule: a point is inside the polygon if a horizontal line through that has encountered an odd number of boundaries to the left (overlapping boundaries count 1 for each overlap). Use this when the input consists of well-defined rings that need to be oriented correctly, have overlaps removed, etc. Specify false to use the default behavior, which iterates over a two step process: dangle removal, then "peeling off" of the largest unambiguous rings. This approach can remove more segments than the XOR-true approach, but is probably more appropriate for spaghetti input where segment overlaps should not be considered significant.
Here is an example of the different between XOR=TRUE vs. XOR= FALSE:
Inherited Interfaces
Interfaces | Description |
---|---|
IPolygon3 | Provides access to members that extend the IPolygon2 interface. |
IPolygon2 | Provides access to members that extend the IPolygon interface. |
IPolygon | Provides access to members that identify a polygon and permit controlled access to its inner and outer rings. |
IPolycurve | Provides access to members that define operations common to polylines and the boundaries of polygons. |
ICurve | Provides access to properties and methods of all 1 dimensional curves (polylines, segments, boundaries of polygons, etc.). |
IGeometry | Provides access to members that describe properties and behavior of all geometric objects. |
Classes that implement IPolygon4
Classes | Description |
---|---|
Polygon | A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes. |