-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
bug: typo shapely function call within gridintersect #2342
Comments
Thanks @sannedesmet for the bug report, I would have thought this was captured by our tests, but I'll check it out and report back here! Any chance you can share the shape/grid you are intersecting with? |
Thanks for the quick reply @dbrakenhoff. I wanted to use a pull request to solve this bug, as it is relatively easy. However in the codecov file of flopy of a colleague I saw that the current test functions do not cover these specific lines. I got stuck writing a test, therefore I decided to write this issue. The model that triggered this bug is quite large. It took me awhile to isolate the linestring that triggered the bug. Is this sufficient or do you prefer a different way of sharing the grid? |
- fix typo in shapely.multilinestrings - fix issue with np.apply_along_axis - consider geometry collections when computing overlaps - add test for vertex mode - add inactive test for structured mode (not yet working)
Thanks for reporting this @sannedesmet ! Good catch :). The image below shows the culprits. And that makes sense. When the linestring touches/intersects the shape then comes out and then comes back to intersect at the vertex or is directly on the boundary that results in GeometryCollections. Fix is submitted through PR #2343. |
Describe the bug
Within utils/grindintesect.py function "def _intersect_linestring_shapely2" the function shapely.multilinestring() is called in line 969.
However this function doesn't exist and should be changed to shapely.multilinestrings()
To Reproduce
Shapely with a version above 2 has to be installed.
In specific cases if multiple parts of a linestring are within one cell this function will be called
This is quite rare, that is the reason I think this bug is not noticed before, since it has been present for quite some releases of flopy.
Expected behavior
I expected a multilinestring as output, however I got the error as given below
Screenshots
The text was updated successfully, but these errors were encountered: