Show / Hide Table of Contents

Method LengthGeodetic

LengthGeodetic(Geometry, LinearUnit, GeodeticCurveType)

Gets the geodesic length for the Geometry passed in.

Declaration
public static double LengthGeodetic(this Geometry geometry, LinearUnit linearUnit = null, GeodeticCurveType geodeticCurveType = GeodeticCurveType.Geodesic)
Parameters
Type Name Description
Geometry geometry

The geometry to calculate the geodesic length for.

LinearUnit linearUnit

The linear unit of measurement the length value is returned. If null, meters are assumed.

GeodeticCurveType geodeticCurveType

The type of curve to calculate.

Returns
Type Description
Double

The calculated geodesic length in meters.

Remarks

Geodesic length is calculated using only the vertices of the polygon and define the lines between the points as geodesic segments independent of the actual shape of the polygon. A geodesic segment is the shortest path between two points on an ellipsoid. Thus, if you have a line that spans the width of the world, with only two vertices, each on the edges of the map, the geodesic length would be zero (shortest distance between the two vertices).

Supports true curves, calculating the result by densifying curves.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0
Relevant samples
Geodesic operations: Calculate a geodesic path between two points and measure its distance.
In This Article
Back to top Copyright © 2022 Esri.