Distance calculations
PHPCoord can calculate the distance between two Points via the calculateDistance() method.
public function calculateDistance(
Point $to,
): Length
The distance between two
ProjectedPoints is calculated via PythagorasThe distance between two
GeographicPoints or twoGeocentricPoints is calculated via Vincenty’s formulaThe distance between two
VerticalPoints is calculated as simple difference
Example
$from = GeographicPoint::create(...);
$to = GeographicPoint::create(...);
$distance = $from->calculateDistance($to);