Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

raster-methods

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

Manage, Analyse and Simulate Hyperspectral Data

v1.0.3
GPL
Authors
Lukas W. Lehnert [cre, aut] (<https://orcid.org/0000-0002-5229-2282>), Hanna Meyer [ctb], Joerg Bendix [ctb]
Initial release
2020-08-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.