DistanceGetHaversineDistance Method (Double, Double, Double, Double) |
Calculates the haversine distance between to points, specified as lon/lat, aka WGS84, aka EPSG:4326.
Namespace:
Ptv.Components.Projections
Assembly:
Ptv.Components.Projections (in Ptv.Components.Projections.dll) Version: 1.7.10.0
Syntax public static double GetHaversineDistance(
double x0,
double y0,
double x1,
double y1
)
Public Shared Function GetHaversineDistance (
x0 As Double,
y0 As Double,
x1 As Double,
y1 As Double
) As Double
public:
static double GetHaversineDistance(
double x0,
double y0,
double x1,
double y1
)
static member GetHaversineDistance :
x0 : float *
y0 : float *
x1 : float *
y1 : float -> float
Parameters
- x0
- Type: SystemDouble
Longitude of first point, in degress - y0
- Type: SystemDouble
Latitude of first point, in degress - x1
- Type: SystemDouble
Longitude of second point, in degress - y1
- Type: SystemDouble
Latitude of second point, in degress
Return Value
Type:
DoubleHaversine distance in [km].
Examples double d_Karlsruhe_Berlin = GetHaversineDistance(8.40376, 49.00808, 13.4114, 52.5234);
double d_Barcelona_Moskau = GetHaversineDistance(2.16992, 41.38793, 37.6177, 55.75586);
See Also