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


IGeometryServer3.GetLengthsPreserveShape Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryServer3 Interface > IGeometryServer3.GetLengthsPreserveShape Method
ArcGIS Developer Help

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
);
[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*

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