raster-methods: Rasterbased methods for spectra

Raster-methodsR Documentation

Rasterbased methods for spectra

Description

Methods to manipulate, save, convert and plot spectra in Speclibs stored as RasterBrick

Usage

## S4 method for signature 'Speclib'
extract(x, y, ...)

## S4 method for signature 'Speclib,character'
writeRaster(x, filename, ...)

## S4 method for signature 'Speclib'
plotRGB(x, ...)

## S4 method for signature 'Speclib'
brick(x, ...)

Arguments

x

Speclib with RasterBrick-object for spectra

y

Object of any valid type to define area to extract

filename

Output filename

...

Additionaly arguments passed to basic funtions in the raster-package

Details

For extract, a Speclib is returned containing the data of y in the SI. Note that if y is a buffer, spatial lines or spatial polygon object, the respective data in y is copied for each spectrum so that the length of the SI equals the number of spectra.

For writeRaster, the Speclib is returned which is written to file. Please note that data in the SI and the wavelength information cannot be stored in a raster file at present. Therefore, it should be considered to store the entire Speclib as R-data file using the save-function in R.

Note for function brick that by default the values of the internal brick in the Speclib are copied to the new object. However, new brick objects with differing dimensions, bands etc. may be created if values == FALSE is passed as additional arguement.

Value

Speclib for extract and writeRaster. Object of class Brick for brick.

Author(s)

Lukas Lehnert


hsdar documentation built on March 18, 2022, 6:35 p.m.