Tools for Remote Sensing Data Analysis

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


To install the latest version from GitHub you need to have r-base-dev (Linux) or Rtools (Windows) installed. Then run the following lines:



RStoolbox 0.1.6


  • fix import issue: replace deprecated export from caret

RStoolbox 0.1.5


  • If the bandSet argument in 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.
  • By default superClass() will now use dataType = 'INT2S' for classification maps to avoid issues with raster NA handling in INT1U
  • Allow reading and importing from Landsat MSS MTL files with readMeta() and stackMeta() (@aszeitz, #7)


  • fix readMeta time-stamp conversion now correctly set to GMT time (@mraraju, #12)
  • radCor caused R to crash if bandSet was a single band
  • fix single RasterLayer capability for superClass
  • spectralIndices now calculates all documented indices if specified to do so (@mej1d1, #6)
  • unsuperClass predicted map now handles NAs properly
  • pifMatch did not return adjusted image (@tmb3006, #13)


  • argument norm was dropped from rasterPCA, because it was effectively a duplicate of the standardized pca (spca) argument in the same function.

RStoolbox 0.1.4


  • new function validateMap() for assessing map accuracy separately from model fitting, e.g. after majority or MMU filtering
  • new function getValidation() to extract specific validation results of superClass objects (proposed by James Duffy)
  • new spectral index NDVIc (proposed by Jeff Evans)
  • new argument scaleFactor for spectralIndices() for calculation of EVI/EVI2 based on scaled reflectance values.
  • implemented dark object subtraction radCor(..,method='sdos') for Landsat 8 data (@BayAludra, #4)


  • superClass based on polygons now considers only pixels which have their center coordinate within a polygon
  • rasterCVA now returns angles from 0 to 360° instead of 0:45 by quadrant (reported by Martin Wegmann)
  • improved dark object DN estimation based on maximum slope of the histogram in estimateHaze (@BayAludra, #4)


  • superClass failed when neither valData or trainPartition was specified. regression introduced in 0.1.3 (reported by Anna Stephani)
  • spectralIndices valid value range of EVI/EVI2 now [-1,1]
  • radCor returned smallest integer instead of NA for some NA pixels
  • fix 'sdos' for non-contiguous bands in radCor (@BayAludra, #4)

RStoolbox 0.1.3


  • new logical argument predict for superClass. Disables prediction of full raster (validation is still conducted).
  • new generic predict() function for superClass objects. Useful to separate model training and prediction.
  • new example data set (landcover training polygons) for lsat example data under /extdata/trainingPolygons.rds


  • fix histMatch for single layers (affected also 'ihs' pan-sharpening)
  • fix superClass validation sampling for factors (character based factors could lead to wrong factor conversions and wrong validation results)
  • improved handling of of training polygons with overlaps and shared borders in superClass
  • improved checks and error messages for insufficient training polygons

RStoolbox 0.1.2

New: New model for superClass: maximum likelihood classification (model = "mlc")


  • Restrict calculation of EVI/EVI2 to reflectance data (#3)
  • Enforce valid value ranges in radCor: radiance: [0,+Inf], reflectance: [0,1]. Includes a new argument clamp to turn this on or off (on by default).

RStoolbox 0.1.1

Added kernlab to suggested packages to be able to test \donttest{} examples

RStoolbox 0.1.0

Initial release to CRAN (2015-09-05) with the following functions:

  • classifyQA()
  • cloudMask()
  • cloudShadowMask()
  • coregisterImages()
  • decodeQA()
  • encodeQA()
  • estimateHaze()
  • fortify.raster()
  • fCover()
  • getMeta()
  • ggR()
  • ggRGB()
  • histMatch()
  • ImageMetaData()
  • normImage()
  • panSharpen()
  • pifMatch()
  • radCor()
  • rasterCVA()
  • rasterEntropy()
  • rasterPCA()
  • readEE()
  • readMeta()
  • readRSTBX()
  • readSLI()
  • rescaleImage()
  • rsOpts()
  • sam()
  • saveRSTBX()
  • spectralIndices()
  • stackMeta()
  • superClass()
  • tasseledCap()
  • topCor()
  • unsuperClass()
  • writeSLI()

Included example data sets:

  • data(srtm)
  • data(lsat)
  • data(rlogo)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.10 by Benjamin Leutner, 11 days ago,

Report a bug at

Browse source code at

Authors: Benjamin Leutner [cre, aut], Ned Horning [aut]

Documentation:   PDF Manual  

GPL (>= 3) license

Imports raster, caret, sp, XML, geosphere, ggplot2, reshape2, rgeos, rgdal, codetools, parallel, doParallel, foreach, Rcpp, methods

Suggests randomForest, kernlab, e1071, gridExtra, pls, testthat

Linking to Rcpp, RcppArmadillo

Imported by moveVis.

See at CRAN