[21pt] src/hydrotable_flood_extent_polygons.py: Generate flood extent polygo… #941
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.
Generate flood extent polygons for the synthetic river rating curve (hydroTable).
A python script is coded to implement a requested feature for generating flood extent polygon for each HydroID and each stage height in the
hydroTable.csv
. Instead of adding a WKT column to existing hydroTable, which would makehydroTable.csv
big and less readable, the output is a GeoPackage file with attributes: HydroID, feature_id, stage, and stage_index (0-83). The usage of the script is documented in the python code.Additions
src/hydrotable_flood_extent_polygons.py
is added to implement this feature. It's a standalone python script and can be used as a bash command. Code is modularized into 3 python functions for further integration into FIM4 framework.Testing
The performance of this script was tested on HUC8 12090205. Here is the overall performance in terms of computing time for each stage height. On average, each stage height takes about 1 minute to compute using 8 CPU cores.
The breakdowns of each component in the code is shown below. Note that polygonization is the most time-consuming step, consistently taking ~30 seconds: