Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
calc_cumulative_flow_map [2026/07/08 17:19]
chrystian [Inputs] Fix input port name
calc_cumulative_flow_map [2026/08/28 03:09] (current)
hermann Sync from local documentation review
Line 3: Line 3:
 ===== Description ===== ===== Description =====
  
-This functor calculates ​a cumulative flow map using a flow direction map, an elevation ​map and flow partition map. The resulting map indicates ​the flow received by every cell directly ​and indirectly.+Calculates ​a cumulative flow map from a flow direction map, an optional flow weight ​mapand an optional ​flow partition map. Each cell of the resulting map holds the total flow it receives, ​directly ​or indirectly, from its neighbors.
  
 ===== Inputs ===== ===== Inputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
-| Flow Directions | [[Map Type]] ​ | This map defines the flow directions between cells. ​ |+| Flow Directions ​ | [[Map Type]] ​ | Map of possible ​flow directions between cells. Can hold either a single direction or multiple directions per cell.  |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^ ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^
-| Weight ​ | [[Map Type]] ​ | Weights ponder ​the cell flow, in terms of contributionIf this map is not provided, ​the functor assumes that weight ​is always ​1.  | None  | +| Weight ​ | [[Map Type]] ​ | Weight of the flow, that is, how much a cell's flow contributes to the flow of the cell it flows intoWhen not provided, ​every cell is treated as having a weight of 1.  | None  | 
-| Flow Partition ​ | [[Map Type]] ​ | This parameter defines the percentage ​of the flow transfered among cellsIf the functor does not receive this mapit is assumed that the flow is equally ​divided among the cells pointed by the "Flow Directions"​ map. | None  | +| Flow Partition ​ | [[Map Type]] ​ | For a multidirectional flow, indicates how much of a cell'​s ​flow goes to each neighbor it flows intoMust have at least 8 layers, one for each neighbor direction: layers 5, 6, and 7 for the neighbors above; layers 4 and 0 for the neighbors to the left and right; and layers 32, and 1 for the neighbors below. When not provided, ​flow is divided ​evenly ​among the cells it flows into | None  | 
-| Cell Type  | [[Cell Type Type]] ​  ​Defines ​the output map cell type.  | Signed 32 Bit Integer ​ | +| Cell Type  | [[Cell Type Type]] ​ Cell type of the output map.  | Signed 32 Bit Integer ​ | 
-| Null Accumulation ​ | [[Integer ​Value Type]] ​ | Defines ​the output map null value.  | -2147483648 ​ | +| Null Value  | [[Null Value Type]] ​ | Null value of the output map. Cannot be zero.  | Provided automatically ​ | 
-| Accumulation Is Sparse ​ | [[Integer ​Value Type]] ​ | If true, the map is loaded ​as a sparse ​image. Sparse images have the advantage of storing ​only the cells containing ​non-null ​valuesyet have diminished ​access ​time.  | False  |+| Accumulation Is Sparse ​ | [[Boolean ​Value Type]] ​ | If true, forces ​the accumulated flow map to be stored ​as a sparse ​raster, which stores ​only non-null ​cellstrading faster ​access ​for lower memory use. This is an advanced port.  | No  |
  
 ===== Outputs ===== ===== Outputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
-| Flow Accumulation ​ | [[Map Type]] ​ | Map where each cell represents ​the accumulated ​flow. The resulting flow comprises the flows received from the neighbors ​directly and indirectly. ​ |+| Flow Accumulation ​ | [[Map Type]] ​ | Map of accumulated flow, where each cell holds all the flow it receives ​directly and indirectly ​from its neighbors.  |
  
 ===== Group ===== ===== Group =====
Line 30: Line 30:
 ===== Notes ===== ===== Notes =====
  
-The direction ​map indicates ​the possible flow direction from every cells. See [[Calc Flow Direction Map]] for further information about the flow direction map.+The elevation ​map used to build Flow Directions must be the same one used by [[Calc Flow Direction Map]] to produce it; see that functor ​for more on the flow direction map.
  
-The elevation map must be the same map used to calculate ​the flow direction map. See [[Calc ​Flow Direction Map]] for further information.+When a cell points ​to its neighbor on a given side, the functor reads that neighbor'​s share of the flow from the Flow Partition layer assigned to that side, according to the following layout:
  
-The flow partition map is used to indicate how much flow goes into every possible branch (in case of a multidirectional flow source). This map must have at least 8 layers. Each layer corresponds to one of the cell neighbors as follows:+| Layer 5  | Layer 6  | Layer 7  | 
 +| Layer 4  |  | Layer 0  | 
 +| Layer 3  | Layer 2  | Layer 1  |
  
-| Layer 5  | Layer 6  | Layer 7 | +For example, a cell pointing to its left neighbor reads layer at the same position. If Flow Partition is not provided, the flow is evenly divided among the possible branches.
-| Layer  ​| ​         | Layer 0 | +
-| Layer 3  | Layer 2  | Layer 1 |+
  
-Example: If the central/​anchor ​cell points toward ​the left neighbor, the functor ​searches the partition information on the 4th layer at the same position ​of the cell.+Flow Weight defines how much a cell contributes to the overall accumulated flow. If it is not provided, the functor ​assumes a weight ​of 1 for every cell.
  
-If a partition map is not provided, the flow is evenly divided. +Raises an error if Null Value is zero.
- +
-The weight map defines how much a cell contributes to the overall accumulated flow. If a weight map is not provided, the functor assumes a weight of 1 for all cells.+
  
 ===== Internal Name ===== ===== Internal Name =====