Skip to contents

Helper function used in MODIStsp_process to identify which MODIS hdf layers are required for the current process. The required layers include all MODIS original layers selected by the user, plus all those required to compute the Spectral Indexes and Quality Indicators selected by the user

Usage

get_reqbands(
  bands_indexes_matrix,
  indexes_bandsel,
  indexes_bandnames,
  quality_bandsel,
  quality_bandnames,
  out_prod_folder,
  file_prefix,
  yy,
  DOY,
  out_format,
  reprocess
)

Arguments

bands_indexes_matrix

matrix built by set_bandind_matrix

indexes_bandsel

character arraySpectral Indexes to be computed starting from reflectance bands. You can get a list of available quality layers for a given product using function MODIStsp_get_prodlayers (e.g., MODIStsp_get_prodlayers("M*D13Q1")$indexes_bandnames), Default: NULL

indexes_bandnames

names of all indexes available for the product being processed

quality_bandsel

character array Quality Indicators to be computed starting from bit fields of original MODIS layers. You can get a list of available quality layers for a given product using function MODIStsp_get_prodlayers (e.g., MODIStsp_get_prodlayers("M*D13Q1")$quality_bandnames), Default: NULL

quality_bandnames

names of all quality indicators available for the product being processed

out_prod_folder

character Main folder where the MODIStsp processed raster will be stored. Used to check if a given processed image already exists.

file_prefix

File prefix corresponding to the MODIS product being processed. Used to check if a given processed image already exists.

yy

Year corresponding to the image being processed. Used to check if a given processed image already exists.

DOY

DOY corresponding to the image being processed. Used to check if a given processed image already exists.. Used to check if a given processed image already exists.

out_format

character ["ENVI" | "GTiff"] Desired output format.

reprocess

logical If TRUE, reprocess data for already existing dates.

Value

req_bands_indexes

Author

Lorenzo Busetto, phD (2017)