Skip to content

BUG: ensure validity of polygons in voronoi_frames #780

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

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

martinfleis
Copy link
Member

On some of the locations where coverage_union failed, unary union does not fail but produces invalid polygons. If that happens, the subsequent intersection has a tendency to fail. This seems to fix it but I wasn't able to extract a sample small enough to be included in CI. So my proposal is not merge as is.

@martinfleis martinfleis requested a review from jGaboardi March 26, 2025 10:22
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.3%. Comparing base (4b9970d) to head (5c60509).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
libpysal/cg/voronoi.py 50.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #780     +/-   ##
=======================================
- Coverage   85.4%   85.3%   -0.1%     
=======================================
  Files        150     150             
  Lines      15989   16012     +23     
=======================================
+ Hits       13655   13663      +8     
- Misses      2334    2349     +15     
Files with missing lines Coverage Δ
libpysal/cg/voronoi.py 75.0% <50.0%> (+1.3%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@martinfleis martinfleis marked this pull request as draft March 26, 2025 10:30
@martinfleis
Copy link
Member Author

Not that easy, the result is wrong...

@martinfleis martinfleis marked this pull request as ready for review March 26, 2025 11:30
@martinfleis
Copy link
Member Author

The result is wrong by a coincidence and the wrongness is caused by libgeos/geos#955. This is fine as is.

@jGaboardi jGaboardi added the bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. label Mar 26, 2025
@jGaboardi
Copy link
Member

Nice work!

@jGaboardi jGaboardi merged commit bcbe430 into pysal:main Mar 26, 2025
11 of 12 checks passed
@martinfleis martinfleis deleted the validity branch March 26, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants