-
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
ClosestPoint for Triangle, Rect, GeometryCollection types & Geometry enum #675
Conversation
bors try |
A couple other housekeeping things:
|
There's still a merge conflict on the changelog. |
Thanks @lnicola . This implementation is still not finalized, I will resolve conflicts before it is ready to be merged. |
679: Fix ClosestPoint when internal for Polygons r=frewsxcv a=michaelkirk - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- While discussing #675, I noticed our current implementation of ClosestPoint for Polygon seems incorrect. Previously, we were only considering the boundary of the polygon. But presumably we should behave like JTS and [PostGIS](https://postgis.net/docs/ST_ClosestPoint.html) which consider interior points to have a distance 0. Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
@michaelkirk I've changed the implementation to use |
The implementation LGTM! If you can fix up the conflict in the changelog, I think this should be good to merge. |
I think that should've fixed the changelog now. Thanks for reviewing @michaelkirk ! |
Still needs a rebase, I think. |
@lnicola I rebased it on |
bors try |
tryAlready running a review |
bors try- |
bors try |
bors retry ? |
tryAlready running a review |
tryBuild failed: |
Oh ffs. This is because cargo shipping with rust < 1.56.0 doesn't know what to do with the 2021 feature, isn't it? |
|
This isn't fixable in the PR: it'll require someone to pin |
Does |
Not that I know of. I had to go through docs.rs to see the source: https://docs.rs/crate/pdqselect/0.1.1/source/ |
pdqselect 0.1.1 has switched to the 2021 edition, which is breaking some downstream crates which rely on older rust version in their CI. See discussion in georust/geo#675
bors try |
tryBuild failed: |
🤷♂️ |
bors try |
tryBuild failed: |
Sorry everyone, it's a "real" error now – looks like something iterator-related landed for arrays in 1.52 |
bors try |
tryBuild succeeded: |
Build succeeded: |
Thanks for seeing it through @pkopparla! |
CHANGES.md
if knowledge of this change could be valuable to users.This pull request addresses issue #544
The ClosestPoint method was implemented for the remaining members of the
Geometry
enum ie.,Triangle, Rect and GeometryCollection
and then implemented for the enum itself.