Parameters
- geometry1
- The first geometry.
- geometry2
- The second geometry.
Return Value
The geodesic distance between the two geometries in meters.
Exception | Description |
---|---|
System.ArgumentNullException | Either geometry1 or geometry2 or both are null or empty. |
System.NotImplementedException | The method is not implemented for GeometryBag or Multipatch. |
System.InvalidOperationException | Incompatible spatial references between the input geometries. |
System.NotImplementedException | Spatial reference of geometry1or geometry2is an image coordinate system. |
var point1 = MapPointBuilder.CreateMapPoint(-170, 45, SpatialReferences.WGS84); var point2 = MapPointBuilder.CreateMapPoint(170, 45, SpatialReferences.WGS84); var distances_meters = GeometryEngine.Instance.GeodesicDistance(point1, point2); // distance is approximately 1572912.2066940258 in meters
Target Platforms: Windows 10, Windows 8.1