Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
Enhance the upscaling example notebook by adding steps to persist upscaled outputs, correct a typo, and align notebook metadata.
- Added cells to save the upscaled flow direction raster and vector network files
- Fixed spelling in a markdown comment ("contributing")
- Updated notebook kernelspec display name and Python version in metadata
Comments suppressed due to low confidence (2)
examples/upscaling.ipynb:37
- [nitpick] Consider renaming
proftoprofilefor clarity and consistency with rasterio naming conventions.
" prof = src.profile\n",
examples/upscaling.ipynb:169
- This cell references the variable
soutside its original loop context, which may be undefined or only retain its last value. Wrap this save operation inside the same loop oversor explicitly definesto ensure files are named correctly for each scale.
"with rasterio.open(f\"rhine_d8_upscale{s}.tif\", \"w\", **prof) as src:\n",
| " width=flw1.shape[1],\n", | ||
| " height=flw1.shape[0],\n", | ||
| " transform=flw1.transform,\n", | ||
| " nodata=247,\n", |
There was a problem hiding this comment.
Avoid using a hard-coded nodata value like 247. Consider using the original dataset's nodata value (e.g., prof['nodata'] or src.nodata) to maintain consistency and avoid magic numbers.
Suggested change
| " nodata=247,\n", | |
| " nodata=prof.get('nodata', 247),\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue addressed
Fixes #72
Explanation
Explain how you addressed the bug/feature request, what choices you made and why.
Checklist
mainAdditional Notes (optional)
Add any additional notes or information that may be helpful.