geoprimsField-grade geospatial math

Band math

Evaluates your own expression over named bands or local GeoTIFFs: arithmetic, comparisons, a conditional, and a short list of functions, parsed and evaluated in the core rather than by a JavaScript evaluator.

0.698113

The expression comes to 0.698113.

Expression size
Provenance
Computed by
raster.index.band-math 1.0.0, core 0.1.0
Model
The expression is lexed and parsed into a tree, then evaluated in the core; identifiers are the bands given and the functions abs, sqrt, log, exp, min, max, and clamp, and nothing else
Accuracy
Exact double-precision arithmetic in the order the expression is written.
Notes
None
Cites
Institute of Electrical and Electronics Engineers, IEEE Standard for Floating-Point Arithmetic (IEEE 754)

Something look off?

Your values

Showing an example. Change anything.
Process local GeoTIFF files

Loading…

Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: The expression is lexed and parsed into a tree, then evaluated in the core; identifiers are the bands given and the functions abs, sqrt, log, exp, min, max, and clamp, and nothing else

Accuracy: Exact double-precision arithmetic in the order the expression is written.

When to use this: Use this for an index the catalog does not have, or a combination of your own: a ratio, a difference, a threshold, or a masked value written as a conditional. It is also the way to try a formula from a paper before deciding whether it deserves a tool of its own.

Limitations: Local raster inputs must share one grid; unlike the two-band index tools, band math does not resample mismatched files. Source no-data and non-finite expression results become no-data pixels. The language is deliberately small: no assignment, no loops, no user functions, and no way to reach anything outside the bands you pass, which is the point. An expression over about a thousand nodes is refused rather than evaluated.

Worked example: NDVI written by hand. Source: The NDVI definition written as band math: it gives the same 0.6981 as the NDVI tool. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.

You enter

Bands
nir, 0.45 red, 0.08
Expression
(nir - red) / (nir + red)

You get

Value
0.698113
Expression size
7

Review: Not yet independently reviewed by a GIS professional.

Last verified: 2026-09-22, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Checked against: 22 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources