Calculates the length for each input polyline, allowing for specification of output units.
GetLengths2(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 length of each Polyline in the input array.
Remarks
The length values are computed in the specified linear units, if present, or in the units of the 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.