This document is archived and information here might be outdated.  Recommended version.


IGeometryServer3.GetLengthsPreserveShape Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IGeometryServer3.GetLengthsPreserveShape Method

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

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.

See Also

IGeometryServer3 Interface