MODIStsp helper function to compute Quality Indicators from HDF bit-field layers
Source:R/MODIStsp_process_QA_bits.R
MODIStsp_process_QA_bits.Rd
function used to extract quality indicator from MODIS aggregated quality layers
Usage
MODIStsp_process_QA_bits(
out_filename,
in_source_file,
bitN,
out_format,
nodata_source,
nodata_qa_in,
nodata_qa_out,
compress
)
Arguments
- out_filename
character
file name of the output raster files containing QI values- in_source_file
character
name of the file created by MODIStsp containing the data required to compute the quality indicator- bitN
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.)- out_format
output format (ENVI or GTiff)
- nodata_source
character
NoData values of the MODIS band containing data from which the bit field corresponding to the quality indicator must be extracted- nodata_qa_in
character
in NoData for quality bands ("255")- nodata_qa_out
character
out NoData for quality bands ("255")- compress
character
compression option for GTiff files
Details
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
Note
License: GPL 3.0
Based on the modis.qc.R
script by Yann Chemin (2008) (https://goo.gl/7Fhreo)
license GPL 3.0