Interface IRing
Provides access to members that identify a ring and define its behavior.
[Guid("592121AE-4CC8-11D1-834E-0000F8775BE9")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IRing : IPath, ICurve, IGeometry
Properties
Dimension
esriGeometryDimension Dimension { get; }
Property Value
Envelope
IEnvelope Envelope { get; }
Property Value
FromPoint
IPoint FromPoint { get; set; }
Property Value
GeometryType
esriGeometryType GeometryType { get; }
Property Value
IsClosed
bool IsClosed { get; }
Property Value
IsEmpty
bool IsEmpty { get; }
Property Value
IsExterior
Indicates if this ring can function as the exterior ring in a polygon (ring orientation is clockwise, area > 0).
bool IsExterior { get; }
Property Value
Remarks

Length
double Length { get; }
Property Value
SpatialReference
ISpatialReference SpatialReference { get; set; }
Property Value
ToPoint
IPoint ToPoint { get; set; }
Property Value
Methods
Close()
Makes sure that this ring is closed by adding a line segment between the ring's 'to' and 'from' points if necessary.
void Close()
Remarks
This method should generally not be called in a 3D context, due to the fact that Close() only compares X and Y and not Z vertex values. Instead, the first point in the point collection should be manually re-added as the last point in the point collection to close the geometry.
Generalize(double)
void Generalize(double maxAllowableOffset)
Parameters
maxAllowableOffsetdouble
GeoNormalize()
void GeoNormalize()
GeoNormalizeFromLongitude(double)
void GeoNormalizeFromLongitude(double Longitude)
Parameters
Longitudedouble
GetSubcurve(double, double, bool, out ICurve)
void GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)
Parameters
GetSubcurveEx(double, double, bool, bool, bool)
Extracts a portion of this curve into a new curve. The interior of the new curve may contain the from/to point of the ring when useRingOrientation is true.
ICurve GetSubcurveEx(double fromDistance, double toDistance, bool asRatio, bool isCCW, bool useRingOrientation)
Parameters
Returns
Remarks
Parameters description:
fromDistance: (Input) A double that represents the distance along the curve which will define one of the subcurve's endpoints. The value can be positive or negative.
toDistance: (Input) A double that represents the distance along the curve which will define the other endpoint of the subcurve. The value can be positive or negative.
If the fromDistance and toDistance values are equal, the output is a closed path with fromPoint and toPoint of the path at the specified distance. The orientation may be reversed, depending upon the other parameter settings.
asRatio: (Input) A boolean value that determines whether or not the input distances are interpreted as a ratio of the total length. If 'True', a fromDistance of 0 is at the beginning of the curve and a toDistance of 1 represents the end of the curve.
isCCW: (Input) A boolean expression that decides which of the two possible paths fromfromDistance to toDistance is chosen for output: counter-clockwise or not. This does not decide the orientation of the output path.
useRingOrientation: (Input) A boolean that determines whether the output path should follow the ring orientation or not. If bUseRingOrientation is true, the output subcurve must have the same orientation as the ring, even if it means that the subcurve starts at toDistance and ends at fromDistance. If bUseRingOrientation is false, the output subcurve always starts at fromDistance and ends at toDistance; it may have the opposite orientation as the original ring.
private void PrintSubcurveProperties(IRing ring, bool asRatio, bool isCCW, bool useRingOrientation)
{
String report = "asRatio = " + asRatio + ", isCCW = " + isCCW + ", useRingOrientation= " + useRingOrientation + "\n";
double totalDistance = ring.Length;
for (int distance = 0; distance < totalDistance; distance = (int)(distance + (totalDistance / 10)))
{
double fromDistance = distance / totalDistance;
double toDistance = (distance + (totalDistance / 10)) / totalDistance;
ICurve outCurve = ring.GetSubcurveEx(fromDistance, toDistance, asRatio, isCCW, useRingOrientation);
report = report + "From distance : " + fromDistance + "\n";
report = report + "To distance : " + toDistance + "\n";
report = report + "From X, Y : " + outCurve.FromPoint.X + " , " + outCurve.FromPoint.Y + "\n";
report = report + "To X, Y : " + outCurve.ToPoint.X + " , " + outCurve.ToPoint.Y + "\n";
report = report + "Curve Length : " + outCurve.Length + "\n\n";
}
System.Windows.Forms.MessageBox.Show(report);
}
Project(ISpatialReference)
void Project(ISpatialReference newReferenceSystem)
Parameters
newReferenceSystemISpatialReference
QueryChordLengthTangents(int, IPoint, ref bool, IPoint, ref bool)
void QueryChordLengthTangents(int pointIndex, IPoint prevTangent, ref bool prevSetByUser, IPoint nextTangent, ref bool nextSetByUser)
Parameters
QueryEnvelope(IEnvelope)
void QueryEnvelope(IEnvelope outEnvelope)
Parameters
outEnvelopeIEnvelope
QueryFromPoint(IPoint)
void QueryFromPoint(IPoint from)
Parameters
fromIPoint
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
Reshape(IPath)
Modifies this ring by replacing some of its segments with some segments from reshapeSource.
bool Reshape(IPath reshapeSource)
Parameters
reshapeSourceIPath
Returns
Remarks
To Reshape a Polygon, the Polygon must be Reshaped one Ring at a time.
ReverseOrientation()
void ReverseOrientation()
SetChordLengthTangents(int, IPoint, IPoint)
void SetChordLengthTangents(int pointIndex, IPoint prevTangent, IPoint nextTangent)
Parameters
SetEmpty()
void SetEmpty()
Smooth(double)
void Smooth(double maxAllowableOffset)
Parameters
maxAllowableOffsetdouble
SmoothLocal(int)
void SmoothLocal(int vertexIndex)
Parameters
vertexIndexint
SnapToSpatialReference()
void SnapToSpatialReference()