====== Calculate Categorical Map ====== ===== 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]]). 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. 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 ===== ^ 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. | ===== Optional Inputs ===== ^ Name ^ Type ^ Default ^ Description ^ | Cell Type | [[Cell Type Type]] | Signed 32-bit Integer | Data type for each output cell. | | Null Value | [[Null Value Type]] | Based on Cell Type | Sentinel value representing "no data" in the output. | | Result Is Sparse | [[Boolean Value Type]] | False | If true, only non-null cells are stored in memory — saves memory but slows random access. | | 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. Prefer this port over a ''Number Map'' hook when the map is needed only for format purposes — a hook defines an identifier in the expression namespace and blocks abbreviated syntax if that identifier is unused in the expression. | ===== Outputs ===== ^ Name ^ Type ^ Description ^ | Result | [[Categorical Map Type]] | The computed categorical output map. | ===== Group ===== [[Functor List#Map Algebra | Map Algebra]] ===== 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. ===== Internal Name ===== ''CalculateCategoricalMap''