| SpectraPoints-class {soil.spec} | R Documentation |
A class for spectral absorbance measurements typically in the medium infra-red range (MIR), visible near infra-red (VISMIR) and near-infra-red.
The class expects by default absorbance, and not reflectance values. For large data sets we advise using the wide data format.
metadata:object of class "data.frame"; metadata table containg relevant information such as "MID" (metadata ID), "Instrument_name", "Instrument_URL", "Laboratory_name", "Laboratory_contact" (contact person and his/her e-mail address), "Laboratory_URL", "Material_class" (e.g. soil or vegetation), "Wavenumber_conversion", "Wavenlength_unit", "Location_error"
data:object of class "Spectra"; contains absorbance values in wide or long format
sp:object of class "SpatialPoints"; sampling locations
signature(obj = "SpectraPoints"): default summary of the object showing number of bands and points
signature(obj = "SpectraPoints"): check for overlap in feature space in comparison to the calibration data
Tomislav Hengl and Andrew Sila
## generate the class:
library(sp)
library(rgdal)
data(afspec)
## get spatial coordinates:
sp <- afspec$samples[,c("Longitude","Latitude")]
coordinates(sp) <- ~Longitude+Latitude
proj4string(sp) <- CRS("+proj=longlat +datum=WGS84")
## prepare 'samples' table
samples <- cbind(afspec$samples["SAMPLEID"],
MID="AfSIS-MIR",
DateTime=Sys.time())
## convert to "SpectraPoints"
afspec.sp <- SpectraPoints(Spectra=Spectra(samples, afspec$ab), sp=sp)
summary(afspec.sp)
plot(afspec.sp@data)
data(m.PHIHOX)