Show / Hide Table of Contents

Method Length

Length(Geometry)

Gets the length for a specified Geometry. This is a planar measurement using 2D Cartesian mathematics to compute the length in the same coordinate space as the inputs. Use LengthGeodetic(Geometry, LinearUnit, GeodeticCurveType) for geodetic measurement.

Declaration
public static double Length(this Geometry geometry)
Parameters
Type Name Description
Geometry geometry

The geometry to calculate length for.

Returns
Type Description
Double

The calculated length in the same units as the geometry's spatial reference unit.

Remarks

This length calculation is based upon the SpatialReference of the input geometry. Although some projections are better than others for preserving distance, it will always be distorted in some areas of the map. Distortion may be negligible for large scale maps (small areas) that use a suitable map projection. Make sure you know your data and spatial reference if accurate measurements are required. For more accurate results, consider using the LengthGeodetic(Geometry, LinearUnit, GeodeticCurveType) operation.

Supports true 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
In This Article
Back to top Copyright © 2022 Esri.