Interface ISegment

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

Provides access to members that identify a segment. A segment is a way of getting between two endpoints.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("F2C4F0DE-C5AE-11D0-8307-0000F8034032")]
public interface ISegment : 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

Length

double Length { get; }

Property Value

double

SpatialReference

ISpatialReference SpatialReference { get; set; }

Property Value

ISpatialReference

ToPoint

IPoint ToPoint { get; set; }

Property Value

IPoint

VertexAttributeAware[esriGeometryAttributes]

Indicates if the segment is aware of the specified attribute type.

bool VertexAttributeAware[esriGeometryAttributes attributeType] { get; set; }

Parameters

attributeType esriGeometryAttributes

Property Value

bool

Methods

ConvertDistanceMeasureToRatio(double, ref double)

Converts the distance measure to a ratio of the total distance.

void ConvertDistanceMeasureToRatio(double distanceMeasure, ref double distanceRatio)

Parameters

distanceMeasure double
distanceRatio double

Densify(int, double, out int, out ILine)

Densify segment into the specified number of smaller segments. This method is intended for internal use only.

void Densify(int cInSlots, double maxDeviation, out int pcOutSegments, out ILine segments)

Parameters

cInSlots int
maxDeviation double
pcOutSegments int
segments ILine

Remarks

Densifying individual segments can be accomplished in client code by add the segment to a temporary polyline, then densifying the polyline using one of the methods on IPolycurve. Alternatively, the IGeometryBridge interface on the GeometryEnvironment object can be used.

[C#]

When using C# you must use the IGeometryBridge interface to call this method.

[Visual Basic .NET]

When using VBNET you must use the IGeometryBridge interface to call this method.

EnvelopeIntersection(IEnvelope, bool, ref double, ref double, ref int, out int)

Finds intersections with clipping envelope; boundaryOverlap is ignored for non-linear segments.

void EnvelopeIntersection(IEnvelope intersectionEnvelope, bool boundaryOverlap, ref double segmentParams, ref double envelopeDistances, ref int numIntersections, out int outcode)

Parameters

intersectionEnvelope IEnvelope
boundaryOverlap bool
segmentParams double
envelopeDistances double
numIntersections int
outcode int

GeoNormalize()

void GeoNormalize()

GeoNormalizeFromLongitude(double)

void GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

GeographicShift(double)

Shift longitudes to the right of splitLongitude. This method is obsolete.

void GeographicShift(double splitLongitude)

Parameters

splitLongitude double

GetDistanceAtVertexAttribute(esriGeometryAttributes, double, bool)

Gets the distance corresponding to the attribute value along the segment.

double GetDistanceAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, bool asRatio)

Parameters

attributeType esriGeometryAttributes
attributeValue double
asRatio bool

Returns

double

GetPointsAtVertexAttribute(esriGeometryAttributes, double, double, out IPointCollection)

Gets the point at the location corresponding to the attribute value.

void GetPointsAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, double lateralOffset, out IPointCollection outPoints)

Parameters

attributeType esriGeometryAttributes
attributeValue double
lateralOffset double
outPoints IPointCollection

GetSubSegmentBetweenVertexAttributes(esriGeometryAttributes, double, double, out ISegment)

Gets the segment corresponding to the extent along the segment between the 'from' and 'to' attribute values.

void GetSubSegmentBetweenVertexAttributes(esriGeometryAttributes attributeType, double fromAttribute, double toAttribute, out ISegment outSegment)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double
outSegment ISegment

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

GetVertexAttributeAtDistance(esriGeometryAttributes, double, bool)

Gets the attribute value corresponding to the distance along the segment.

double GetVertexAttributeAtDistance(esriGeometryAttributes attributeType, double distance, bool asRatio)

Parameters

attributeType esriGeometryAttributes
distance double
asRatio bool

Returns

double

HasVertexAttributes(esriGeometryAttributes, out bool, out bool)

Returns two booleans telling if the segment as from attribute and to attribute values.

void HasVertexAttributes(esriGeometryAttributes attributeType, out bool hasFromAttribute, out bool hasToAttribute)

Parameters

attributeType esriGeometryAttributes
hasFromAttribute bool
hasToAttribute bool

HorizontalIntersectionCount(ref WKSPoint, out bool)

Returns the number of horizontal intersections.

int HorizontalIntersectionCount(ref WKSPoint p, out bool pointOnLine)

Parameters

p WKSPoint
pointOnLine bool

Returns

int

InterpolateVertexAttributes(double, bool, IPoint)

Interpolates Z and M values at distanceAlongSegment and stores the results at point.

void InterpolateVertexAttributes(double distanceAlongSegment, bool asRatio, IPoint atPoint)

Parameters

distanceAlongSegment double
asRatio bool
atPoint IPoint

MaxDistanceFromLine(ref WKSPoint, ref WKSPoint, double, double, double, ref double, ref double, ref WKSPoint)

Returns the maximum distance from the line.

void MaxDistanceFromLine(ref WKSPoint baseFrom, ref WKSPoint baseTo, double minOffset, double fromArcDistance, double toArcDistance, ref double maxOffset, ref double atArcDistance, ref WKSPoint farPoint)

Parameters

