Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
calculate_categorical_map [2026/07/07 16:07] hermann |
calculate_categorical_map [2026/08/28 03:11] (current) hermann Sync from local documentation review |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Description ===== | ===== Description ===== | ||
| - | Computes a new **categorical raster map** by evaluating an algebraic or logical expression independently for every cell in the output map. Functionally identical to [[Calculate Map]] — the same inputs, parameters, and expression language apply — but the output is typed as a categorical map, which preserves category semantics for downstream functors that distinguish categorical maps from continuous maps (e.g. [[Calc Areas]], [[For Each Category]]). | + | Computes a 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. |
| - | Use this functor when the expression produces integer class codes rather than measured or continuous values. If the expression produces continuous or measured values, use [[Calculate Map]] instead. | + | 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. |
| - | + | ||
| - | The **abbreviated syntax** (also called **shorthand**) for this functor is ''##''. See [[ego_script#calculator_functor_shorthand|Calculator functor shorthand]] in the EGO Script documentation for the full syntax of both the verbose and abbreviated forms, and [[calculate_functors|Calculate Functors — Complete Operator Documentation]] for the complete expression language reference. | + | |
| ===== Inputs ===== | ===== Inputs ===== | ||
| - | ^ Name ^ Type ^ Description ^ | + | ^ Name ^ Type ^ Description ^ |
| - | | Expression | [[Image Expression Type]] | The algebraic or logical formula used to compute each output cell's category code. Must be enclosed in square brackets ''[ ]'' in EGO Script. | | + | | 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 ^ Default ^ Description ^ | + | ^ Name ^ Type ^ Description ^ Default Value ^ |
| - | | Cell Type | [[Cell Type Type]] | Signed 32-bit Integer | Data type for each output cell. | | + | | Cell Type | [[Cell Type Type]] | Data type for each output cell. | Signed 32 Bit Integer | |
| - | | Null Value | [[Null Value Type]] | Based on Cell Type | Sentinel value representing "no data" in the output. | | + | | Null Value | [[Null Value Type]] | Sentinel value representing "no data" in the output. | .default | |
| - | | Result Is Sparse | [[Boolean Value Type]] | False | If true, only non-null cells are stored in memory — saves memory but slows random access. | | + | | Result Is Sparse | [[Boolean Value Type]] | If true, only non-null cells are stored, saving memory at the expense of random-access speed. This is an advanced port. | No | |
| - | | Result Format | [[Map Type]] | None | Optional reference map whose spatial format (extent, resolution, projection) is applied to the output. Category information in the reference map is ignored. | | + | | 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]] | The computed categorical output map. | | + | | 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 33: | Line 31: | ||
| ===== Notes ===== | ===== Notes ===== | ||
| - | All behaviour — hook functor wiring, spatial context, image virtualization, available expression features, null value handling, and performance — is identical to [[Calculate Map]]. See the [[Calculate Map#notes|Notes]] section of that page for full details. | + | 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. |
| + | |||
| + | See [[Calculate Functors — Complete Operator Documentation]] for the complete expression language, null-value handling rules, and worked examples. | ||
| ===== Internal Name ===== | ===== Internal Name ===== | ||
| - | ''CalculateCategoricalMap'' | + | CalculateCategoricalMap |