This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryServer3 Interface > IGeometryServer3.GetLengthsPreserveShape Method (ArcObjects .NET 10.4 SDK) |
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,
IDoubleArray** ppLengthsArray
);
[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 ppLengthsArray [out, retval]
ppLengthsArray is a parameter of type IDoubleArray
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.