Watershed algorithm: Difference between revisions
Jump to navigation
Jump to search
(→Notes) |
(→Notes) |
||
Line 28: | Line 28: | ||
** directional cells, either initial or calculated by the algorithm | ** directional cells, either initial or calculated by the algorithm | ||
** plateau cells, identified by have no direction or by neighboring cells referencing each other. It can become either a: | ** plateau cells, identified by have no direction or by neighboring cells referencing each other. It can become either a: | ||
*** | *** directional cell, which will reference cells directing away from it; | ||
*** discharge area cell, which will receive a unique id. | *** discharge area cell, which will receive a unique id. | ||
* Direction in the Fill step does not matter at this stage, because it would have been labeled otherwise. Cells can remained unlabeled when restrictions are put on the minima labeled. | * Direction in the Fill step does not matter at this stage, because it would have been labeled otherwise. Cells can remained unlabeled when restrictions are put on the minima labeled. |
Revision as of 14:20, 10 June 2020
The Watershed algorithm has two variants, one based on absolute height values of the DTM and one based on a Water Overlay's Surface Direction result type.
Data initialization
The basic watershed algorithm has been adjusted to allow users to mark waterways and water surfaces as uniquely identified minimas present at the start of the algorithm.
Additionally, culverts can be considered connections between waterways that can propagate these minima areas to waterways that are not initially marked.
Optionally, the direction of the flow through the culvert can be considered to limit the expansion of minima areas to other waterways. In such case only the waterways that flow towards a waterway marked as a minima are also marked with the same unique minima id.
Watershed Algorithm
- Setup label (applied once): Convert Input data to cell references, in 8 directions. Cells without a direction angle are marked as a plateau, which is a state that will be evaluated in the next steps.
- Label plateaus (loop until stable): Cells without a reference to others are re-evaluated. Such a cell will reference the first neighboring cell that flow away from it.
- Fix self directions (only once): Neighboring cells that reference each other, are both set back to being a plateau. They can now be identified as a unique discharge area, depending on the selected options.
- Store directions as a result type.
- Add discharge areas with unique IDs (optional, only once): For cells that are marked as a plateau, mark them now as a discharge area with a unique id depending on the selected options.
- Propagate the create discharge area IDs (optional, loop until stable): In case two cells discharge areas, combine them by selecting the lowest ids of the two.
- Store discharge areas as a result type: These can now contain both the initial and the created ones.
- Flood (loop until stable): Cells referencing a cell with a discharge area id are updated to that same id.
- Fill (loop until stable): Assign a label to an unlabeled cell based on first found neighbor with a label. Optionally limit this step to cells that are not roads.
Notes
- The watershed algorithm implementation is an adapted version of the algorithm proposed by Vitor et. al. [1].
- The algorithm uses 3 types of cells:
- discharge area cells, either initial or created by the algorithm
- directional cells, either initial or calculated by the algorithm
- plateau cells, identified by have no direction or by neighboring cells referencing each other. It can become either a:
- directional cell, which will reference cells directing away from it;
- discharge area cell, which will receive a unique id.
- Direction in the Fill step does not matter at this stage, because it would have been labeled otherwise. Cells can remained unlabeled when restrictions are put on the minima labeled.
Tips
- When using a Water Overlay's Flow direction result as an input for the Watershed Overlay, it is important to consider what rain settings are used. Generally, you want select a rainfall big enough for local minima, due to small depressions in the terrain, to disappear. On the other side, the rainfall should not be too big for the marked ditches it should end up in.
See also
References
- ↑ Vitor, Giovani & Körbes, André & Lotufo, Roberto & Ferreira, Janito. (2010). Analysis of a Step-Based Watershed Algorithm Using CUDA. IJNCR. 1. 16-28. 10.4018/jncr.2010100102.