This document is archived and information here might be outdated. Recommended version. |
Returns geodesic length of each Polyline.
[Visual Basic .NET] Public Function GetLengthsGeodesic ( _ ByVal pSR As ISpatialReference, _ ByVal polylines As IPolylineArray, _ ByVal pLengthUnit As ILinearUnit _ ) As IDoubleArray
[C#] public IDoubleArray GetLengthsGeodesic ( ISpatialReference pSR, IPolylineArray polylines, ILinearUnit pLengthUnit );
[C++]
HRESULT GetLengthsGeodesic(
ISpatialReference* pSR,
IPolylineArray* polylines,
ILinearUnit* pLengthUnit
);
[C++] Parameters pSR
pSR is a parameter of type ISpatialReference* polylines
polylines is a parameter of type IPolylineArray* pLengthUnit
pLengthUnit is a parameter of type ILinearUnit*
The returned lengths are expressed in the specified linear units, if present, or 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.