Great-circle distance in metres, scalar-argument form.
Thin adapter over the canonical haversineDistance — it exists only because the
filter predicates carry coordinates as loose scalars rather than {lat, lng} pairs.
⚠️ The unit is part of the contract. This used to be described as a "fallback for when
GeoLeaf.Utils is not loaded", and route-filter duly preferred GeoLeaf.Utils.getDistance
when present — but that one returns kilometres, so the proximity radius silently shifted
by a factor of 1000 depending on load order (KERNEL S11). Never make this interchangeable
with a kilometre-returning function.
Great-circle distance in metres, scalar-argument form.
Thin adapter over the canonical haversineDistance — it exists only because the filter predicates carry coordinates as loose scalars rather than
{lat, lng}pairs.⚠️ The unit is part of the contract. This used to be described as a "fallback for when
GeoLeaf.Utilsis not loaded", androute-filterduly preferredGeoLeaf.Utils.getDistancewhen present — but that one returns kilometres, so the proximity radius silently shifted by a factor of 1000 depending on load order (KERNEL S11). Never make this interchangeable with a kilometre-returning function.