Landsat Collection 2 QA Pixel
imageryprocessing
Bit-packed per-pixel quality flags shipped as the `QA_PIXEL` band of
Landsat Collection 2 Level-2 surface-reflectance products (LSDS-1619
Data Format Control Book). One 16-bit unsigned integer per pixel
encodes fill, cloud, cloud-shadow, snow, water, and per-class confidence
fields. Canonical bit layout (Landsat 4-9 Collection 2):
| bit | meaning |
|-----|---------|
| 0 | Fill |
| 1 | Dilated cloud |
| 2 | Cirrus (Landsat 8/9 only) |
| 3 | Cloud |
| 4 | Cloud shadow |
| 5 | Snow |
| 6 | Clear |
| 7 | Water |
| 8-9 | Cloud confidence (00=none, 01=low, 10=medium, 11=high) |
| 10-11 | Cloud shadow confidence |
| 12-13 | Snow/ice confidence |
| 14-15 | Cirrus confidence (Landsat 8/9 only) |
Common usage is a bitwise unpack: `image.select('QA_PIXEL').bitwiseAnd(1 << 3).neq(0)`
picks the cloud bit. QA_PIXEL is equivalent to (but more granular than)
the Sentinel-2 SCL — every optical Landsat op consumes it as its primary
cloud / shadow / water / snow mask.
Canonical units:
categorical