Geometry Service Densify method

Converts non-linear geometry to linear geometry. Adds vertices to linear geometry. Connects input vertices with densified approximations to geodesic paths between them.   
 

Densify(SpatialReference SpatialReference, Geometry[] InGeometryArray, double MaxSegmentLength, bool UseDeviationDensification, double DensificationParameter)

 

Parameter

Description

SpatialReference

The spatial reference of the geometries in the InGeometryArray. Cannot be null.

InGeometryArray

The array of Geometry to be densified. All geometries are assumed to be in the coordinate system spatial reference.

MaxSegmentLength

The maximum allowable length of a segment in densified geometry. See the remarks section below for specific details. 

UseDeviationDensification

Determines the method to use when densifying non-linear segments (curves). 

DensificationParameter

Either the central angle or maximum distance of a replacement segment from an input curve, depending on the UseDeviationDensification parameter.  See the remarks section below for specific details. 

 

Return Value

 

An array of Geometry (Geometry[]).  

 

Remarks

 
This method replaces each curve segment, and optionally each line segment, in a polyline or polygon with line segments.  Other types of input geometries will be ignored. All geometries are assumed to be in the SpatialReference provided which cannot be null.   If the input geometries have latitude-longitude coordinates, you should use the DensifyGeodesic method.

 

When maxSegmentLength is greater than zero, lines and curves greater than that length will be replaced with lines at most maxSegmentLength long, and curves shorter than that will be replaced with lines connecting their endpoints.  If maxSegmentLength is 0, then only curve segments will be densified, as explained below.  

  

In general, this method provides three ways to densify curves:

  1. based on length

  2. based on central angle

  3. based on maximum distance of replacement line from input curve (deviation)

 

The following table explains how the input parameters work together.
 

MaxSegmentLength is

And DeviationTolerance is

Then

>0

0

All segments longer than maxSegmentLength are replaced with sequences of lines no longer than maxSegmentLength. Curves shorter than maxSegmentLength are replaced with lines connecting the curve endpoints. This is method 1, above, for densifying curves.

 

0

>0

Input lines are copied to the output geometries. Input curves are densified using either method 2 or method 3, based on the value of the useDeviationDensification parameter.

 

>0

>0

Lines longer than maxSegmentLength units are replaced with sequences of lines no longer than maxSegmentLength; curves are replaced with sequences of lines using either method 2 or method 3, based on the value of the useDeviationDensification parameter.

 

 

When UseDeviationDensification is false the DensificationParameter is interpreted as a central angle, instead of a deviation.

 

Examples

C#

VB.NET

Java