Calculates the geodesic shortest distance between the two input geometries.
GetDistanceGeodesic(SpatialReference SpatialReference, Geometry G1, Geometry G2, LinearUnit DistanceUnit)
Parameter |
Description |
SpatialReference |
The spatial reference of the geometries in G1 and G2. 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 distance value is computed in the specified linear units, if present, or in the units of the spatial reference.
If the spatial reference is a projected coordinate system, the input geometries will first be inverse projected and then shortest geodesic distance will be computed on the latitude-longitude coordinates.