com.esri.arcgis.geometry
Interface IPath

All Superinterfaces:
ICurve, IGeometry, java.io.Serializable
All Known Subinterfaces:
IRing, IRing2
All Known Implementing Classes:
IPathProxy, IRing2Proxy, IRingProxy, Path, Ring

public interface IPath
extends ICurve, java.io.Serializable

Provides access to members that identify a path and define its behavior.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Description

A Path is a connected, continuous sequence of Segments.  Except for the first and last Segments in the Path, each segment shares its FromPoint with the ToPoint of the previous Segment, and shares its ToPoint with the FromPoint of the following Segment.

Remarks

The Segments composing the Path do not need to be homogenous in type.  A Ring is a Path that starts and ends on the same point and defines an area.  Paths are the part types in Polylines.

Valid Paths

See Also:
IPoint, IGeometry, ICurve

Method Summary
 void generalize(double maxAllowableOffset)
          Generalizes this path using the Douglas-Poiker algorithm.
 void queryChordLengthTangents(int pointIndex, IPoint prevTangent, boolean[] prevSetByUser, IPoint nextTangent, boolean[] nextSetByUser)
          Returns tangent vectors (relative to corresponding endpoint) at both sides of a Bezier end point; and whether they have been set by user or by smoothing process.
 void setChordLengthTangents(int pointIndex, IPoint prevTangent, IPoint nextTangent)
          Sets tangent vectors (relative to corresponding endpoint) at both sides of a Bezier end point; if either is Nothing, they will be set by smoothing process.
 void smooth(double maxAllowableOffset)
          Converts this path into a smooth approximation of itself that contains only Bezier curve segments.
 void smoothLocal(int vertexIndex)
          Replaces up to four segments (two on each of the specified vertex index) with bezier curves.
 
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

generalize

public void generalize(double maxAllowableOffset)
                throws java.io.IOException,
                       AutomationException
Generalizes this path using the Douglas-Poiker algorithm.

Supported Platforms

Windows, Solaris, Linux

Description

Generalizes the Path into a generalized collection of Line segments.  Generalize performs a Douglas-Poiker Generalization algorithm with a specified maximum offset tolerance given as input.  For Line segments, the Generalized output is a subset of the original input vertices.  For non-Linear segments, the Generalized output contains points along all parts of the curve, not necessarily only the vertices.

Remarks

For a path with non-linear segments, the output curve may contain more vertices than the input curve, but all output segments will be linear.

IPath Generalize Example

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

smooth

public void smooth(double maxAllowableOffset)
            throws java.io.IOException,
                   AutomationException
Converts this path into a smooth approximation of itself that contains only Bezier curve segments.

Supported Platforms

Windows, Solaris, Linux

Description

Converts the Path into a Path containing only BezierCurve segments.  The created BezierCurve path is a Generalization of the original path that has a maximum deviation of maxDeviation from the original path.  If maxDeviation = 0, all of the original vertices are maintained.  At each vertex, the adjoining BezierCurves have complementary tangents which creates a continuous (smooth) transition between segments.

Remarks

 

IPath Smooth Example

Parameters:
maxAllowableOffset - The maxAllowableOffset (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IBezierCurve

smoothLocal

public void smoothLocal(int vertexIndex)
                 throws java.io.IOException,
                        AutomationException
Replaces up to four segments (two on each of the specified vertex index) with bezier curves.

Supported Platforms

Windows, Solaris, Linux

Description

Converts segments containing the indexed vertex into BezierCurves and performs a smoothing operation only at the two segments on either side of the input vertex.  The created BezierCurves have complementary tangents at the indexed vertex.

Remarks

 

IPath SmoothLocal Example

Parameters:
vertexIndex - The vertexIndex (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IBezierCurve

queryChordLengthTangents

public void queryChordLengthTangents(int pointIndex,
                                     IPoint prevTangent,
                                     boolean[] prevSetByUser,
                                     IPoint nextTangent,
                                     boolean[] nextSetByUser)
                              throws java.io.IOException,
                                     AutomationException
Returns tangent vectors (relative to corresponding endpoint) at both sides of a Bezier end point; and whether they have been set by user or by smoothing process.

Supported Platforms

Windows, Solaris, Linux

Parameters:
pointIndex - The pointIndex (in)
prevTangent - A reference to a com.esri.arcgis.geometry.IPoint (in)
prevSetByUser - The prevSetByUser (in/out: use single element array)
nextTangent - A reference to a com.esri.arcgis.geometry.IPoint (in)
nextSetByUser - The nextSetByUser (in/out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setChordLengthTangents

public void setChordLengthTangents(int pointIndex,
                                   IPoint prevTangent,
                                   IPoint nextTangent)
                            throws java.io.IOException,
                                   AutomationException
Sets tangent vectors (relative to corresponding endpoint) at both sides of a Bezier end point; if either is Nothing, they will be set by smoothing process.

Parameters:
pointIndex - The pointIndex (in)
prevTangent - A reference to a com.esri.arcgis.geometry.IPoint (in)
nextTangent - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.