ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / GeodeticLength Method
The input geometry. Cannot be null and its spatial reference cannot be null.
The units of the output. If null, then the output is in meters
The GeodeticCurveType of the segments.

In This Topic
    GeodeticLength Method (GeometryEngine)
    In This Topic
    Gets the geodetic length of the input geometry.
    Syntax
    Public Function GeodeticLength( _
       ByVal geometry As Geometry, _
       ByVal lengthUnit As LinearUnit, _
       ByVal curveType As GeodeticCurveType _
    ) As Double

    Parameters

    geometry
    The input geometry. Cannot be null and its spatial reference cannot be null.
    lengthUnit
    The units of the output. If null, then the output is in meters
    curveType
    The GeodeticCurveType of the segments.

    Return Value

    The calculated geodetic length in lengthUnit. If lengthUnit is null, then the length is in meters.

    If the geometry is empty, then zero is returned.

    Exceptions
    ExceptionDescription
    Geometry is null or geometry's spatial reference is null.
    The method is not implemented for GeometryBag or Multipatch.
    Spatial reference of geometryis an image coordinate system.
    Remarks
    Geodetic length is calculated by using only the vertices of the geometry and defining the segments between the points as determined by curveType independent of the actual shape of the geometry.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.4 or higher.
    See Also