-
Notifications
You must be signed in to change notification settings - Fork 157
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
[FEA] Add Vincenty Distance to cuSpatial #60
Comments
Hi @MurrayData ! We were wondering if you could provide a sort of ETA on this feature, if you're still interested? Thanks! |
This issue has been marked stale due to no recent activity in the past 30d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be marked rotten if there is no activity in the next 60d. |
This issue has been marked rotten due to no recent activity in the past 90d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. |
I struggled with the C++ element of the coding as I'm very rusty in it. I have it coded in Python. |
This issue has been labeled |
This issue has been labeled |
This is still worthwhile. Reopening. |
Happy to help @harrism @thomcom but my C++ isn't up to the standard. I have published the Python version above. I have also written some additional associated functions including bearing in degrees between 2 lat/lon points, Haversine Manhattan and Vincenty Manhattan distances if you are interesting in adding these. |
We are of course interested, we are just a small team with a long list of requests, plans and priorities. :) If you think those APIs would be useful to have, it would be great if you can add an issue for each one. Links to similar functions in existing (Python or otherwise) libraries would be helpful. Thanks! |
Vincenty Distance is an iterative formula to calculate the shortest distance between two points on a spheroid. It is more accurate than simple great circle calculations, such as Haversine, which uses an average radius for the Earth.
Vincenty takes into the account the flattening of the Earth as an oblate spheroid to calcualte to an accuracy of 0.5 mm on the WGS84 ellipsoid.
While differences between Haversine and Vincenty are small over short distances, noticeable errors arise over longer distances, particularly if calculating aircraft trajectories.
I suggest adding Vincenty Distance to cuSpatial.
This is my implementation in CUDA JIT
where a = semi-major axis in metres and f = flattening
For the WGS84 ellipsoid, these values are:
I have tested the above against online converters provided by mapping agencies.
The sample below shows the difference between Vincenty (v_dist) against Haversine (h_dist) in km on the NY Taxi dataset:
The text was updated successfully, but these errors were encountered: