-
Notifications
You must be signed in to change notification settings - Fork 209
Bump i_overlay dependency to 3.4.1 #1359
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
base: main
Are you sure you want to change the base?
Conversation
This changes the winding order of polygon rings to match the one in use in geo.
FYI https://github.com/georust/geo/tree/mkirk/geo-buffer by @michaelkirk is in progress. I wanted to ask though if you mean offsetting for linestrings (as in, offset a linestring left or right and deal with the problems at interior points). I'm interested in an iOverlay-backed approach for that too, but when I last glanced through the API, I only found things exposed for polygons. |
Oh thanks, I think I missed it (or forgot about it) and you're welcome to point it out to me :)
I was thinking (at least initially) of a “simple” buffer function, which would have offset both sides of the linestrings (as already exposed by iOverlay). |
Check out https://github.com/a-b-street/ltn/blob/84bc46f5b6e08880385b2bbb61cfb04818ff833e/backend/src/boundary_stats.rs#L97 for an example use. I think there were some open questions about the API that georust should expose, so if you have more use cases, it'd be helpful to understand them |
One thing to check - geo supports MSRV of at least 6 months. IIRC, i_overlay is more aggressive about dropping recent versions. Please check that this builds on geo's MSRV, or whether we'd need to bump. We won't bump to anything more recent than 6 months old. |
@@ -31,7 +31,7 @@ proj = { version = "0.30.0", optional = true } | |||
robust = "1.1.0" | |||
rstar = "0.12.0" | |||
serde = { version = "1.0", optional = true, features = ["derive"] } | |||
i_overlay = { version = "2.0.0, < 2.1.0", default-features = false } |
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.
Since i_overlay breaks API's on minor versions as a matter of policy, we need to keep i_overlay pinned to a minor version.
I think the 3.0 series is on the 2024 edition (unless I imagined it) so we can't bump yet… |
Indeed, I just checked and you're right!
Yep, totally understandable. Since the contribution of upgrading iOverlay was really small as it is (it just saves us from reversing polygon rings in a function), maybe I should close this PR and we'll reconsider an upgrade in due course? |
The 2024 edition released with 1.85, and 1.87 releases tomorrow (?), so we could release on the 20th of August by calendar, or Rust 1.90 if we go by version (which is the current practice I believe) |
CHANGES.md
if knowledge of this change could be valuable to users.Since v3.0.0 iOverlay has changed the winding order of polygon rings to match the one in use in geo so I thought it could be a good thing to update iOverlay (I also wanted to update it because I was starting to look at how much work was needed to use iOverlay's path offsetting for a buffering function for geo)
However there is now two tests that fails:
So when we union
POLYGON((0.0 0.0,1.0 0.0,1.0 1.0,0.0 1.0,0.0 0.0)
withPOLYGON EMPTY
, it returns the correct polygon, but the order of coordinates is not preserved. In practical terms, this doesn't change the polygon in question, but it would have been nice if it hadn't changed the order of the coordinates...Again, it's a question of the order of the coordinates (I think I can just modify the expected value since there was no expected result in the issue from which this test case came).