The Landsat Collection 2 Level-1 Quality Assessment (QA) 16-bit band contains unsigned integers that represent bit-packed combinations of surface, atmospheric, and sensor conditions that can affect the overall usefulness of a given pixel.
The following conditions are available:
- Cloud (cloud presence / cloud mask)
- Cloud shadow
- Dilated cloud
- Cirrus
- Snow
- Water
- Clear
- Fill
- Cloud confidence (confidence in cloud presence)
- Cloud-shadow confidence (confidence in cloud shadow presence)
- Snow-ice confidence (confidence in snow or ice presence)
- Cirrus confidence (confidence in cirrus cloud presence)
Each of these values can be obtained using our utility function named decodeL8C2Qa. The function returns a dictionary of all conditions, where each condition contains an extracted value. Here is a working example script for extracting cloud values of the BQA band, with the other options commented below:
return [decodeL8C2Qa(BQA).cloud]
//return [decodeL8C2Qa(BQA).fill]
//return [decodeL8C2Qa(BQA).cloudShadow]
//return [decodeL8C2Qa(BQA).dilatedCloud]
//return [decodeL8C2Qa(BQA).cloudConfidence * 0.33]
//return [decodeL8C2Qa(BQA).cloudShadowConfidence * 0.33]
//return [decodeL8C2Qa(BQA).snowIceConfidence * 0.33]
//return [decodeL8C2Qa(BQA).cirrusConfidence * 0.33]Note: Terrain occlusion and radiometric saturation are not returned by
decodeL8C2Qa. In Collection 2 these conditions come from the separateQA_RADSATband.
Interpreting BQA values
Example interpretation: when using evalscript for Cloud, value 0 means clouds are not present, and value 1 means clouds are present. In the EO Browser, we can observe clouds in white, and all other pixels in black. Below are value interpretations for each of the available conditions.
Note: in the following tables, the color column represents a color legend for the EO Browser visualization, using the scripts listed above. The values could be visualized with different colors, if a different visualization was used.
Fill, Cloud, Cloud shadow, Dilated cloud, Cirrus, Snow, Water & Clear
Value |
Description |
Color |
0 |
This condition does not exist |
Black |
1 |
This condition exists |
White |
BQA Cloud over Italy, 2022-01-26
Cloud confidence, Cloud shadow confidence, Snow ice confidence & Cirrus confidence
Value |
Description |
Color |
0 |
Not Determined (algorithm did not determine the status of this condition) / No (this condition does not exist) |
Black |
1 |
Low - algorithm has low to no confidence that this condition exists (0-33 percent confidence) |
Dark grey |
2 |
Medium - algorithm has medium confidence that this condition exists (34-66 percent confidence) |
Light grey |
3 |
High - algorithm has high confidence that this condition exists (67-100 percent confidence) |
White |
BQA Cloud confidence over Italy, 2022-01-26
Comments
Article is closed for comments.