fast_wb2rect_df {ggspectra} | R Documentation |
Colours from wavebands
Description
Compute colours for a list of narrow wavebands or a range of wavelengths.
Usage
fast_wb2rect_df(w.band, chroma.type = "CMF", simplify = TRUE)
Arguments
w.band |
waveband or list of waveband objects. The waveband(s) determine
the wavelengths in variable |
chroma.type |
character telling whether "CMF", "CC", or "both" should be
returned for human vision, or an object of class |
simplify |
logical Flag indicating whether to merge neighbouring rectangles of equal color. |
Details
Function fast_wb2rect_df()
computes colours for
wavebands based on the midpoint wavelength and uses vectorization when
possible. It always returns color definitions with short names. The purpose
of merging of rectangles is to speed up rendering and to reduce the size of
vector graphics output. This function should be used with care as the color
definitions returned are only approximate and original waveband names can
be lost.
Function fast_wb2rect_df()
intended use is when colour definitions
are needed in a simple data frame as in the compute functions of
statistics that return colours.
Value
A data frame with columns "x", "y", "w.length", "wb.color", "wl.high", "wl.low".