Interface IRing

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

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

esriGeometryDimension

Envelope

IEnvelope Envelope { get; }

Property Value

IEnvelope

FromPoint

IPoint FromPoint { get; set; }

Property Value

IPoint

GeometryType

esriGeometryType GeometryType { get; }

Property Value

esriGeometryType

IsClosed

bool IsClosed { get; }

Property Value

bool

IsEmpty

bool IsEmpty { get; }

Property Value

bool

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

bool

Remarks

 

Ring IsExterior Example

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

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

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

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

fromDistance double
toDistance double
asRatio bool
isCCW bool
useRingOrientation bool

Returns

ICurve

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.

[C#]

    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

newReferenceSystem ISpatialReference

QueryChordLengthTangents(int, IPoint, ref bool, IPoint, ref bool)

void QueryChordLengthTangents(int pointIndex, IPoint prevTangent, ref bool prevSetByUser, IPoint nextTangent, ref bool nextSetByUser)

Parameters

pointIndex int
prevTangent IPoint
prevSetByUser bool
nextTangent IPoint
nextSetByUser bool

QueryEnvelope(IEnvelope)

void QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

QueryFromPoint(IPoint)

void QueryFromPoint(IPoint from)

Parameters

from IPoint

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

Reshape(IPath)

Modifies this ring by replacing some of its segments with some segments from reshapeSource.

bool Reshape(IPath reshapeSource)

Parameters

reshapeSource IPath

Returns

bool

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

pointIndex int
prevTangent IPoint
nextTangent IPoint

SetEmpty()

void SetEmpty()

Smooth(double)

void Smooth(double maxAllowableOffset)

Parameters

maxAllowableOffset double

SmoothLocal(int)

void SmoothLocal(int vertexIndex)

Parameters

vertexIndex int

SnapToSpatialReference()

void SnapToSpatialReference()