Geometry service GetDistanceGeodesic method

The GetDistanceGeodesic method calculates the geodesic distance between the input geometries.

GetDistanceGeodesic(SpatialReference SpatialReference, Geometry G1, Geometry G2, LinearUnit DistanceUnit)

Parameter

Description

SpatialReference

The SpatialReference of the input. Cannot be null.

G1

A geometry of any type.

G2

A geometry of any type.

DistanceUnit

(Optional) The unit of measure in which distance will be reported.

Return Value

A double reporting the shortest geodesic distance between G1 and G2.

Remarks

The geodesic distance between two geometries is the shortest path between them on an ellipsoid such as the Earth.

The distance value is computed in the specified linear units, if present, or in the units of the spatial reference. If SpatialReference is a projected coordinate system, the input geometries will first be inverse projected and then geodesic distance will be computed on the latitude-longitude coordinates.

2/28/2020