Differences

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

Link to this comparison view

Next revision
Previous revision
calculate_categorical_map [2011/07/25 01:30]
hermann created
calculate_categorical_map [2026/08/28 03:11] (current)
hermann Sync from local documentation review
Line 3: Line 3:
 ===== Description ===== ===== Description =====
  
-This container calculates ​a categorical map using algebraic/logical expression ​involving mapstables ​and values.+Computes ​new categorical ​raster ​map by evaluating an algebraic ​or logical expression ​independently for every cell of the output map. Functionally identical to [[Calculate Map]] — the same inputs, parameters, and expression language apply — except that its output is typed as a categorical map, preserving category semantics for downstream functors that distinguish categorical maps from continuous ones (e.g. [[Calc Areas]], [[For Each Category]]). Use this functor when the expression produces integer class codes; use [[Calculate Map]] instead for continuous or measured ​values
 + 
 +This is one of Dinamica EGO's five calculator functors. Its abbreviated (shorthand) syntax is ''##''​. See [[ego_script#​calculator_functor_shorthand|Calculator functor shorthand]] in the EGO Script documentation for the verbose and abbreviated forms, and [[Calculate Functors — Complete Operator Documentation]] for the full expression language reference.
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name       ​^ Type                                         ​^ Description ​                                                      ​+^ Name  ^ Type  ^ Description ​ 
-| Expression | [[Image Expression Type | Image Expression]] | Algebraic or logical ​expression ​used to calculate the output ​map. |+| Expression ​ | [[Image Expression Type]] ​ | Algebraic or logical ​formula ​used to compute each output ​cell's category code. Must be enclosed in square brackets ''​[ ]''​ in EGO Script |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
-^ Name             ​^ Type                           ​^ Description ​                                                                                                                                                                          ​^ Default Value         ​+^ Name  ^ Type  ^ Description ​ ^ Default Value  
-| Cell Type        | [[Cell Type Type | Cell Type]] | Data cell type                                                                                                                                                                        | Signed 32 Bit Integer | +| Cell Type  | [[Cell Type Type]] ​ | Data type for each output cell.  ​| Signed 32 Bit Integer ​ 
-| Null Value       ​| [[Int Type | Int]]             ​Null value                                                                                                                                                                            -2147483648 ​          +| Null Value  | [[Null Value Type]] ​ Sentinel ​value representing "no data" in the output.  ​.default  ​
-| Result Is Sparse | [[Bool Type | Bool]]           ​| If true, the resulting map is created as a sparse image. Sparse images have the advantage of storing ​only the cells containing ​non-null ​valuesbut they have diminished ​access ​time. | False                 |+| Result Is Sparse ​ | [[Boolean Value Type]] ​ | If true, only non-null ​cells are storedsaving memory at the expense of random-access ​speedThis is an advanced port.  ​No  | 
 +| Result Format ​ | [[Map Type]] ​ | Reference map whose spatial format (extent, resolution, projection) is applied to the output; its category information,​ if any, is ignored. Prefer this port over a Number Map hook when a map is needed only for format purposes, since a hook defines an identifier in the expression namespace and blocks abbreviated syntax if that identifier goes unused in the expression. This is an advanced port.  | .none  ​|
  
 ===== Outputs ===== ===== Outputs =====
  
-^ Name   ​^ Type                                       ​^ Description ​                        ​+^ Name  ^ Type  ^ Description ​ 
-| Result | [[Categorical Map Type | Categorical Map]] | Output ​map of classes ​or categories ​|+| Result ​ | [[Categorical Map Type]] ​ Computed categorical output ​map. Its dimensions come from the connected input maps, or from Result Format when given.  ​|
  
 ===== Group ===== ===== Group =====
Line 28: Line 31:
 ===== Notes ===== ===== Notes =====
  
-The expression result is calculated as a real value and converted to the data cell type of the output ​map+All behavior — hook functor wiring, shared-cell evaluation and image virtualization across connected maps, null propagation, ​and the requirement that at least one map or Result Format be provided — is identical to [[Calculate Map]]. See that functor'​s Notes for full details.
- +
-If the calculation of the expression diverges ​or if the data cell type is not large enough, the corresponding cell is filled with the null value.+
  
-The list of mathematical and logical operators that can be employed in the logic/​algebraic expression can be found in the [[Image Expression Type | image expression reference]].+See [[Calculate Functors — Complete Operator Documentation]] for the complete expression language, null-value handling rules, and worked examples.
  
-The maps used by the "​Calculate Categorical Map" must be provided by a corresponding [[Number Map]], the tables must be provided by a corresponding [[Number Table]] and the values must be provided by a corresponding [[Number Value]]. 
-  
 ===== Internal Name ===== ===== Internal Name =====
  
 CalculateCategoricalMap CalculateCategoricalMap