Geometry Service GetLengthsGeodesic method

Calculates the geodesic length for each input polyline, allowing for specification of output units.

 

GetLengthsGeodesic(SpatialReference SpatialReference, Polyline[] InPolylineArray,  LinearUnit LengthUnit)

 

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.

LengthUnit

(Optional) The unit of measure in which lengths will be returned.

 

Return Value

 

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

 

Remarks

 

If LengthUnit is specified, the length values are computed in the specified linear units. If LengthUnit is not specified, the length values are computed in the units of the spatial reference.

 

If LengthUnit is not specified and the input spatial reference is a geographic coordinate system, then the lengths are expressed in meters. This method calculates the ellipsoidal shortest path distance between each pair of the vertices in the polylines.

 

The spatial reference can be a projected or a geographic coordinate system. If the former, then the geometries are first inverse projected into its associated geographic coordinate system and then the distance calculations are performed.