Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
for_each_region [2016/05/02 18:47] hermann |
for_each_region [2026/08/27 03:46] (current) hermann |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== For Each Region ====== | + | ====== For Each Region ====== |
| - | ===== Description ===== | + | === Description === |
| - | This container creates and manages regions identified by a categorical map, whose classes represent regions. It manages both the processes of splitting a map into several maps, each one comprising a region, and the subsequent merging of all regional maps in a mosaic, that is a new map. The container also calls the functors inside it to each region. | + | This container creates and manages the regions identified by a categorical map, and executes the functors it contains once for each region. Each execution is called a step. While a step runs, the container makes the region manager available to its contents through the internal output port Region Manager, and the identifier of the region currently being processed through the internal output port Step. |
| - | ===== Inputs ===== | + | === Inputs === |
| - | ^ Name ^ Type ^ Description ^ | + | ^ Name ^ Type ^ Description ^ |
| - | | Regions | [[Categorical Map Type]] | Map of subregions, e.g, countries, states, counties, etc. | | + | | Regions | [[categorical_map_type|Categorical Map Type]] | Map of subregions, such as countries, states, or counties. The cells that make up a region do not need to be contiguous. | |
| - | ===== Optional Inputs ===== | + | === Optional Inputs === |
| - | ^ Name ^ Type ^ Description ^ Default Value ^ | + | ^ Name ^ Type ^ Default ^ Description ^ |
| - | | Border Cells | [[Non Negative Integer Value Type]] | Number of lines and columns used to create an additional border around each region. | 0 | | + | | Border Cells | [[non_negative_integer_value_type|Non Negative Integer Value Type]] | 0 | Number of lines and columns added as an extra border around each region in its regional maps. | |
| + | | Sequence Input | [[none_type|None Type]] | None | Ensures that the functor connected to this port finishes executing before this container starts. | | ||
| - | ===== Outputs ===== | + | === Outputs === |
| - | None. | + | ^ Name ^ Type ^ Description ^ |
| + | | Sequence Output | [[none_type|None Type]] | Connect this port to another container's Sequence Input to make this container finish executing before that other container starts. | | ||
| - | ===== Internal Outputs ===== | + | === Internal Outputs === |
| - | ^ Name ^ Type ^ Description ^ | + | ^ Name ^ Type ^ Description ^ |
| - | | Step | [[Integer Value Type]] | Current region identifier. | | + | | Region Manager | [[region_manager_type|Region Manager Type]] | The region manager holding the regions being iterated. | |
| + | | Step | [[integer_value_type|Integer Value Type]] | Identifier of the region currently being processed. | | ||
| - | ===== Group ===== | + | === Group === |
| - | [[Functor List#Region | Region]] | + | [[functor_list#control|Control]] |
| - | ===== Notes ===== | + | === Notes === |
| - | Since a Boolean representation is used as a mask for a region, it is advisable to use "Unsigned 1 Bit Integer" as the cell type for the region mask map. | + | * When there is no dependency between regions, this container may process several of them at the same time instead of one after another. |
| + | * [[Get Region Info]], [[Regionalize Map]], [[Regionalize Categorical Map]], and [[Region]] placed directly inside this container read the current region automatically through their own inputs, with no need to connect Region Manager or Step explicitly. | ||
| + | * The region manager this container exposes only supports splitting a map into its regions — it cannot be used to merge regional maps back together. Placing [[Merge Regional Maps]] or [[Merge Regional Categorical Maps]] inside this container, reading from its region manager, causes the model to report an error. Placing [[Regional Map]] or [[Regional Categorical Map]] here has no effect, since there is nothing for them to register a map against. | ||
| + | * When a result produced by the contained functors is used outside the container, connect a matching junction (such as [[Map Junction]] or [[Value Junction]]) after the container, so a value still reaches the rest of the model if there are no regions to process. | ||
| - | ===== Internal Name ===== | + | === Internal Name === |
| ForEachRegion | ForEachRegion | ||