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(GridIntersect): combine list of geometries using unary_union #1923

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Aug 21, 2023

This fix uses shapely.unary_union (or shapely.ops.unary_union) to combine a list of 1 or more [Multi]LineString geometries into one geometry.

Ideas on a test for this would be welcome.

Closes #1922

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #1923 (05be424) into develop (e020308) will increase coverage by 0.0%.
The diff coverage is 75.0%.

@@           Coverage Diff           @@
##           develop   #1923   +/-   ##
=======================================
  Coverage     72.6%   72.6%           
=======================================
  Files          257     257           
  Lines        57603   57604    +1     
=======================================
+ Hits         41831   41838    +7     
+ Misses       15772   15766    -6     
Files Changed Coverage Δ
flopy/utils/gridintersect.py 67.9% <75.0%> (+<0.1%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Contributor

@dbrakenhoff dbrakenhoff 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 have a test that reproduces the bug in #1922 and passes with this change. I don't think I can add to this PR, so I'll submit a separate PR?

@langevin-usgs langevin-usgs merged commit f2064d8 into modflowpy:develop Aug 21, 2023
@langevin-usgs
Copy link
Contributor

It's merged, @dbrakenhoff, so go ahead and submit another PR with the test. Thanks!

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

Successfully merging this pull request may close these issues.

bug: *** TypeError: 'MultiLineString' object is not iterable
3 participants