distance
Calculates the distance between two positions. This uses the Haversine formula to account for global curvature.
Return
distance between the two points
Parameters
origin point
destination point
Calculates the distance between two points. This uses the Haversine formula to account for global curvature.
Return
distance between the two points
Parameters
origin point
destination point
Calculates the distance between a given point and the nearest point on a line.
Parameters
point to calculate from
line to calculate to
Calculates the distance between a given line and the nearest point on the line to a position.
This is a convenience function equivalent to calling distance(to, from)
.
Return
distance between the line and the point
Parameters
line to calculate from
point to calculate to
Calculates the distance between a given line and the nearest point on the line to a point.
This is a convenience function equivalent to calling distance(to, from)
.
Return
distance between the line and the point
Parameters
line to calculate from
point to calculate to