Main processing function of MODIStsp. Takes as input processing parameters specified by the user and performs all required processing.
MODIStsp_process(proc_opts, n_retries, verbose = TRUE, parallel = TRUE)The function is called for its side effects.
data.frame containing all processing parameters, as
passed from the MODIStsp GUI, or created in MODIStsp by joining
explicitly passed arguments with a (not mandatory) options file.
numeric maximum number of retries on download functions.
In case any download function fails more than n_retries times consecutively,
MODIStsp_process will abort, Default: 20
logical If FALSE, suppress processing messages, Default: TRUE
logical If TRUE (default), the function is run using parallel
processing, to speed-up the computation for large rasters (with a maximum
of 8 cores).
The number of cores is automatically determined; specifying it is also
possible (e.g. parallel = 4). In this case, more than 8 cores can be
specified. If FALSE (default), single core processing is used.
Lorenzo Busetto, phD (2014-2017)
Luigi Ranghetti, phD (2015)
After retrieving the input processing options, the function
Accesses NASA http archive to determine the list of files to be
downloaded/processed (or, in case of offline processing, get the list
of already available hdf files present in out_mod_folder);
Performs all required processing steps on each date (download, reprojection, resize, mosaicing, Spectral Indexes and Quality indicators computation);
Creates virtual files of the processed time series.
Reprojection and resize is dealt with by accessing gdal routines through the
gdalUtilities
package.
Extraction of bitfields from Quality layers is done though bitwise computation
Checks are done in order to not re-download already existing HDF images, and not
reprocess already processed dates (if the user did not specify that)