function used to compute spectral indexes, given the index formula
MODIStsp_process_indexes(
out_filename,
out_prod_folder,
formula,
bandnames,
nodata_out,
indexes_nodata_out,
file_prefix,
compress,
yy,
out_format,
DOY,
scale_val
)NULL - new raster file saved in out_filename
character basename of the file in to which save results
character output folder for the product used to retrieve filenames
of rasters of original bands to be used in computations
character Index formula, as derived from XML file and stored in prod_opts
within previous_file
character array of names of original HDF layer. Used to identify the
bands required for index computation
character array of NoData values of reflectance bands
character NoData value for resulting raster
character used to retrieve filenames of rasters of original bands
to be used in computations
character compression option for GTiff files
character year string used to retrieve filenames of rasters of original bands
to be used in computations
character string used to retrieve filenames of rasters of original bands
to be used in computations
character doy string used to retrieve filenames of rasters of original bands to be
used in computations
character (Yes/No) if Yes, output values in are computed as float -1 - 1,
otherwise integer -10000 - 10000
Lorenzo Busetto, phD (2017)
Luigi Ranghetti, phD (2017)
the function parses the index formula to identify the required bands. On the basis of identified bands, it retrieves the reflectance bands required, gets the data into R raster objects, performs the computation and stores results in a GeoTiff or ENVI raster file