com.esri.arcgis.geometry
Interface IPolycurve

All Superinterfaces:
ICurve, IGeometry, java.io.Serializable
All Known Subinterfaces:
IPolycurve2, IPolycurve3, IPolygon, IPolygon2, IPolygon3, IPolygon4, IPolyline, IPolyline2, IPolyline3, IPolyline4
All Known Implementing Classes:
IPolycurve2Proxy, IPolycurve3Proxy, IPolycurveProxy, IPolygon2Proxy, IPolygon3Proxy, IPolygon4Proxy, IPolygonProxy, IPolyline2Proxy, IPolyline3Proxy, IPolyline4Proxy, IPolylineProxy, Polygon, Polyline

public interface IPolycurve
extends ICurve, java.io.Serializable

Provides access to members that define operations common to polylines and the boundaries of polygons.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Description

A polycurve is a collection of many curves that form a single curve.  A polycurve can be composed of single segments, connected paths, closed rings, or a combination of various curve types.  The paths and segments within a polycurve do not need to be connected to each other.  A polycurve may also contain a single segment or path.

See Also:
IGeometry, IPoint, ICurve

Method Summary
 void densify(double maxSegmentLength, double maxDeviation)
          Converts this polycurve into a piecewise linear approximation of itself.
 void generalize(double maxAllowableOffset)
          Generalizes this polycurve using the Douglas-Poiker algorithm.
 void smooth(double maxAllowableOffset)
          Converts this curve into a smooth curve containing only Bezier curve segments.
 void splitAtDistance(double distance, boolean asRatio, boolean createPart, boolean[] splitHappened, int[] newPartIndex, int[] newSegmentIndex)
          Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.
 void splitAtPoint(IPoint splitPoint, boolean projectOnto, boolean createPart, boolean[] splitHappened, int[] newPartIndex, int[] newSegmentIndex)
          Introduces a new vertex into this polyline at the location on it closest to the input point.
 void weed(double maxAllowableOffsetFactor)
          Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.
 
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

densify

public void densify(double maxSegmentLength,
                    double maxDeviation)
             throws java.io.IOException,
                    AutomationException
Converts this polycurve into a piecewise linear approximation of itself.

Supported Platforms

Windows, Solaris, Linux

Description

Converts Polycurve into a Polycurve composed of Line segments with length maxSegmentLength (or less) that are within maxDeviation of the original polycurve.  If maxDeviation = 0, maxDeviation is ignored and Line segments with length maxSegmentLength are constructed with vertices laying on the original curve.  All of the segments in the final polyline will be Lines.

Remarks

If the maxSegmentLength is negative IGeometryEnvironment::AutoDensifyTolerance is used. IGeometryEnvironment::AutoDensifyTolerance default value is 0. This value can be explicitly set via IGeometryEnvironment::AutoDensifyTolerance.

If the maxDeviation is negative IGeometryEnvironment::DeviationAutoDensifyTolerance is used. The default value is 2*XYResolution * 100 (2/XYUnits * 100). This value can be explicitly set via IGeometryEnvironment::DeviationAutoDensifyTolerance.

In order to avoid the creation of too many segments,  the geometry system uses a maxdeviation = 2*xyResolution * 100 as default value if maxSegmentLength is 0 and the maxDeviation is 0.

If the maxDeviation is positive but smaller than 2*XYResolution of the spatial reference then the maxDeviation used is 2*XYResolution * 100

NOTE: The default values given in this topic are subject to change without notice. If specific values want to be maintained we recommend using the methods on IGeometryEnvironment to set those explicitly.

The start and end points are always honored and remain the same as for the original feature.

Polycurve Densify Example

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

generalize

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

Supported Platforms

Windows, Solaris, Linux

Description

Generalizes each part of a Polycurve 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 polycurve with non-linear segments, the output curve may contain more vertices than the input curve, but all output segments will be linear.

