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_patch_label_map [2012/10/12 14:46]
admin [Output]
calc_patch_label_map [2026/08/28 03:11] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Calc Patch Label Map ====== ​+====== Calc Patch Label Map ======
  
 ===== Description ===== ===== Description =====
  
-This functor labels ​patches of cells using sequential numbers. A patch consists of continuous ​group of neighboring cells of the same category.+Labels ​patches of cells in a feature map using sequential numbers. A patch is contiguous ​group of neighboring ​non-null ​cells; each patch found in Source is assigned its own label in the output map, starting from Initial Patch Label. 
 + 
 +Neighboring cells are searched using a window of Window Lines by Window Columns cells, centered on each cell; even window dimensions are automatically rounded up to the nearest odd number. By default, this window is 3x3 and considers cells touching diagonally as well as orthogonally as neighbors, unless Only Orthogonals Are Allowed restricts adjacency to horizontal and vertical neighbors only. Using a window larger than 3x3 allows cells that are not directly touching to still be identified as part of the same patch, bridging small gaps between them.
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Source ​ | [[Map Type|Map]]  | Map whose non-null cells correspond to an occurrence of a category  ​|+| Source ​ | [[Map Type]] ​ | Map of features. Non-null cells correspond to an occurrence of a feature |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
-^ Name ^ Type ^ Description ^ Default Value ^ +^ Name  ^ Type  ^ Description ​ ^ Default Value  
-| Initial Patch Label  | [[Int Type|Int]]  | Initial number used to label the first patch found on the map.  | 1  | +| Initial Patch Label  | [[Integer Value Type]] ​ | Label assigned ​to the first patch found in Source. This is an advanced port.  | 1  | 
-| Only Orthogonals Are Allowed ​ | [[Bool Type|Bool]]  | If true, only orthogonal ​cells will be considered ​first order neighbors. ​ | False  | +| Only Orthogonals Are Allowed ​ | [[Boolean Value Type]] ​ | If true, only cells connected horizontally or vertically are considered neighbors. This is an advanced port.  | No  | 
-| Window Lines  | [[Positive ​Int Type|Positive Int]]  | Number of lines of the neighbor search window. ​ | 3  | +| Window Lines  | [[Positive ​Integer Value Type]] ​ | Number of lines of the neighbor search window. This is an advanced port.  | 3  | 
-| Window Columns ​ | [[Positive ​Int Type|Positive Int]]  | Number of columns of the neighbor search window. ​ | 3  | +| Window Columns ​ | [[Positive ​Integer Value Type]] ​ | Number of columns of the neighbor search window. This is an advanced port.  | 3  | 
-| Cell Type  | [[Cell Type Type|Cell ​Type]] ​ | Data cell type.  | Signed 32 Bit Integer ​ | +| Cell Type  | [[Cell Type Type]] ​ | Cell type of the output map.  | Signed 32 Bit Integer ​ | 
-| Null Value  | [[Int Type|Int]]  | Null value. ​ |  | +| Null Value  | [[Null Value Type]] ​ | Null value of the output map.  | -2147483648 ​ | 
-| Patch Labels Are Sparse ​ | [[Bool Type|Bool]]  | If true, the map is loaded ​as a sparse ​image. Sparse images have the advantage of storing ​only the cells containing ​non-null ​valuesbut they have diminished ​access time.  | False  |+| Patch Labels Are Sparse ​ | [[Boolean Value Type]] ​ | If true, forces ​the output ​map to be saved as a sparse ​raster set, which stores ​only non-null ​cellstrading slower ​access time for reduced storage. This is an advanced port.  | No  | 
 +| Use Sequential Patch Labels ​ | [[Boolean Value Type]] ​ | If true, patch labels are assigned sequentially with no gaps. Otherwise, the label sequence used to identify patches may contain gaps. This is an advanced port.  | No  |
  
-===== Output ​=====+===== Outputs ​=====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Patch Labels ​ | [[Categorical Map Type|Categorical Map]]  | Map showing each group of cells as a patch identified by a label. It has the same dimensions as the source map.  |+| Patch Labels ​ | [[Categorical Map Type]] ​ | Map with the same dimensions as Source, where each cell holds the label of the patch it belongs to.  |
  
 ===== Group ===== ===== Group =====
  
-[[Functor List#Map Algebra|Map Algebra]]+[[Functor List#Map Algebra | Map Algebra]]
  
 ===== Notes ===== ===== Notes =====
  
-The use of windows bigger than 3x3 allows disjoint cells to be considered as neighbors.+Raises an error if Cell Type is not compatible with categorization,​ or if Null Value is not compatible with Cell Type.
  
 ===== Internal Name ===== ===== Internal Name =====