Click or drag to resize

GeometryEngineLength Method

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.

Namespace:  Esri.ArcGISRuntime.Geometry
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.9.0
Syntax
public static double Length(
	Geometry geometry
)

Parameters

geometry
Type: Esri.ArcGISRuntime.GeometryGeometry
The geometry to calculate length for.

Return Value

Type: 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.
See Also