Main processing function of MODIStsp. Takes as input processing parameters specified by the user and performs all required processing.
Arguments
- proc_opts
data.frame
containing all processing parameters, as passed from the MODIStsp GUI, or created inMODIStsp
by joining explicitly passed arguments with a (not mandatory) options file.- n_retries
numeric
maximum number of retries on download functions. In case any download function fails more thann_retries
times consecutively, MODIStsp_process will abort, Default: 20- verbose
logical
If FALSE, suppress processing messages, Default: TRUE- parallel
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.
Details
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)
Note
Thanks Tomislav Hengl and Babak Naimi, whose scripts made the starting point for development of this function (ModisDownload; Download_and_resampling_of_MODIS_images)
License: GPL 3.0