Toolbox for remote sensing image processing and analysis such as calculating spectral indices, principal component transformation, unsupervised and supervised classification or fractional cover analyses.
RStoolbox is an R package providing a wide range of tools for your every-day remote sensing processing needs. The available tool-set covers many aspects from data import, pre-processing, data analysis, image classification and graphical display. RStoolbox builds upon the raster package, which makes it suitable for processing large data-sets even on smaller workstations. Moreover in most parts decent support for parallel processing is implemented.
For more details have a look at the functions overview.
The package is now on CRAN and can be installed as usual via
install.packages("RStoolbox")
To install the latest version from GitHub you need to have r-base-dev (Linux) or Rtools (Windows) installed. Then run the following lines:
library(devtools)
install_github("bleutner/RStoolbox")
New:
oneHotEncode
: splits a single rasterLayer into multiple layers (one per class)
with one-hot encoding, i.e. pixel value = 1 for matches, pixel value = 0 for all other classes (background).ggR()
can now display more than one layer. Each layer can be plotted to a subplot in a multi-panel grafic.encodeQA()
, decodeQA()
and classifyQA()
can now deal with the new QA format introduced with Landsat Collection data. Legacy QA designations can still be interpreted by setting the legacy
argument.predict()
method for unsupervised classification models (unsuperClass
).Changes:
radCor
DOS methods now work for Landsat 8 OLIFixes:
unsuperClass
for algorithms other than Hartigan-Wong (reported by Alex Ilich)New:
tasseledCap
coefficients for Quickbird, Spot5 and RapidEyeChanges:
readEE
'Date' column is now returned as POSIXct instead of POSIXltFixes:
Fixes:
New:
mesma
for spectral unmixing (#33, provided by Jakob Schwalb-Willmann)Fixes:
Fixes:
Fixes:
readEE
for new EarthExplorer formatstasseledCap
coefficient for Landsat5 TM band 1 (reported by Thomas Day)readMeta
and stackMeta
to new Landsat collection 1 metadataNew:
spectralIndices()
can now apply a mask internally, e.g. to exclude cloud pixels. New arguments are:
maskLayer
and maskValue
(suggested by Andrea Hess).Fixes:
readEE()
to deal with new EarthExplorer export columns (reported by Christian Bauer)New:
spectralIndices()
has a new argument skipRefCheck, which skips the heuristic check for reflectance-like values [0,1] which is run if EVI/EVI2 are requested.
This can be usefull if clouds with reflectance > 1.5 are part of the image.superClass()
now returns the geometries which were used for validation, e.g. polygons (under $validation$geometry)
and also the exact samples taken for validation including cell number and coordinates ($validation$validationSamples)Changes:
radCor()
are adjusted to match current USGS recommendations from: https://landsat.usgs.gov/esunspectralIndices()
swir wavelength ranges are now defined consistently and correctly.
Bands formerly provided as swir1 (version <1.7.0) should now (>=1.7.0) be provided as swir2 and former swir2 as swir3 respectively (see docu).
The actual calculations were correct, but the naming was off.Fixes:
ggR()
and ggRGB()
in annotation mode (default). No image was drawn and excessive memory allocation requested (= RStudio crash) (reported by Christian Walther)spectralIndices()
documentation for NDWI. Formula was based on McFeeters1996 but attributed to Gao1996. Now there is NDWI (McFeeters) and NDWI2 (Gao) (reported by Christian Bauer)estimateHaze()
now ensures correct histogram order, which could be off when raster had to read from disk (reported by Xavier Bailleau).readMeta()
now makes concise bandnames also for Landsat Collection MTL files.radCor()
for Landsat 4 TM (reported by Thomas Day)classifyQA()
confidence layer for type='water' now correctly returns only confidence levels in [1,3]readSLI()
Deprecated:
spectralIndices()
index LSWI
has been deprecated, as it is identical with the now available NDWI2.Fixes:
Changes:
radCor()
is used to process only a subset of bands it will no longer return unprocessed bands along with processed bands. Instead only processed bands are returned.superClass()
will now use dataType = 'INT2S' for classification maps to avoid issues with raster NA handling in INT1UreadMeta()
and stackMeta()
(@aszeitz, #7)Fixes:
Deprecated:
norm
was dropped from rasterPCA, because it was effectively a duplicate of the standardized pca (spca) argument in the same function.New:
validateMap()
for assessing map accuracy separately from model fitting, e.g. after majority or MMU filteringgetValidation()
to extract specific validation results of superClass objects (proposed by James Duffy)spectralIndices()
for calculation of EVI/EVI2 based on scaled reflectance values.Changes:
estimateHaze
(@BayAludra, #4)Fixes:
New:
predict
for superClass. Disables prediction of full raster (validation is still conducted).Fixes:
New: New model for superClass: maximum likelihood classification (model = "mlc")
Fixes:
clamp
to turn this on or off (on by default).Added kernlab to suggested packages to be able to test \donttest{} examples
Initial release to CRAN (2015-09-05) with the following functions:
Included example data sets: