Home

Awesome

MODIStsp <img src='man/figures/logo.png' align="right" height="139" />

<!-- badges: start -->

DOI Coverage
Status

<!-- badges: end -->

{MODIStsp} is a R package devoted to automatizing the creation of time series of rasters derived from MODIS Land Products data. {MODIStsp} allows performing several preprocessing steps (e.g., download, mosaicing, reprojection and resize) on MODIS data available within a given time period. Users have the ability to select which specific layers of the original MODIS HDF files they want to process. They also can select which additional Quality Indicators should be extracted from the aggregated MODIS Quality Assurance layers and, in the case of Surface Reflectance products, which Spectral Indexes should be computed from the original reflectance bands. For each output layer, outputs are saved as single-band raster files corresponding to each available acquisition date. Virtual files allowing access to the entire time series as a single file can be also created. All processing parameters can be easily selected with a user-friendly GUI, although non-interactive execution exploiting a previously created Options File is possible. Stand-alone execution outside an “R” environment is also possible, allowing to use scheduled execution of MODIStsp to automatically update time series related to a MODIS product and extent whenever a new image is available.

<a href="http://www.irea.cnr.it/en/"> <img src="man/figures/irea_logo.png" height="40" align="left" /></a>

<span style="font-style:italic;font-weight:bold;">{MODIStsp} was developed by Lorenzo Busetto and Luigi Ranghetti, Institute of Remote Sensing of Environment - National Research Council - Italy (CNR-IREA). It is dedicated to the memory of Lorenzo.</span>

Citation

To cite {MODIStsp} please use:

L. Busetto, L. Ranghetti (2016) MODIStsp: An R package for automatic preprocessing of MODIS Land Products time series, Computers & Geosciences, Volume 97, Pages 40-48, ISSN 0098-3004, https://doi.org/10.1016/j.cageo.2016.08.020, URL: https://github.com/ropensci/MODIStsp.

Website

For more information, documentation and examples of use, see also the {MODIStsp} website at docs.ropensci.org/MODIStsp.

Important News

Problems and Issues

<i class="fa fa-desktop" aria-hidden="true"></i> System Requirements

{MODIStsp} requires R v >= 3.6.3.


Installation Instructions

<i class="fa fa-windows" aria-hidden="true"></i> Installing on Windows

You can install the stable version of {MODIStsp} from CRAN:

install.packages("MODIStsp")

, or the development version (containing the latest improvements and bug fixes) from GitHub:

install.packages("remotes")
library(remotes)
install_github("ropensci/MODIStsp")

<i class="fa fa-linux" aria-hidden="true"></i> Installing on Linux Systems

To install {MODIStsp} on Linux, you need to be able to install the {sf} package, which requires several dependencies. See here if you have trouble installing {sf}.

Then, you can install the stable version of MODIStsp from CRAN:

install.packages("MODIStsp")

, or the development version (containing the latest improvements and bug fixes) from GitHub:

library(devtools)
install_github("ropensci/MODIStsp")

<i class="fa fa-apple" aria-hidden="true"></i> Installing on Mac

To install {MODIStsp} on Mac, you need to be able to install the {sf} package, which requires several dependencies. See here if you have trouble installing {sf}.

Then, you can install the stable version of {MODIStsp} from CRAN:

install.packages("MODIStsp")

, or the development version (containing the latest improvements and bug fixes) from GitHub:

library(devtools)
install_github("ropensci/MODIStsp")

Usage

The easiest way to use {MODIStsp} is to use its powerful GUI (Graphical User Interface) for selection of processing options, and then run the processing.

To open the GUI, load the package and launch the MODIStsp function, with no parameters:

library(MODIStsp)
MODIStsp()

This opens a Shiny GUI from which processing options can be specified (and eventually saved or loaded). After specifying all required parameters, clicking on “Start” will start the processing (see here for more detailed instructions).

{MODIStsp} can also be launched in non-interactive mode within an R session or script by setting the optional GUI parameter to FALSE, and the opts_file parameter to the path of a previously saved JSON Options file. This allows to exploit {MODIStsp} functionalities within generic “R” processing scripts.

library(MODIStsp) 
# --> Specify the path to a valid options file saved in advance from MODIStsp GUI 
opts_file <- "X:/yourpath/youroptions.json" 
  
# --> Launch the processing
MODIStsp(gui = FALSE, opts_file = opts_file)

Finally, {MODIStsp} can be run by manually specifying all processing arguments, or by overwriting some of the arguments contained in a saved json file in the call to the package, such as in:

library(MODIStsp) 
# --> Specify the path to a valid options file saved in advance from MODIStsp GUI 
opts_file <- "X:/yourpath/youroptions.json" 
  
# --> Launch the processing
MODIStsp(gui        = FALSE, 
         opts_file  = opts_file, 
         start_date = "2020.05.01", 
         end_date   = "2020.08.01", 
         spatmeth   = "file", 
         spafile    = "X:/path_to/spatial_extent_file.gpkg")

, where we are overwriting the options related to spatial and temporal extent contained in the options file with new values. This allows easily running processing based on the same main options (e.g., product layers, output format, etc.) but changing on the fly the desired ones.

See here for more detailed instructions and examples.

Code of Conduct

Please note that this package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.