How can I access data in Landsat 8 Quality Assessment band?

Home > Faq > How can I access data in Landsat 8 Quality Assessment band?

The Landsat Collection 1 Level-1 Quality Assessment (QA) 16-bit band, as defined at https://landsat.usgs.gov/collectionqualityband, contains unsigned integers that represent bit-packed combinations of surface, atmospheric, and sensor conditions that can affect the overall usefulness of a given pixel.

Designated fill, terrain occlusion and cloud values represent if a condition exists:

- 0 = This condition does not exist
- 1 = This condition exists

Radiometric saturation represent how many bands contain saturation:

- 0 = No bands contain saturation
- 1 = 1-2 bands contain saturation
- 2 = 3-4 bands contain saturation
- 3 = 5 or more bands contain saturation

Cloud confidence, cloud shadow confidence, snow ice confidence and cirrus confidence represent levels of confidence that a condition exists:

- 0 = “Not Determined” = Algorithm did not determine the status of this condition / "No" = This condition does not exist
- 1 = “Low” = Algorithm has low to no confidence that this condition exists (0-33 percent confidence)
- 2 = “Medium” = Algorithm has medium confidence that this condition exists (34-66 percent confidence)
- 3 = “High” = Algorithm has high confidence that this condition exists (67-100 percent confidence

These values can be obtained using utility function named *decodeLs8Qa*. The function returns a dictionary of all conditions, where each condition contains an extracted value. Here are examples how to use extracted values in evalScript:

- evalScript = "return [decodeLs8Qa(BQA).cloud];";
- evalScript = "return [decodeLs8Qa(BQA).designatedFill];";
- evalScript = "return [decodeLs8Qa(BQA).occlusion];";
- evalScript = "return [decodeLs8Qa(BQA).radiometricSaturation * 0.33];";
- evalScript = "return [decodeLs8Qa(BQA).cloudConfidence * 0.33];";
- evalScript = "return [decodeLs8Qa(BQA).cloudShadowConfidence * 0.33];";
- evalScript = "return [decodeLs8Qa(BQA).snowIceConfidence * 0.33];";
- evalScript = "return [decodeLs8Qa(BQA).cirrusConfidence * 0.33];";