function used to extract quality indicator from MODIS aggregated quality layers
MODIStsp_process_QA_bits(
out_filename,
in_source_file,
bitN,
out_format,
nodata_source,
nodata_qa_in,
nodata_qa_out,
compress
)character file name of the output raster files
containing QI values
character name of the file created by MODIStsp
containing the data required to compute the quality indicator
character position of the bits corresponding to the quality
indicator of interest (e.g., 0-1 = first two bits; 2-5: bits from 2 to 5,
etc.)
output format (ENVI or GTiff)
character NoData values of the MODIS band containing
data from which the bit field corresponding to the quality indicator must
be extracted
character in NoData for quality bands ("255")
character out NoData for quality bands ("255")
character compression option for GTiff files
Lorenzo Busetto, phD (2017)
Luigi Ranghetti, phD (2017)
On the basis of the name of the image containing the aggregated quality information
(in_source_file``) and of the position of the bit fields corresponding to the QI of interest in the bitfield representation (bitN``), the function extracts the correct information exploiting
bitwise operators, and save the result in a new raster image