[1pt] PR: Clip WBD to 3DEP DEM domain #753
Merged
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.
Creates a polygon of 3DEP DEM domain (to eliminate errors caused by stream networks with no DEM data in areas of HUCs that are outside of the U.S. border) and uses the polygon layer to clip the WBD and stream network (to a buffer inside the WBD). Addresses #748.
Additions
data/usgs/acquire_and_preprocess_3dep_dems.py
: Adds creation of 3DEP domain polygon by polygonizing all HUC6 3DEP DEMs and then dissolving them.src/gms/run_by_unit.sh
: Adds 3DEP domain polygon .gpkg as input tosrc/clip_vectors_to_wbd.py
Changes
src/clip_vectors_to_wbd.py
: Clips WBD to 3DEP domain polygon and clips streams to a buffer inside the clipped WBD polygon.Testing
gms_run_unit.sh
andgms_run_branch.sh
on test HUCs 10060006, 04300109, 04100001 (specified in [8pt] US Border HUC branches are throwing error 61 #748) and 17010206.Screenshots
Streams are clipped where the DEM data ends at the U.S. - Canada border

Streams are clipped to the buffer within the WBD

Notes
Exit status: 1
for HUC 04100001 (branch 1316000004, catchment in purple) which is caused by an unrelated issueTodos