# Decision Functions

▸ case() (opens new window)

Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.

▸ match() (opens new window)

Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. ["get", "building_type"]). Each label must be either:
  • a single literal value; or
  • an array of literal values, whose values must be all strings or all numbers (e.g. [100, 101] or ["c", "b"]). The input matches if any of the values in the array matches, similar to the "in" operator.
Each label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.

▸ coalesce() (opens new window)

Evaluates each expression in turn until the first non-null value is obtained, and returns that value.

▸ all() (opens new window)

Returns true if all the inputs are true, false otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to false, the result is false and no further input expressions are evaluated.

▸ any() (opens new window)

Returns true if any of the inputs are true, false otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to true, the result is true and no further input expressions are evaluated.

▸ within() (opens new window)

Returns true if the evaluated feature is fully contained inside a boundary of the input geometry, false otherwise. The input value can be a valid GeoJSON of type Polygon, MultiPolygon, Feature, or FeatureCollection. Supported features for evaluation:
  • Point: Returns false if a point is on the boundary or falls outside the boundary.
  • LineString: Returns false if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.