This document is archived and information here might be outdated.  Recommended version.


IPolycurve.Densify Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IPolycurve.Densify Method

Converts this polycurve into a piecewise linear approximation of itself.

[Visual Basic .NET]
Public Sub Densify ( _
    ByVal maxSegmentLength As Double, _
    ByVal maxDeviation As Double _
)
[C#]
public void Densify (
    double maxSegmentLength,
    double maxDeviation
);
[C++]
HRESULT Densify(
  double maxSegmentLength,
  double maxDeviation
);
[C++]

Parameters maxSegmentLength maxSegmentLength is a parameter of type double maxDeviation maxDeviation is a parameter of type double

Product Availability

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

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

See Also

IPolycurve Interface