Create mask from Landsat QA layer or Sentinel-2 SCL terra::spatRaster objects
Details
The metadata layer from which the mask is derived should be specified in maskLyr. For now, mask derived from "qa_pixel" (for Landsat) and "SCL" (for Sentinel-2) are implemented.
Clouds, cloud shadow and pixels adjacent to clouds are always masked (when these fields are specified in the masking layer).
Snow and water can be masked by setting the respective parameters, by default these are not masked