New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use 64bit floats for geoDistance calculation #58476
Comments
Let's switch to Float64 and check if there will be any noticeable difference in performance. |
I'd like to work on this. |
@geetptl, thank you! This will be very helpful. |
I'm interested in working on this issue. It aligns well with my skills and interests. I've reviewed the problem, and I believe I can contribute a solution. |
Unsure how to link this PR here, but here's the link to it: |
@alexey-milovidov Thank you for the opportunity I will give it a try and highly appreciate it. |
@alexey-milovidov What do you think about the PR from geetptl #58847? |
@dadebue, it is unfinished - there is performance degradation. |
@alexey-milovidov It was vacation when I was working on this issue, but student life caught up to me, along with my inexperience in C++. But thank you for your guidance in the now closed PR! |
Thank you, and it is actually your contribution :) I will add you as a co-author. |
Describe the unexpected behaviour
geoDistance
function (and the other geographical distance functions) only usesFloat32
values for the calculationgeoDistance
function with close enough positions the result is always 0, which is incorrectHow to reproduce
SELECT geoDistance(8.623000, 49.355000, 8.6230001, 49.3550001);
returns0
0.01327m
(link to online calculation)49.3550001
49.3550000
8.6230001
8.6230000
haversine
formula manually (returns0.01327037431348616
):Expected behavior
Float64
values for calculation to support high precision position valuesSELECT geoDistance(8.623000, 49.355000, 8.6230001, 49.3550001);
should return0.01327
Additional context
The text was updated successfully, but these errors were encountered: