This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryServer2 Interface > IGeometryServer2.GetLengthsGeodesic Method (ArcObjects .NET 10.5 SDK) |
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,
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 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.