Rasterbased methods for spectra
Methods to manipulate, save, convert and plot spectra in Speclibs stored as RasterBrick
## 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, ...)
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 |
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.
Speclib
for extract
and writeRaster
. Object of class Brick
for brick
.
Lukas Lehnert
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.