Calculate Categorical Map

Description

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.

This is one of Dinamica EGO’s six calculator functors. Its abbreviated (shorthand) syntax is ##. See 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

Name Type Description
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

Name Type Description Default Value
Cell Type Cell Type Data type for each output cell. Signed 32 Bit Integer
Null Value Null Value Type Sentinel value representing “no data” in the output. .default
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. Version 8.14.1 and earlier; replaced by Result Sparsity. No
Result Sparsity1 Enum Type Defines how the output map is stored. .dense stores all cells. .sparse stores only the non-null cells, saving memory at the expense of random-access speed. .auto makes the output map sparse when the calculation visits only the non-null cells of a sparse input map, because a null cell in it always makes the result null, and dense otherwise. See Null-strict maps. Models created with earlier versions are converted automatically: .no becomes .dense, .yes becomes .sparse, and a model that does not set Result Is Sparse uses .dense, because the flag defaulted to .no. This is an advanced port. .auto
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

Name Type Description
Result Categorical Map Type Computed categorical output map. Its dimensions come from the connected input maps, or from Result Format when given.

Group

Map Algebra

Notes

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

CalculateCategoricalMap

  1. Available in Dinamica EGO 8.15.0, currently a development version. Details may change before release. ↩


This documentation was generated with the help of large language models (LLMs) and may contain errors. Please verify critical information.