Skip to content
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

Upgrade to shapely 2.0 #601

Open
La0 opened this issue May 6, 2024 · 5 comments
Open

Upgrade to shapely 2.0 #601

La0 opened this issue May 6, 2024 · 5 comments

Comments

@La0
Copy link

La0 commented May 6, 2024

We (Teklia) are upgrading our Kraken worker to it inside Arkindex.

Our base worker library depends on recent shapely 2.0.3

Do you have any blocker to stay on shapely 1.8.5 (released in october 2022) ?

@mittagessen
Copy link
Owner

Yes, there are numerical differences between 1.8.4 and 2.x that break polygon calculation in some cases. See here for more details.

It's on the radar but low priority. Frankly, anytime we bump up shapely versions we're finding undocumented behavior changes in corner cases for months afterwards. I'd like to avoid that if possible because it's a severe drain on my time.

@La0
Copy link
Author

La0 commented May 8, 2024

Would you consider a patch from Teklia if we apply the official migration guide on your codebase ?

@mittagessen
Copy link
Owner

The migration guide only accounts for API changes and not for behavior changes largely due to different versions of the underlying GEOM library. In fact, I already did the migration almost two years ago (eb89ab6) but had to roll it back 6 months later as hunting down all the new corner cases became intractable.
Apparently, now there are some new functions to deal with precision which might or might not resolve a lot of these issues but I haven't tried them yet. The big issue is really the polygon calculation which is rather more complex than most uses of the library.
I'd absolutely love a PR but it is much more work than just mechanically applying the API changes.

@colibrisson
Copy link
Contributor

colibrisson commented May 9, 2024 via email

@mittagessen
Copy link
Owner

Do you have a test case I can run to see what's going on? The polygon calculation is untouched (apart from faster rotation code), only the extraction of line images with baseline/polygons has been improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants