-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improvements gdf to da #290
Conversation
The buffer argument I would like to use for identifying transition zones between two layer_models. Introduced a new function that counts in how many shapes a cell is present. Basically all the code was already there
Is there a flopy function to leave out parts of a vertex modelgrid? I would like to try it to see if it would speed up gdf_to_da |
I'm not aware of any such functionality, though it should be fairly easy to use gridintersect to create a subset of geometries based on an intersection result. Recreating a model grid from that object would be a bit difficult though. But since you need to build the intersection geometries for that step anyway, I doubt it will speed things up much leaving them out of the next intersection calculations? The shapely intersection routines should be able to query the relevant parts of the grid relatively quickly, I think? |
The PR currently contains all the improvents I was looking for. In a future PR it would be interesting to also vectorize the "aggregate values based on nearest to cell node"-function, and other aggregation functions. |
Nice! I have fixed the failing test in pull request #289, so I think this is ok to merge. We should add some test for gdf_to_da, gdf_to_bool_da and the other methods in grid.py... |
Perfect, thank you so much for your response. I'll leave it at that then. |
Improvements to intersecting shapes to grid functions.
The buffer argument I would like to use for identifying transition zones between two layer_models.
Introduced a new function that counts in how many shapes a cell is present. Basically all the code was already there