baseFrom WKSPoint
baseTo WKSPoint
minOffset double
fromArcDistance double
toArcDistance double
maxOffset double
atArcDistance double
farPoint WKSPoint

Project(ISpatialReference)

void Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

PutAttributes(bool, bool, ref esriPointAttributes, ref esriPointAttributes)

Sets some attributes from this point and copies them to another point. Awareness is not considered.

void PutAttributes(bool PutAttributes, bool putAwareness, ref esriPointAttributes from, ref esriPointAttributes to)

Parameters

PutAttributes bool
putAwareness bool
from esriPointAttributes
to esriPointAttributes

PutVertexAttributes(esriGeometryAttributes, double, double)

Sets the 'from' and the 'to' attribute values.

void PutVertexAttributes(esriGeometryAttributes attributeType, double fromAttribute, double toAttribute)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double

QueryAreaCorrection(out double)

Queries the area correction value.

void QueryAreaCorrection(out double areaCorrection)

Parameters

areaCorrection double

QueryAttributes(bool, bool, ref esriPointAttributes, ref esriPointAttributes)

Gets some attributes from this point and copies them to another point. Awareness is not considered.

void QueryAttributes(bool getAttributes, bool getAwareness, ref esriPointAttributes from, ref esriPointAttributes to)

Parameters

getAttributes bool
getAwareness bool
from esriPointAttributes
to esriPointAttributes

QueryCentroidCorrection(ref double, ref double, ref double)

Queries the centroid correction value.

void QueryCentroidCorrection(ref double weightedCentroidX, ref double weightedCentroidY, ref double areaCorrection)

Parameters

weightedCentroidX double
weightedCentroidY double
areaCorrection double

QueryCurvature(double, bool, out double, ILine)

Finds curvature and unit vector starting at point on segment and directed to embedded circle center.

void QueryCurvature(double DistanceAlongCurve, bool asRatio, out double curvature, ILine unitVector)

Parameters

DistanceAlongCurve double
asRatio bool
curvature double
unitVector ILine

Remarks

The unit vector returned by QueryCurvature points toward the center of the circle that has the same first and second derivative at the queried point with a curvature value equal to 1 / Radius of that circle.

QueryCurvature Example

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

QueryVertexAttributes(esriGeometryAttributes, out double, out double)

Gets the 'from' and the 'to' attribute values.

void QueryVertexAttributes(esriGeometryAttributes attributeType, out double fromAttribute, out double toAttribute)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double

QueryWKSEnvelope(ref WKSEnvelope)

Queries the WKS Envelope.

void QueryWKSEnvelope(ref WKSEnvelope Envelope)

Parameters

Envelope WKSEnvelope

QueryWKSFromPoint(out WKSPoint)

Query the WKSPoint at the 'from' point.

void QueryWKSFromPoint(out WKSPoint p)

Parameters

p WKSPoint

QueryWKSToPoint(out WKSPoint)

Query the WKSPoint at the 'to' point.

void QueryWKSToPoint(out WKSPoint p)

Parameters

p WKSPoint

ReturnTurnDirection(ISegment)

Finds turn direction between two connected segments.

int ReturnTurnDirection(ISegment otherSegment)

Parameters

otherSegment ISegment

Returns

int

Remarks

ReturnTurnDirection is only available for Lines and CircularArcs, not BezierCurves or EllipticArcs.

ReturnTurnDirection Example

ReverseOrientation()

void ReverseOrientation()

SetEmpty()

void SetEmpty()

SnapToSpatialReference()

void SnapToSpatialReference()

SplitAtDistance(double, bool, out ISegment, out ISegment)

Split segment at specified distance.

void SplitAtDistance(double distances, bool asRatio, out ISegment fromSegment, out ISegment toSegment)

Parameters

distances double
asRatio bool
fromSegment ISegment
toSegment ISegment

Remarks

 

SplitAtDistance Example

SplitAtVertexAttribute(esriGeometryAttributes, double, out ISegment, out ISegment)

Splits the segment in two segments at the location corresponding to the attribute value.

void SplitAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, out ISegment fromSegment, out ISegment toSegment)

Parameters

attributeType esriGeometryAttributes
attributeValue double
fromSegment ISegment
toSegment ISegment

SplitDivideLength(double, double, bool, ref int, ref ISegment)

Divide segment into smaller segments of the specified length.

void SplitDivideLength(double Offset, double Length, bool asRatio, ref int numSplitSegments, ref ISegment splitSegments)

Parameters

Offset double
Length double
asRatio bool
numSplitSegments int
splitSegments ISegment

Remarks

 

SplitDivideLength Example

[C#]

When using C# you must use the IGeometryBridge interface to call this method.

[Visual Basic .NET]

When using VBNET you must use the IGeometryBridge interface to call this method.

SynchronizeEmptyAttributes(ISegment)

Synchronize Empty Attributes.

void SynchronizeEmptyAttributes(ISegment toSegment)

Parameters

toSegment ISegment

VertexAttributeOn(esriGeometryAttributes, double)

Indicates if attributeValue is located on this segment.

int VertexAttributeOn(esriGeometryAttributes attributeType, double attributeValue)

Parameters

attributeType esriGeometryAttributes
attributeValue double

Returns

int