Watershed Module overview: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
No edit summary
 
(83 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template:Watershed Module buttons}}__NOTOC__
==Concept==
<ul>
<li style = "display:inline-block">[[File:Watershed_introduction.png|400xpx]]</li>
</ul>


The watershed module calculates watersheds for rainfall based on a DTM or a calculated flow direction result of a Water Overlay. The [[Watershed (Overlay)|watershed overlay]] can provide an indication into which waterway or -body rainfall will end up. Users can assign and group waterways and -bodies using [[Discharge_area_(Watershed_Overlay)|discharge areas]] as input data. Additionally, culverts that connect waterways and bodies can be taken into account, which enables connected waterways and -bodies to be automatically assigned to the prioritized client-provided discharge areas. The general concept is:
#Rainfall simulation is done and generates a directional result.
#Discharge areas indicate the locations where rainfall will conceptually be discharged out of the system. Each discharge area will result in a watershed.
#Discharge areas are expanded along the waterways and culvert connections.
#Based on the direction the rainfall has moved in, the watersheds are gradually backtracked starting from the discharge areas. This is done for each watershed in parallel.
#On locations where the watersheds meet, the backtracking stops.
#The end result will be an overlay with unique id numbers corresponding to a watershed based on the initial discharge area.


This is the general concept, but there are variations on this concept:
* Terrain height can be used instead of a rainfall simulation. However, this approach suffers more from local mini and oversegmentation.
* Discharge areas are advised but not required. Optionally, each waterway and waterbody can be identified as a unique discharge area, in turn resulting into unique watersheds.
<br style="clear:both">


==Algoritm Steps (Directional)==
==Calculation==
Historically, the calculation of watersheds for rainfall was done based on the gradient of the terrain. Issues occur when the terrain is near flat; it is not known where the rain water will flow and the direction will be assigned arbitrarily based on the used algorithm. Secondly, the terrain often contains a lot of local minimas, which results in the creation of too many unique watersheds (oversegmentation). To solve this, one would often apply filters to the terrain to remove these local minimas, but this required a lot of user judgement.


