Skip to contents

function used to compute spectral indexes, given the index formula

Usage

MODIStsp_process_indexes(
  out_filename,
  out_prod_folder,
  formula,
  bandnames,
  nodata_out,
  indexes_nodata_out,
  file_prefix,
  compress,
  yy,
  out_format,
  DOY,
  scale_val
)

Arguments

out_filename

character basename of the file in to which save results

out_prod_folder

character output folder for the product used to retrieve filenames of rasters of original bands to be used in computations

formula

character Index formula, as derived from XML file and stored in prod_opts within previous_file

bandnames

character array of names of original HDF layer. Used to identify the bands required for index computation

nodata_out

character array of NoData values of reflectance bands

indexes_nodata_out

character NoData value for resulting raster

file_prefix

character used to retrieve filenames of rasters of original bands to be used in computations

compress

character compression option for GTiff files

yy

character year string used to retrieve filenames of rasters of original bands to be used in computations

out_format

character string used to retrieve filenames of rasters of original bands to be used in computations

DOY

character doy string used to retrieve filenames of rasters of original bands to be used in computations

scale_val

character (Yes/No) if Yes, output values in are computed as float -1 - 1, otherwise integer -10000 - 10000

Value

NULL - new raster file saved in out_filename

Details

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

Note

License: GPL 3.0

Author

Lorenzo Busetto, phD (2017)

Luigi Ranghetti, phD (2017)