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.
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")
Designated fill. Options: c("yes", "no", "all")
.
Terrain induced occlusion. Options: c("yes", "no", "all")
.
Number of bands that contain radiometric saturation. Options: c("na", "low", "med", "high", "all")
for no bands, 1-2 bands, 3-4 bands, 5 or more bands contain saturation.
Cloud mask. Options: c("yes", "no", "all")
.
Cloud confidence. Options: c("na", "low", "med", "high", "all")
.
Cloud shadow confidence. Options: c("yes", "no", "all")
.
Snow / ice confidence. Options: c("na", "low", "med", "high", "all")
.
Cirrus confidence. Options: c("na", "low", "med", "high", "all")
.
Dropped pixel. Options: c("yes", "no", "all")
.
Water confidence. Options: c("na", "low", "med", "high", "all")
.
Dropped frame. Options: c("yes", "no", "all")
.
Sensor to encode. Options: c("OLI", "TIRS", "ETM+", "TM", "MSS")
.
Encoding systematic Options: c("collection1", "pre_collection")
. Default is "collection1" for the Landsat Collection 1 8-bit quality designations. Use "pre_collection" for imagery downloaded before the Collection 1 quality designations were introduced
Returns the Integer value for the QA values
https://landsat.usgs.gov/qualityband for pre collection quality designations (legacy = "pre_collection"
)
https://landsat.usgs.gov/collectionqualityband for Collection 1 quality designations (legacy = "collection1"
)
# NOT RUN {
encodeQA(snow = "low", cirrus = c("med", "high"), cloud = "high")
# }
Run the code above in your browser using DataLab