CoordinateGet_Distance_From_Coordinate(Coordinate, Shape) Method
Returns the distance from a target coordinate.
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,
Shape shape
)
- target Coordinate
- Target coordinate
- shape Shape
- Earth shape
DistanceDistance
The following example demonstrates how to obtain the distance from a target coordinate
using ellipsoidal earth calculations.
Coordinate coord = new Coordinate(25,25);
Coordinate target = new Coordinate(28, 30);
//Get distance from target using ellipsoidal calculations
Distance d = coord.Get_Distance_From_Coordinate(target, Shape.Ellipsoid);
Console.Writeline(d.Kilometers); //599.002436777727