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 > IGeometryServer Interface > IGeometryServer.GetLengths Method (ArcObjects .NET 10.5 SDK) |
Calculates the length of eacch polyline in the specified array.
[Visual Basic .NET] Public Function GetLengths ( _ ByVal pSR As ISpatialReference, _ ByVal pInPolylines As IPolylineArray _ ) As IDoubleArray
[C#] public IDoubleArray GetLengths ( ISpatialReference pSR, IPolylineArray pInPolylines );
[C++]
HRESULT GetLengths(
ISpatialReference* pSR,
IPolylineArray* pInPolylines,
IDoubleArray** ppLengths
);
[C++]
Parameters pSR
pSR is a parameter of type ISpatialReference pInPolylines
pInPolylines is a parameter of type IPolylineArray ppLengths [out, retval]
ppLengths is a parameter of type IDoubleArray
All geometries are assumed to be defined in the spatial reference pSR, which cannot be nil. The length values are computed in that spatial reference. It is not recommended that this method be used on geometries associated with a geographic coordinate system, since the length would then be calculated in units of "degrees". You can use the GetLengthsGeodesic method to compute accurate lengths for polylines with latitude-longitude coordinates.
Refer to IGeometryServer for additional details on how the input spatial reference is interpreted.