CoordinateGet_Distance_From_Coordinate(Coordinate) Method
Returns the distance from a target coordinate using spherical earth calculations.
Use overload if ellipsoidal calculations are desired.
Namespace: CoordinateSharpAssembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
public Distance Get_Distance_From_Coordinate(
Coordinate target
)
- target Coordinate
- Coordinate
DistanceDistance
The following example demonstrates how to obtain the distance from a target coordinate
using default spherical earth calculations.
Coordinate coord = new Coordinate(25, 25);
Coordinate target = new Coordinate(28, 30);
//Get distance from target using default spherical calculations
Distance d = coord.Get_Distance_From_Coordinate(target);
Console.Writeline(d.Kilometers); //598.928622714691