PointUtils.GetDistance method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Maps
Assembly Skybrud.Essentials.dll

GetDistance(IPoint, IPoint)

Static

Calculates the distance in metres between two GPS points.

public static double GetDistance(IPoint point1, IPoint point2)

Parameters

point1 IPoint

The first point.

point2 IPoint

The second point.

Returns

The distance in metres between the two points.

Remarks

The distance is calculated using the EquatorialRadius of Earth.

GetDistance(IPoint, IPoint, double)

Static

Calculates the distance in metres between two GPS points on a spheroid.

public static double GetDistance(IPoint point1, IPoint point2, double radius)

Parameters

point1 IPoint

The first point.

point2 IPoint

The second point.

radius Double

The equatorial radius of the spheroid.

Returns

The distance in metres between the two points.

GetDistance(double, double, double, double)

Static

Calculates the distance in metres between two GPS points.

public static double GetDistance(double lat1, double lng1, double lat2, double lng2)

Parameters

lat1 Double

The latitude of the first point.

lng1 Double

The longitude of the first point.

lat2 Double

The latitude of the second point.

lng2 Double

The longitude of the second point.

Returns

The distance in metres between the two points.

Remarks

The distance is calculated using the EquatorialRadius of Earth.

GetDistance(double, double, double, double, double)

Static

Calculates the distance in metres between two GPS points on a spheroid.

public static double GetDistance(double lat1, double lng1, double lat2, double lng2, double radius)

Parameters

lat1 Double

The latitude of the first point.

lng1 Double

The longitude of the first point.

lat2 Double

The latitude of the second point.

lng2 Double

The longitude of the second point.

radius Double

The equatorial radius of the spheroid.

Returns

The distance in metres between the two points.