Closed bifbof closed 8 months ago
It's great that you find it out! I have always used this function, and it would be great to ensure its precision...
It isn't a bug. I just entered the wrong input arguments. point_haversine_dist
takes longitude
, latitude
as inputs. While haversine_distances
takes it reverse; latitude
, longitude
as input.
I am currently rewriting #592 and there a test on the haversine distance keeps failing because our implementation of the haversine function is not precise enough. If we compare it to the sklearn implementation: (distance Buenos Aires to Paris)
Result:
For smaller distances e.g. in a city that is not really observable but over bigger distances it is quite dramatic. Here our result is 11% smaller than the sklearn implementation.