This document is archived and information here might be outdated. Recommended version. |
Returns true length of each polyline.
[Visual Basic .NET] Public Function GetLengthsPreserveShape ( _ ByVal pSR As ISpatialReference, _ ByVal polylines As IPolylineArray, _ ByVal pLengthUnit As ILinearUnit _ ) As IDoubleArray
[C#] public IDoubleArray GetLengthsPreserveShape ( ISpatialReference pSR, IPolylineArray polylines, ILinearUnit pLengthUnit );
[C++]
HRESULT GetLengthsPreserveShape(
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 method calculates the length of the geometry on the surface of the Earth ellipsoid, for geometry defined in projected or geographic coordinate system. This method preserves the shape of the geometry in its coordinate system. This means the true length will be calculated for the geometry you see in the map. (What you see is what you get.)
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.