PointExtensions.GetDistance method

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

GetDistance(IPoint, IPoint)

Extension method

Calculates the distance in metres between two GPS points.

public static double GetDistance(this IPoint point, IPoint otherPoint)

Parameters

point IPoint

The first point.

otherPoint 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)

Extension method

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

public static double GetDistance(this IPoint point, IPoint otherPoint, double radius)

Parameters

point IPoint

The first point.

otherPoint IPoint

The second point.

radius Double

The equatorial radius of the spheroid.

Returns

The distance in metres between the two points.