Watershed Module overview: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:
==Algoritm Steps (Directional)==
==Algoritm Steps (Directional)==


# Init: Predefined water terrains that intersect input watershed areas are marked with a unique id, starting from 1. The values of these cells are considered minima and are never adjusted by the algoritm described below.
Init: Predefined water terrains that intersect input watershed areas are marked with a unique id, starting from 1. The values of these cells are considered minima and are never adjusted by the algoritm described below.
 
# Setup label (applied once): Convert Input data to cell references, in 8 directions. Cells without a direction angle become a plateau with a unique id.
# Label plateaus (loop until stable): Calls without a reference to other 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 seen as a minima.
# Store directions as a result type.
# Set Minima IDs (only once): For cells that are marked as a plateau, mark them now as minima with a unique id.
# Propagate minima IDs (loop until stable): Union minima cells ids, by giving them both the lowest ids of the two.
# Store minima as a result type.
# Flood (loop until stable): Cells referencing a cell with a (minima) label are updated to that same label 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:
* 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.


# Step 1 (applied once): Convert Input data to cell references, in 8 directions. Cells without a direction angle become a plateau with a unique id.
# Step 2 (loop until stable): Calls without a reference to other are re-evaluated. Such a cell will reference the first neighboring cell that flow away from it.
#Step 2B (only once): Neighboring cells that reference each other, are both set back to being a plateau. They can now be seen as a minima.
# Step 3A (only once): For cells that are marked as a plateau, mark them now as minima with a unique id.
# Step 3B (loop until stable): Union minima cells ids, by giving them both the lowest ids of the two.


==Tips==
==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.
* 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.

Revision as of 12:14, 20 May 2020


Algoritm Steps (Directional)

Init: Predefined water terrains that intersect input watershed areas are marked with a unique id, starting from 1. The values of these cells are considered minima and are never adjusted by the algoritm described below.

  1. Setup label (applied once): Convert Input data to cell references, in 8 directions. Cells without a direction angle become a plateau with a unique id.
  2. Label plateaus (loop until stable): Calls without a reference to other are re-evaluated. Such a cell will reference the first neighboring cell that flow away from it.
  3. Fix self directions (only once): Neighboring cells that reference each other, are both set back to being a plateau. They can now be seen as a minima.
  4. Store directions as a result type.
  5. Set Minima IDs (only once): For cells that are marked as a plateau, mark them now as minima with a unique id.
  6. Propagate minima IDs (loop until stable): Union minima cells ids, by giving them both the lowest ids of the two.
  7. Store minima as a result type.
  8. Flood (loop until stable): Cells referencing a cell with a (minima) label are updated to that same label id.
  9. 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:

  • 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.