Skip to contents

find index position of the nearest spectra (band) in the dataset. Match for the lowest difference between integer band and actual SpatRaster band. This will produce duplicates with multiple bands. Drop.

Usage

spectra_position(raster, spectra)

Arguments

raster

a terra SpatRaster.

spectra

vector with choice of desired spectra.

Value

positions (indices) of desired spectra in SpatRaster

See also