Skip to main content

viz.decode_bqa

viz.decode_bqa(qa, cloud_bits=(1, 3, 4))

Decode the Landsat BQA / QA_PIXEL band into a boolean mask.

The default cloud_bits = (1, 3, 4) masks pixels flagged as cirrus (bit 1), cloud (bit 3), or cloud shadow (bit 4) per the Landsat C2 L2 specification. Pass a different list to include snow (bit 5) or other QA categories.