Differences

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

Link to this comparison view

Next revision
Previous revision
for_each_region [2011/07/31 15:09]
hermann created
for_each_region [2026/08/28 03:20] (current)
hermann Sync from local documentation review
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 regionsIt manages both the processes of splitting ​map into several mapseach 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 regionEach execution is called ​step. While a step runsthe 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 ​ | [[ CategoricalMap ​Type| CategoricalMap  ​]]  | Map of subregions, ​e.g, countries, states, counties, etc.  |+| Regions ​ | [[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  ^ Description ​ ^ Default Value  
-Region Cell Type  | [[ Cell Type Type| Cell Type  ​]]  | Data cell type for the mask map of region ​internally stored.  | Unsigned 1 Bit Integer ​|  ​+Border Cells  | [[Non Negative Integer Value Type]] ​ | Number ​of lines and columns added as an extra border around each region ​in its regional maps.  | 0  ​| 
 +| Sequence Input  | [[None Type]] ​ | Ensures that the functor connected to this port finishes executing before this container starts. ​ | None  |
  
 ===== Outputs ===== ===== Outputs =====
 +
 +^ Name  ^ Type  ^ Description ​ ^
 +| Sequence Output ​ | [[None Type]] ​ | Connect this port to another container'​s Sequence Input to make this container finish executing before that other container starts. ​ |
 +
 +===== Internal Outputs =====
 +
 +^ Name  ^ Type  ^ Description ​ ^
 +| Region Manager ​ | [[Region Manager Type]] ​ | The region manager holding the regions being iterated. ​ |
 +| Step  | [[Integer Value Type]] ​ | Identifier of the region currently being processed. ​ |
  
 ===== Group ===== ===== Group =====
  
-[[Functor List#Region ​| Region]]+[[Functor List#Control ​Control]] 
 + 
 +===== Notes ===== 
 + 
 +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.
  
-===== Notes ===== +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.
  
-Since Boolean representation ​is used as a mask for a regionit is advisable to use "​Unsigned 1 Bit Integer" ​as the cell type for the region mask map.+When result produced by the contained functors ​is used outside the containerconnect 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