IPolycurve Generalize Example

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

weed

public void weed(double maxAllowableOffsetFactor)
          throws java.io.IOException,
                 AutomationException
Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.

Supported Platforms

Windows, Solaris, Linux

Description

Weed Generalizes each part of a Polycurve into a generalized collection of Line segments.  Weed performs a Douglas-Poiker Generalization algorithm with a specified multiple of the internal 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 polycurve with non-linear segments, the output curve may contain more vertices than the input curve, but all output segments will be linear.

Weed(X) = Generalize(X * InternalTolerance)

IPolycurve Weed Example

Parameters:
maxAllowableOffsetFactor - The maxAllowableOffsetFactor (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 curve into a smooth curve containing only Bezier curve segments.

Supported Platforms

Windows, Solaris, Linux

Description

Converts the Polycurve into a Polycurve containing only BezierCurve segments. If the maxAllowableOffset parameter is zero, each segment of the input Polycurve becomes a separate Bezier curve. If maxAllowableOffset if greater than zero, the polycurve is generalized first by the Douglas-Poiker method using the maxAllowableOffset value. Bezier curves are then created for each of the remaining segments. The created BezierCurve polycurve is an approximation of the original polycurve. At each vertex, the adjoining BezierCurves have complementary tangents which creates a continuous (smooth) transition between segments.

As an alternative, compare IConstructCurve2::ApproximateByBeziers.

Remarks

 

IPolycurve 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

splitAtPoint

public void splitAtPoint(IPoint splitPoint,
                         boolean projectOnto,
                         boolean createPart,
                         boolean[] splitHappened,
                         int[] newPartIndex,
                         int[] newSegmentIndex)
                  throws java.io.IOException,
                         AutomationException
Introduces a new vertex into this polyline at the location on it closest to the input point.

Supported Platforms

Windows, Solaris, Linux

Description

Adds a new vertex along the curve as the specified input point, or the projection onto the curve of the specified input point.

Remarks

projectOnto is an input parameter that determines if the output point will be located on the polycurve. If projectOnto is true and the input point is not already on the polycurve then the point is projected on the curve.

createPart is an input parameter that determines if parts (paths) have to be created. createPart must be FALSE for polygons.  For polylines, if createPart is TRUE, the part on which the new split point falls is split into two parts with the newly added vertex serving as the end of the first part and the beginning of the second.

SplitHappened is an output parameter that tells if the polycurve has been split or not.

newPartIndex is an output parameter that tells on which part (ring or path) the point has been introduced.

newSegmentIndex is an output parameter that tells what is the index of the new created segment. That index is zero based and part relative (start at 0 for each part).

 

SplitAtPoint Example

Parameters:
splitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
projectOnto - The projectOnto (in)
createPart - The createPart (in)
splitHappened - The splitHappened (out: use single element array)
newPartIndex - The newPartIndex (out: use single element array)
newSegmentIndex - The newSegmentIndex (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitAtDistance

public void splitAtDistance(double distance,
                            boolean asRatio,
                            boolean createPart,
                            boolean[] splitHappened,
                            int[] newPartIndex,
                            int[] newSegmentIndex)
                     throws java.io.IOException,
                            AutomationException
Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.

Supported Platforms

Windows, Solaris, Linux

Description

Adds a new vertex point to the curve at a specified distance from the From point of the curve.  For a split to happen, the split distance must be between the From and To points of the polycurve.

Remarks

CreatePart must be FALSE for polygons.  For polylines, if CreatePart is TRUE, the part on which the new split point falls is split into two parts with the newly added vertex serving as the end of the first part and the beginning of the second.

 

SplitAtDistance Example

Parameters:
distance - The distance (in)
asRatio - The asRatio (in)
createPart - The createPart (in)
splitHappened - The splitHappened (out: use single element array)
newPartIndex - The newPartIndex (out: use single element array)
newSegmentIndex - The newSegmentIndex (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.