So you’ve downloaded a Landsat 8 scene and eager to begin your investigation. As you get started, let’s explore how the Quality Assessment band that is distributed with the data can be used to help improve your analysis.
What is the QA band?
As summarized on the USGS Landsat 8 product information website: “Each pixel in the QA band contains a decimal value that represents bit-packed combinations [QA bits] of surface, atmosphere, and sensor conditions that can affect the overall usefulness of a given pixel.”
“Rigorous science applications seeking to optimize the value of pixels used in a study will find QA bits useful as a first level indicator of certain conditions. Otherwise, users are advised that this file contains information that can be easily misinterpreted and it is not recommended for general use.”
What are QA bits?
Rather than utilize multiple bands for indicating conditions such as water, clouds and snow, the QA band integrates this information into 16-bit data values referred to as QA bits. As a result, a significant amount of information is packed into a single band; however, this also means that certain steps are required to extract the multi-layered information content from the integrated QA bits.
“The pixel values in the QA file must be translated to 16-bit binary form to be used effectively. The gray shaded areas in the table below show the bits that are currently being populated in the Level 1 QA Band, and the conditions each describe. None of the currently populated bits are expected to exceed 80% accuracy in their reported assessment at this time.”
“For the single bits (0, 1, 2, and 3):
- 0 = No, this condition does not exist
- 1 = Yes, this condition exists.”
“The double bits (4-5, 6-7, 8-9, 10-11, 12-13, and 14-15) represent levels of confidence that a condition exists:
- 00 = Algorithm did not determine the status of this condition
- 01 = Algorithm has low confidence that this condition exists (0-33 percent confidence)
- 10 = Algorithm has medium confidence that this condition exists (34-66 percent confidence)
- 11 = Algorithm has high confidence that this condition exists (67-100 percent confidence).”
How are QA bits calculated?
QA bit values are calculated at various stages during the radiometric and geometric correction process. An overview of the algorithms used for calculating QA bits is provided in the LDCM CAL/VAL Algorithm Description Document.
The single QA bits (0-3) are used to signify: missing data and pixels outside the extent of the image following geometric correction (designated fill); dropped lines (dropped frame); and pixels hidden from sensor view by the terrain (terrain occlusion).
The double QA bits (4-15) are calculated using the LDCM Cloud Cover Assessment (CCA) system, which consists of several intermediate CCA algorithms whose results are merged to create final values for each Landsat 8 scene. The algorithms utilize a series of spectral tests, and in one case a statistical decision tree model, to assess the presence of cloud, cirrus cloud, snow/ice, and water.
As the name implies, the heritage of the CCA system is based on cloud detection; hence algorithms are directed primarily at identifying clouds, with secondary attention to snow/ice and water. Keep this in mind when interpreting results, particularly with respect to water discrimination, which is reportedly poor in most cases.
How do I use QA bits?
While it is feasible to translate individual QA bits into their respective information values, or implement thresholds to extract specific values or ranges of values, this isn’t practical for accessing the full information content contained in the QA band.
Instead, try using the L-LDOPE Toolbelt, a no-cost tool available from the USGS Landsat 8 website that includes “functionality for computing histograms, creating masks, extracting statistics, reading metadata, reducing spatial resolution, band and spatial subsetting, and unpacking bit-packed values… the new tool [also] extracts bits from the OLI Quality Assessment (QA) band to allow easy identification and interpretation of pixel condition.”
Note that the L-LDOPE Toolbelt does not include a graphical user interface, but instead operates using command-line instructions. So be sure to download the user guide, which includes the specific directions for implementing the various executables.
L-LDOPE Toolbelt example
As an example, let’s walk through the steps needed to unpack the QA bits from a Landsat 8 image of Lake Tahoe using a Windows 7 x64 desktop system:
- Unzip the L-LDOPE Toolbelt zip file and place the contents in the desired local directory.
- Open the Windows Command Prompt (All Programs > Accessories > Command Prompt) and navigate to the respective ‘bin’ directory for your operating system (‘windows64bit_bin’ in our example).
- For simplicity, copy the QA file (e.g., LC80430332014102LGN00_BQA.TIF) to the same ‘bin’ directory as identified in the previous step. For users familiar with command-line applications the data can be left in a separate directory with the executable command adjusted accordingly.
- Execute the unpacking application (unpack_oli_qa.exe) using the following command (typed entirely on one line):
- The above example extracts all the QA bits using the default confidence levels and places them in separate output files.
- Refer to the user guide for instructions on how to change the defaults, extract only select QA bits, and/or combine output into a single file.
Example 1: Lake Tahoe
This example illustrates QA output for a subset Landsat 8 scene of Cape Canaveral acquired on October 21, 2013 (LC80160402013294LGN00). Here the cloud discrimination is reasonable but includes confusion with beach areas along the coastline, the snow/ice output interestingly misidentifies some cloud and beach areas, and water discrimination is again poorly defined.
Example 2: Cape Canaveral
This example illustrates QA output for a subset Landsat 8 scene of Lake Tahoe acquired on April 12, 2014 (LC80430332014102LGN00). Note that snow/ice in the surrounding mountains in identified with reasonable accuracy, cloud discrimination is also reasonable but includes significant confusion with snow/ice, and water is poorly characterized, including many extraneous features beyond just water bodies.
With these examples in mind, it is worth repeating: “Rigorous science applications seeking to optimize the value of pixels used in a study will find QA bits useful as a first level indicator of certain conditions. Otherwise, users are advised that this file contains information that can be easily misinterpreted and it is not recommended for general use.”
Be sure to keep this in mind when exploring the information contained in the QA band.
For more info on L-LDOPE Toolbet: https://landsat.usgs.gov/L-LDOPE_Toolbelt.php
For more info on Landsat 8: https://landsat.usgs.gov/landsat8.php