geo_index_all: Compute All Eligible Spectral Indices Automatically

View source: R/geo_index_all.R

geo_index_allR Documentation

Compute All Eligible Spectral Indices Automatically

Description

Automatically detects which spectral indices can be computed given the available bands in a terra::SpatRaster image (or raster file path) and calculates all of them.

Usage

geo_index_all(
  image,
  bands = NULL,
  scale_factor = NULL,
  sensor = NULL,
  quiet = FALSE,
  ...
)

Arguments

image

A terra::SpatRaster object or raster file path containing multispectral bands.

bands

Optional named vector or list specifying custom band mapping.

scale_factor

Optional numeric scaling divisor (e.g. 10000).

sensor

Optional character string specifying a sensor preset.

quiet

Logical. If FALSE (default), outputs an informative message listing which indices were detected and computed.

...

Additional parameters passed to index calculation functions.

Value

A multi-layer terra::SpatRaster containing all computable indices as individual layers.

Examples

img <- get_example_data()

# Compute all supported indices compatible with img bands
all_idx <- geo_index_all(img)
names(all_idx)


GeoIndexR documentation built on Oct. 10, 2026, 5:08 p.m.