====Data initialization====
Fortunately, instead of using only the gradient of the terrain directly, we can also simulate rainfall using our [[Rainfall (Overlay)]] and use the [[Surface_avg_direction_result_type_(Water_Overlay)|Average Direction]] result to have a better idea of where the rain drops will end up based on momentum. Given that the rainfall is sufficiently large, this will remove local minima and solve most issues of unknown flow direction on flat surfaces.
The basic watershed algorithm has been adjusted to allow users to mark [[Waterway (Terrain Type)|waterways]] and [[Water surface (Terrain Type)|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.  
==Discharge Areas==
In a water system model, the waterways generally catch the rainfall and transport it elsewhere, often out of the system. These waterways can be considered the end point of a rain drops travel overland and we could call them discharge waterways.  


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.
Expert users often have grouped multiple waterways together to make it easier for analysis and discussion. The {{software}} allows to import these groups as areas, which we conceptually call [[Discharge area (Watershed Overlay)|Discharge areas]]. Each discharge area will then result into a unique watershed.


====Watershed Algoritm====
In practice, the provided Discharge areas do not fully cover the waterways geometrically. We therefore added an initialization step in which water cells that are not yet assigned to any discharge area be automatically assigned to one when they are connected as a neighbour or by a culvert.  
# 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====
In absence of, or in addition to, discharge areas, users can also choose to automatically add discharge areas for each individual waterway and waterbody. However, when these waterways or bodies are still connected to a provided Discharge area, they can still be overwritten by this prioritized discharge area.
* The watershed algorithm implementation is an adapted version of the algorithm proposed by Vitor et. al. <ref>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. </ref>.
* A plateau is a cell without a reference to other cells and without a unique label id. It can become either a:
** border cell, which will reference cells directing away from it;
** minima 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====
==Culverts==
* 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.
Since the propagation of discharge areas to neighboring waterways heavily relies on the connectivity of water system, [[Culvert_(Water_Overlay)|culverts]] are important. Optionally, we could even restrict this propagation based on the direction of the flow through this culvert, allowing only the propagation from A to B when B flows to A.


== References ==
Unfortunately, the available Geo data on the locations of culverts is often incomplete, containing mostly the most important culverts but missing the minor ones. We have therefore added a [[Water Connection Generator]] tool to automatically add culverts based on configured parameters.
In general it deals with concepts such as:
* culvert generally do not cross major roads, but can cross driveways on private plots;
* culverts generally connect waterways, and not large water bodies;
* culverts generally do not connect waterways of distinctly different heights or waterlevels;
 
==Input==
* [[waterway|Water terrains]];
* [[Discharge area (Watershed Overlay)|Discharge areas]] (Advised);
* Either:
**Water Overlay's [[Surface_avg_direction_result_type_(Water_Overlay)|surface average direction]] result type;
**[[Elevation model]].
* [[Culvert_(Water Overlay)|Culverts]]: Culverts are derived from
** a [[Water Overlay]] when the input is based on the directional result of that Water Overlay.
** buildings containing the CULVERT_DIAMETER attribute otherwise. The Culvert function contains this attribute by default.
: Also note that culverts can now be generated using the [[Water Connection Generator]].
 
==Options==
* [[Discharge remaining water (Watershed Overlay)|Discharge remaining water]]: Create additional discharge areas for waterways and bodies that are not connected by culverts to discharge areas.
* [[Min area (Watershed Overlay)|Minimal area]]: Only waterways and bodies with the required minimum size can become an additional discharge areas.
* [[Discharge_method_(Watershed_Overlay)|Discharge method]]:
** Height minima: Restricted to height map input data
** Water terrains: Restricted to directional data. Each water body is a separate discharge area.
** Specific areas: Restricted to directional data. Provided discharge areas are prioritized and set as input for watersheds. Water bodies that are connected by culverts to discharge area water bodies are assigned to that discharge area as well. Depending on the option "Discharge remaining water", the remaining water bodies are stored as a separate discharge area.
* [[Fill distance (Watershed Overlay)|Fill distance]]: unmatched cells are assigned to nearest watershed when within the provided distance.
* [[Culvert flow direction (Watershed Overlay)|Culvert flow direction]]: When active, a water body is only connected to an other water body when the first flows to the second.
* [[Limit road (Watershed Overlay)|Limit road]]: When active, the operation that assigns unmatched cells to the nearest watershed within the provided distance locally stops on cells that are roads.
 
==Result Types==
* [[Watersheds result type (Watershed Overlay)|Watershed]]
* [[Discharge areas result type (Watershed Overlay)|Discharge areas]]
* [[Direction result type (Watershed Overlay)|Direction]]
* [[Base types result type (Watershed Overlay)|Base types]]
<ul>
<li style = "display:inline-block">[[File:Watershed_Overlay.png|200xpx]]</li>
<li style = "display:inline-block">[[File:Discharge_areas_result.jpg|200xpx]]</li>
<li style = "display:inline-block">[[File:Direction result type (Watershed Overlay).jpeg|200xpx]]</li>
<li style = "display:inline-block">[[File:Watershed_base_types.jpeg|200xpx]]</li>
</ul>
{{WatershedOverlay_model_attribute_nav}}

Latest revision as of 13:40, 2 February 2024

Concept

  • Watershed introduction.png

The watershed module calculates watersheds for rainfall based on a DTM or a calculated flow direction result of a Water Overlay. The watershed overlay can provide an indication into which waterway or -body rainfall will end up. Users can assign and group waterways and -bodies using discharge areas as input data. Additionally, culverts that connect waterways and bodies can be taken into account, which enables connected waterways and -bodies to be automatically assigned to the prioritized client-provided discharge areas. The general concept is:

  1. Rainfall simulation is done and generates a directional result.
  2. Discharge areas indicate the locations where rainfall will conceptually be discharged out of the system. Each discharge area will result in a watershed.
  3. Discharge areas are expanded along the waterways and culvert connections.
  4. Based on the direction the rainfall has moved in, the watersheds are gradually backtracked starting from the discharge areas. This is done for each watershed in parallel.
  5. On locations where the watersheds meet, the backtracking stops.
  6. The end result will be an overlay with unique id numbers corresponding to a watershed based on the initial discharge area.

This is the general concept, but there are variations on this concept:

  • Terrain height can be used instead of a rainfall simulation. However, this approach suffers more from local mini and oversegmentation.
  • Discharge areas are advised but not required. Optionally, each waterway and waterbody can be identified as a unique discharge area, in turn resulting into unique watersheds.


Calculation

Historically, the calculation of watersheds for rainfall was done based on the gradient of the terrain. Issues occur when the terrain is near flat; it is not known where the rain water will flow and the direction will be assigned arbitrarily based on the used algorithm. Secondly, the terrain often contains a lot of local minimas, which results in the creation of too many unique watersheds (oversegmentation). To solve this, one would often apply filters to the terrain to remove these local minimas, but this required a lot of user judgement.

Fortunately, instead of using only the gradient of the terrain directly, we can also simulate rainfall using our Rainfall (Overlay) and use the Average Direction result to have a better idea of where the rain drops will end up based on momentum. Given that the rainfall is sufficiently large, this will remove local minima and solve most issues of unknown flow direction on flat surfaces.

Discharge Areas

In a water system model, the waterways generally catch the rainfall and transport it elsewhere, often out of the system. These waterways can be considered the end point of a rain drops travel overland and we could call them discharge waterways.

Expert users often have grouped multiple waterways together to make it easier for analysis and discussion. The Tygron Platform allows to import these groups as areas, which we conceptually call Discharge areas. Each discharge area will then result into a unique watershed.

In practice, the provided Discharge areas do not fully cover the waterways geometrically. We therefore added an initialization step in which water cells that are not yet assigned to any discharge area be automatically assigned to one when they are connected as a neighbour or by a culvert.

In absence of, or in addition to, discharge areas, users can also choose to automatically add discharge areas for each individual waterway and waterbody. However, when these waterways or bodies are still connected to a provided Discharge area, they can still be overwritten by this prioritized discharge area.

Culverts

Since the propagation of discharge areas to neighboring waterways heavily relies on the connectivity of water system, culverts are important. Optionally, we could even restrict this propagation based on the direction of the flow through this culvert, allowing only the propagation from A to B when B flows to A.

Unfortunately, the available Geo data on the locations of culverts is often incomplete, containing mostly the most important culverts but missing the minor ones. We have therefore added a Water Connection Generator tool to automatically add culverts based on configured parameters. In general it deals with concepts such as:

  • culvert generally do not cross major roads, but can cross driveways on private plots;
  • culverts generally connect waterways, and not large water bodies;
  • culverts generally do not connect waterways of distinctly different heights or waterlevels;

Input

Also note that culverts can now be generated using the Water Connection Generator.

Options

  • Discharge remaining water: Create additional discharge areas for waterways and bodies that are not connected by culverts to discharge areas.
  • Minimal area: Only waterways and bodies with the required minimum size can become an additional discharge areas.
  • Discharge method:
    • Height minima: Restricted to height map input data
    • Water terrains: Restricted to directional data. Each water body is a separate discharge area.
    • Specific areas: Restricted to directional data. Provided discharge areas are prioritized and set as input for watersheds. Water bodies that are connected by culverts to discharge area water bodies are assigned to that discharge area as well. Depending on the option "Discharge remaining water", the remaining water bodies are stored as a separate discharge area.
  • Fill distance: unmatched cells are assigned to nearest watershed when within the provided distance.
  • Culvert flow direction: When active, a water body is only connected to an other water body when the first flows to the second.
  • Limit road: When active, the operation that assigns unmatched cells to the nearest watershed within the provided distance locally stops on cells that are roads.

Result Types

  • Watershed Overlay.png
  • Discharge areas result.jpg
  • Direction result type (Watershed Overlay).jpeg
  • Watershed base types.jpeg