Geometry Service GetLengths method

Calculates the length for each input polyline.

 

GetLengths(SpatialReference SpatialReference, Polyline[] InPolylineArray)

 

Parameter

Description

SpatialReference

The spatial reference of the geometries in InPolygonArray. This cannot be null.

InPolylineArray

The array of polylines on which the length will be calculated. All geometries are assumed to be in the coordinate system defined by SpatialReference

 

Return Value

 

An array of double values (double[]) containing the length of each Polyline in the input array.  
 

Remarks

 
The length values are computed in the units of the input spatial reference.
 
It is not recommended that this method be used on geometries having latitude-longitude coordinates, since the length would then be calculated in units of "degrees". You can use the GetLengthsGeodesic method to compute accurate lengths for polylines with latitude-longitude coordinates.

 

Examples

C#

VB.NET

Java