com.esri.arcgis.geometry
Interface IPolycurve

All Superinterfaces:
ICurve, IGeometry, Serializable
All Known Subinterfaces:
IPolycurve2, IPolycurve3, IPolygon, IPolygon2, IPolygon3, IPolygon4, IPolyline, IPolyline2, IPolyline3, IPolyline4, IPolyline5, IPolyline6
All Known Implementing Classes:
IPolycurve2Proxy, IPolycurve3Proxy, IPolycurveProxy, IPolyline2Proxy, IPolyline3Proxy, IPolyline4Proxy, IPolyline5Proxy, IPolyline6Proxy, IPolylineProxy, Polygon, Polyline

public interface IPolycurve
extends ICurve, Serializable

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

Superseded By

IPolycurve3

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.

Product Availability

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

See Also:
IPolycurve, IPoint, ICurve, IPolygon, IGeometry, IPolycurve2, IPolyline

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

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

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

generalize

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

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

weed

void weed(double maxAllowableOffsetFactor)
          throws 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.

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

smooth

void smooth(double maxAllowableOffset)
            throws IOException,
                   AutomationException
Converts this curve into a smooth curve containing only Bezier curve segments.

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
maxAllowableOffset - The maxAllowableOffset (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPath.smooth(double), IPath.smoothLocal(int), IBezierCurve, IPolycurve.smooth(double)

splitAtPoint

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

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitAtDistance

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

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.