IPolycurve Interface

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

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.

Members

Name Description
Method Densify Converts this polycurve into a piecewise linear approximation of itself.
Read-only property Dimension The topological dimension of this geometry.
Read-only property Envelope Creates a copy of this geometry's envelope and returns it.
Read/write property FromPoint The 'from' point of the curve.
Method Generalize Generalizes this polycurve using the Douglas-Peucker algorithm.
Read-only property GeometryType The type of this geometry.
Method GeoNormalize Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method GeoNormalizeFromLongitude Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
Method GetSubcurve Extracts a portion of this curve into a new curve.
Read-only property IsClosed Indicates if 'from' and 'to' points (of each part) are identical.
Read-only property IsEmpty Indicates whether this geometry contains any points.
Read-only property Length The length of the curve.
Method Project Projects this geometry into a new spatial reference.
Method QueryEnvelope Copies this geometry's envelope properties into the specified envelope.
Method QueryFromPoint Copies this curve's 'from' point to the input point.
Method QueryNormal Constructs a line normal to a curve from a point at a specified distance along the curve.
Method QueryPoint Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
Method QueryPointAndDistance Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
Method QueryTangent Constructs a line tangent to a curve from a point at a specified distance along the curve.
Method QueryToPoint Copies the curve's 'to' point into the input point.
Method ReverseOrientation Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).
Method SetEmpty Removes all points from this geometry.
Method Smooth Converts this curve into a smooth curve containing only Bezier curve segments.
Method SnapToSpatialReference Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
Read/write property SpatialReference The spatial reference associated with this geometry.
Method SplitAtDistance Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.
Method SplitAtPoint Introduces a new vertex into this polyline at the location on it closest to the input point.
Read/write property ToPoint The 'to' point of the curve.
Method Weed Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.

IPolycurve.Densify Method

Converts this polycurve into a piecewise linear approximation of itself.

Public Sub Densify ( _
    ByVal maxSegmentLength As Double, _
    ByVal maxDeviation As Double _
)
public void Densify (
    double maxSegmentLength,
    double maxDeviation
);

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

IPolycurve.Generalize Method

Generalizes this polycurve using the Douglas-Peucker algorithm.

Public Sub Generalize ( _
    ByVal maxAllowableOffset As Double _
)
public void Generalize (
    double maxAllowableOffset
);

Description

Generalizes each part of a Polycurve into a generalized collection of Line segments. Generalize performs a Douglas-Peucker 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.Smooth Method

Converts this curve into a smooth curve containing only Bezier curve segments.

Public Sub Smooth ( _
    ByVal maxAllowableOffset As Double _
)
public void Smooth (
    double maxAllowableOffset
);

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

IPolycurve.SplitAtDistance Method

Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.

Public Sub SplitAtDistance ( _
    ByVal distance As Double, _
    ByVal asRatio As Boolean, _
    ByVal createPart As Boolean, _
    ByRef SplitHappened As Boolean, _
    ByRef newPartIndex As Integer, _
    ByRef newSegmentIndex As Integer _
)
public void SplitAtDistance (
    double distance,
    bool asRatio,
    bool createPart,
    ref bool SplitHappened,
    ref int newPartIndex,
    ref int newSegmentIndex
);

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 mustbe 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

IPolycurve.SplitAtPoint Method

Introduces a new vertex into this polyline at the location on it closest to the input point.

Public Sub SplitAtPoint ( _
    ByVal splitPoint As IPoint, _
    ByVal projectOnto As Boolean, _
    ByVal createPart As Boolean, _
    ByRef SplitHappened As Boolean, _
    ByRef newPartIndex As Integer, _
    ByRef newSegmentIndex As Integer _
)
public void SplitAtPoint (
    IPoint splitPoint,
    bool projectOnto,
    bool createPart,
    ref bool SplitHappened,
    ref int newPartIndex,
    ref int newSegmentIndex
);

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 mustbe 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

IPolycurve.Weed Method

Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.

Public Sub Weed ( _
    ByVal maxAllowableOffsetFactor As Double _
)
public void Weed (
    double maxAllowableOffsetFactor
);

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

Inherited Interfaces

Interfaces Description
ICurve Provides access to properties and methods of all 1 dimensional curves (polylines, segments, boundaries of polygons, etc.).
IGeometry Provides access to members that describe properties and behavior of all geometric objects.

Classes that implement IPolycurve

Classes Description
Polygon A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.
Polyline An ordered collection of paths; optionally has measure, height and ID attributes.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.