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

fix(cvfdutil): polygon area and centroid calculations now use shapely #2165

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

langevin-usgs
Copy link
Contributor

@langevin-usgs langevin-usgs commented Apr 23, 2024

Decided to use shapely calculations instead of our own flopy calculations. This should much more robust for real-world models, such as the one described in #2150.

…cise

* Changed area_of_polygon and centroid_of_polygon to use shapely calculations
* Close modflowpy#2150
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 71.0%. Comparing base (029a4e1) to head (a9906c1).
Report is 2 commits behind head on develop.

❗ Current head a9906c1 differs from pull request most recent head c942148. Consider uploading reports for the commit c942148 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2165     +/-   ##
=========================================
+ Coverage     68.3%   71.0%   +2.7%     
=========================================
  Files          260     260             
  Lines        57947   58128    +181     
=========================================
+ Hits         39611   41318   +1707     
+ Misses       18336   16810   -1526     
Files Coverage Δ
flopy/utils/cvfdutil.py 80.7% <62.5%> (-2.6%) ⬇️

... and 178 files with indirect coverage changes

@langevin-usgs langevin-usgs requested a review from wpbonelli April 23, 2024 19:10
Copy link
Member

@wpbonelli wpbonelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I wonder if there are other geometry calculations we could consider delegating to shapely. Maybe worth a scan at some point

@wpbonelli wpbonelli added the bug label Apr 23, 2024
@langevin-usgs langevin-usgs merged commit bb5461b into modflowpy:develop Apr 23, 2024
24 checks passed
@langevin-usgs langevin-usgs deleted the fix-cvfdutil branch April 29, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: possible error detected in cvfd_utils cell centroids function shapefile_to_xcyc
2 participants