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


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

IGeometryServer2.GetLengthsGeodesic Method

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*

Product Availability

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

Remarks

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.

See Also

IGeometryServer2 Interface