encodeQA {RStoolbox} | R Documentation |
Encode QA Conditions to Integers
Description
Intended for use with Landsat 16-bit QA bands. Converts pixel quality flags from human readable to integer, which can then be used to
subset a QA image. Please be aware of the default settings which differ for different parameters.
Depending on, which sensor
and legacy
is selected, some quality parameters are not used, since the sequences of available bitwise quality designations differ per sensor and collection.
Usage
encodeQA(
fill = "no",
terrainOcclusion = "no",
radSaturation = "na",
cloudMask = "all",
cloud = "all",
cloudShadow = "all",
snow = "all",
cirrus = "all",
droppedPixel = "no",
water = "all",
droppedFrame = "no",
sensor = "OLI",
legacy = "collection1"
)
Arguments
fill |
Designated fill. Options: |
terrainOcclusion |
Terrain induced occlusion. Options: |
radSaturation |
Number of bands that contain radiometric saturation. Options: |
cloudMask |
Cloud mask. Options: |
cloud |
Cloud confidence. Options: |
cloudShadow |
Cloud shadow confidence. Options: |
snow |
Snow / ice confidence. Options: |
cirrus |
Cirrus confidence. Options: |
droppedPixel |
Dropped pixel. Options: |
water |
Water confidence. Options: |
droppedFrame |
Dropped frame. Options: |
sensor |
Sensor to encode. Options: |
legacy |
Encoding systematic Options: |
Value
Returns the Integer value for the QA values
Note
Only currently populated bits are available as arguments.
References
https://www.usgs.gov/landsat-missions/landsat-collection-1-level-1-quality-assessment-band for Collection 1 quality designations (legacy = "collection1"
)
Examples
encodeQA(snow = "low", cirrus = c("med", "high"), cloud = "high")