-
Notifications
You must be signed in to change notification settings - Fork 205
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
Implemented "Closest Point" from a Point
on a Geometry
using spherical geometry.
#958
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your patience @bbetov!
bors r=frewsxcv,michaelkirk
I'll follow up with an update to the docs - no need to make this PR wait even longer on account of me. |
There were some clippy errors too, due to a deprecation/rename that's happened in the meanwhile. Fixed in #1026. |
1026: haversine closest point fixups r=michaelkirk a=michaelkirk - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/main/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Addendum to #958 Co-authored-by: Branimir Betov <b_betov@yahoo.com> Co-authored-by: Corey Farwell <coreyf@rwell.org> Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
CHANGES.md
if knowledge of this change could be valuable to users.Essentially implementing
ClosestPoint
trait for spherical geometry. I named the new traitHaversineClosestPoint
.There is a slight (intentional) difference in behavior in the case when a segment (arc)'s length is very close to zero, the spherical algorithm will return
Closest::SinglePoint
instead ofClosest::Indeterminate
. I think even if the segment has degenerated to a point, there is still a closest point.