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
calculate_map [2026/07/04 23:29]
hermann
calculate_map [2026/07/15 01:17] (current)
hermann
Line 12: Line 12:
  
 ^ Name ^ Type ^ Description ^ ^ Name ^ Type ^ Description ^
-| Expression | [[Image Expression Type]] | The algebraic or logical formula used to compute each output cell, written using the [[Image Expression Type|image expression editor]]. Must be enclosed in square brackets ''​[ ]''​ in EGO Script. |+| Expression | [[Image Expression Type]] | The algebraic or logical formula used to compute each output cell. Must be enclosed in square brackets ''​[ ]''​ in EGO Script. |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
Line 20: Line 20:
 | Null Value | [[Null Value Type]] | Based on Cell Type | Sentinel value representing "no data" in the output. | | 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 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. |+| 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 ===== ===== Outputs =====
Line 51: Line 51:
  
 When the expression references more than one map, all of them are evaluated at the **same current cell** — ''​i1''​ and ''​i2''​ always refer to the same spatial location. Connected maps do **not** need matching extent, resolution, or pixel dimensions: Dinamica EGO reconciles this automatically through **image virtualization**,​ transparently wrapping each input in a virtual version sharing a common extent and the highest resolution among the inputs. The one requirement that virtualization does not relax is **projection** — all connected maps must share the same projection. When the expression references more than one map, all of them are evaluated at the **same current cell** — ''​i1''​ and ''​i2''​ always refer to the same spatial location. Connected maps do **not** need matching extent, resolution, or pixel dimensions: Dinamica EGO reconciles this automatically through **image virtualization**,​ transparently wrapping each input in a virtual version sharing a common extent and the highest resolution among the inputs. The one requirement that virtualization does not relax is **projection** — all connected maps must share the same projection.
 +
 +The ''​iX[LINE,​ COL]''​ form samples a map at an explicit coordinate rather than the current cell. Coordinates outside the image boundary are **mirrored** back into range. For a row coordinate ''​cellLine''​ in an image of N rows, ''​cellLine''​ is normally expected to be in the range [1, N]. When ''​cellLine''​ is outside this range, it is mirrored back: if ''​cellLine''​ ≤ 0, the effective row is ''​1 − cellLine''​ (for instance, ''​cellLine''​ = 0 → row 1, ''​cellLine''​ = −1 → row 2, ''​cellLine''​ = −2 → row 3); if ''​cellLine''​ > N, the effective row is ''​2N + 1 − cellLine''​ (for instance, ''​cellLine''​ = N+1 → row N, ''​cellLine''​ = N+2 → row N−1, ''​cellLine''​ = N+3 → row N−2). The same formula applies independently to the column coordinate ''​cellCol''​. If the target cell is null, the result is 0 rather than null.
  
 ==== Available expression features ==== ==== Available expression features ====