com.esri.arcgis.geometry
Interface ISegment

All Superinterfaces:
ICurve, IGeometry, Serializable
All Known Subinterfaces:
ITopologicalSegment, ITopologicalSegment2
All Known Implementing Classes:
BezierCurve, CircularArc, EllipticArc, ISegmentProxy, ITopologicalSegment2Proxy, ITopologicalSegmentProxy, Line

public interface ISegment
extends ICurve, Serializable

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
ICircularArc, ICurve, IEllipticArc, IBezierCurve, ILine, ISegment

Method Summary
 void densify(int cInSlots, double maxDeviation, int[] pcOutSegments, ILine[] segments)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.densify(com.esri.arcgis.geometry.ISegment, double, int[], com.esri.arcgis.geometry.ILine[][]).
 void geographicShift(double splitLongitude)
          Shift longitudes to the right of splitLongitude.
 void queryCurvature(double distanceAlongCurve, boolean asRatio, double[] curvature, ILine unitVector)
          Finds curvature and unit vector starting at point on segment and directed to embedded circle center.
 int returnTurnDirection(ISegment otherSegment)
          Finds turn direction between two connected segments.
 void splitAtDistance(double distances, boolean asRatio, ISegment[] fromSegment, ISegment[] toSegment)
          Split segment at specified distance.
 void splitDivideLength(double offset, double length, boolean asRatio, int[] numSplitSegments, ISegment splitSegments)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.splitDivideLength(com.esri.arcgis.geometry.ISegment, double, double, boolean, int[], com.esri.arcgis.geometry.ISegment[][]).
 
Methods inherited from interface com.esri.arcgis.geometry.ICurve
getFromPoint, getLength, getSubcurve, getToPoint, isClosed, queryFromPoint, queryNormal, queryPoint, queryPointAndDistance, queryTangent, queryToPoint, reverseOrientation, setFromPoint, setToPoint
 
Methods inherited from interface com.esri.arcgis.geometry.IGeometry
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 

Method Detail

queryCurvature

void queryCurvature(double distanceAlongCurve,
                    boolean asRatio,
                    double[] curvature,
                    ILine unitVector)
                    throws IOException,
                           AutomationException
Finds curvature and unit vector starting at point on segment and directed to embedded circle center.

Description

Returns the curvature at a specified distance along the segment. The distance can be given explicitly or as a ratio of the entire length of the segment. The curvature is returned as a Line representing a directional unit vector (in the direction going from the From Point to the To Point) and a double representing the magnitude of the vector of curvature.

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
distanceAlongCurve - The distanceAlongCurve (in)
asRatio - The asRatio (in)
curvature - The curvature (out: use single element array)
unitVector - A reference to a com.esri.arcgis.geometry.ILine (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

returnTurnDirection

int returnTurnDirection(ISegment otherSegment)
                        throws IOException,
                               AutomationException
Finds turn direction between two connected segments.

Description

Returns the Turn Direction of the Segment immediately following the current Segment. The two segments must be connected between the To Point of the first segment and the From Point of the second segment. ReturnTurnDirection returns a long corresponding to an esriTurnDirectionEnum or a combination of esriNoTurn or esriUTurn and esriRightTurn or esriLeftTurn. If the two segments are tangential at the point of connection and not completely colinear, then a combination of esriTurnDirectionEnums are returned.

Remarks

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

ReturnTurnDirection Example

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
otherSegment - A reference to a com.esri.arcgis.geometry.ISegment (in)
Returns:
The turnDirection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitAtDistance

void splitAtDistance(double distances,
                     boolean asRatio,
                     ISegment[] fromSegment,
                     ISegment[] toSegment)
                     throws IOException,
                            AutomationException
Split segment at specified distance.

Description

Splits the input Segment at the given distance and returns the Segment between the original From Point and the split point as well as the Segment between the split point and the original To Point. The split distance may be specified as a ratio of the total distance if AsRatio = TRUE, otherwise the distance is in the same units as the Length of the Segment.

Remarks

SplitAtDistance Example

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
distances - The distances (in)
asRatio - The asRatio (in)
fromSegment - A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)
toSegment - A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitDivideLength

void splitDivideLength(double offset,
                       double length,
                       boolean asRatio,
                       int[] numSplitSegments,
                       ISegment splitSegments)
                       throws IOException,
                              AutomationException
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.splitDivideLength(com.esri.arcgis.geometry.ISegment, double, double, boolean, int[], com.esri.arcgis.geometry.ISegment[][]).

Divide segment into smaller segments of the specified length.

Description

Outputs an array of Segments of a desired input length starting at an offset distance along the curve and continuing until the end of the Segment is reached. The offset and length may be specified as a ratio of the total length of the Segment. SplitDivideLength outputs an array of Segments and the number of Segments in that array. All of the output Segments in the array have the desired input length with the exception of the final Segment which has a length less than or equal to the input length (the remainder of the Segment).

Remarks

SplitDivideLength Example

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
offset - The offset (in)
length - The length (in)
asRatio - The asRatio (in)
numSplitSegments - The numSplitSegments (in)
splitSegments - A reference to a com.esri.arcgis.geometry.ISegment (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

densify

void densify(int cInSlots,
             double maxDeviation,
             int[] pcOutSegments,
             ILine[] segments)
             throws IOException,
                    AutomationException
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.densify(com.esri.arcgis.geometry.ISegment, double, int[], com.esri.arcgis.geometry.ILine[][]).

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

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
cInSlots - The cInSlots (in)
maxDeviation - The maxDeviation (in)
pcOutSegments - The pcOutSegments (out: use single element array)
segments - A reference to a com.esri.arcgis.geometry.ILine (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geographicShift

void geographicShift(double splitLongitude)
                     throws IOException,
                            AutomationException
Shift longitudes to the right of splitLongitude. This method is obsolete.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
splitLongitude - The splitLongitude (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.