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.
Implements variations of the Priority Flood algorithm mentioned in "Priority-Flood: An Optimal Depression-Filling and Watershed-Labeling Algorithm for Digital Elevation Models"
The methods are placed in their own module to facilitate easy maintenance.
The methods are:
fill_depressions
: A priority flood based method for fill depressions. First implemented in Use Priority Flood algorithm to fill depressions #243.fill_depressions_epsilon
: A modification of priority flood that automatically resolves flats. This is achieved by adding an epsilon to neighboring cells that are raised.flow_dirs
: Instead of usingfill_depressions_epsilon
, this variant computes the flow directions directly from the DEM. The paper describes this as a "depression carving" algorithm (rather than filling depressions, it drills through their walls). This helps preserve flow directions within depressions that otherwise would have been filled.basins
: Uses priority flood to label watersheds.@mdbartos How would you envision exposing these methods to pysheds API?