-
Notifications
You must be signed in to change notification settings - Fork 2
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
Replace find_nearest_branch
with hydromt alternative
#74
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I just fixed the import errors. The only errors left are the following:
These testcases are identical, the code version is easier to debug. These are originating from the following setup functions: It could be related to #175, but it could also be unrelated since the main branch also shows the same behaviour. Either way, if the cause is clear, please add a unittest just like for the other functions. edit: the above is resolved after fixes from @xldeltares |
…b.com/Deltares/hydromt_delft3dfm into 5-replace-branchesfind_nearest_branch
find_nearest_branch
with hydromt alternative
I also removed some of my commits and pushed them to a different branch. Furthermore, I moved all fixes that @xldeltares and myself wanted to do within this branch to #180 (fix docs build action) and #178 + #182 (align dflowfm build yml), which are now also merged. From #178 I have created follow up issue #177 (rainfall), not yet resolved/merged but this is not blocking for this PR. This branch was synced again with the main branch after merging the PR's. So now this PR is now purely about updating a D-HyDAMO function to hydromt functionality. The new implementation does not update the dataframes in place, so the functions need to return the updated dataframes instead. I assume here that the old D-HyDAMO function did update the dataframe in place right? Otherwise I guess some of our tests should have failed, I think, but I cannot judge 100%. After updating with main after merging the two PR's, I only get one error:
So it might well be that it is after all not a lot of work to finish this PR. Also check #169 since it might be related. Alternatively it might just be enough to update the values of another geojson? Are the values in the geojson files expected to change with this update, or does it indicate a mistake in the implementation? |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, all tests are now passing and the four example models are successfully built from the notebooks and also run successfully in the Delft3D FM Suite 2024.03 1D2D
Issue addressed
Fixes #5
Explanation
a new
find_nearest_branch
function is created.For now the function implemented "overal" and "intersecting" methods.
The former is used for point crossection and structures, the latter is used for xyz crossection.
The latter is also improved to handle situations where multiple branches are snapped to one crossection, in which case, an extra centroid will be computed from the line crossection and snapped to the branch with closest distance.
Checklist
main
Additional Notes (optional)
There is still a pending issue in the model built by the code: #56