Skip to main content

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/> Description: ## Background

Landsat-8 Level 1 scenes come with a quality assessment band (BQA) that shows various forms of atmospheric and other interference present in the image.

The accompanying BQA file is a GeoTIFF with bit-packed values corresponding to an internal USGS numbering scheme. You can learn about these values and the BQA band in general by reading the USGS overview located [here](https://www.usgs.gov/land-resources/nli/landsat/landsat-collection-1-level-1-quality-assessment-band?qt-science_support_page_related_con=0#qt-science_support_page_related_con). There is also a more in-depth PDF titled ‘Landsat Quality Assessment (QA) Tools User’s Guide’.

## Usage

This CLI tool may be useful to you if you are working with Landsat-8 quality assessment data in Python 3.

This tool is written to search the directory where it is run, and all sub-directories for Landsat-8 BQA bands. It then ‘unpacks’ the bit packed BQA raster and creates a new GeoTIFF for each USGS quality measure that the user specifies. Finally, the tool takes the new quality bands for each scene and creates a composite image stack for each quality control measure.

For example, you can take a directory of Landsat-8 scenes, pull out all cloudy pixels, and create a composite image showing all cloudy pixels in the stack.

This is helpful for time series analysis because you can identify atmospheric interference over time.

Flags correspond to each quality assessment layer identified by USGS. The following will produce individual BQA band files for every quality assessment type identified by USGS and then build composites from each quality assessment type.

`commandline cd /filepath/to/top_dir_for_landsat_scenes landsat_L1_qa_tool -c -f -t -r -cl -cc -cs -ci -s `

Quality assessment types: `commandline -c --clear-terrain -f --fill -t --terrain-occlusion -r --radiometric-saturation -cl --clouds -cc --cloud-confidence -cs --cloud-shadow -ci --cirrus -s --snow-ice `

## Other Tools

Other great tools exist, and are more comprehensive.

-USGS has several offerings [here](https://www.usgs.gov/land-resources/nli/landsat/landsat-quality-assessment-tools). -USGS EROS offers [landsat-qa-arcgis-toolbox](https://github.com/USGS-EROS/landsat-qa-arcgis-toolbox), [espa-science-validation](https://github.com/USGS-EROS/espa-science-validation), and [espa-l2qa-tools](https://github.com/USGS-EROS/espa-l2qa-tools). -Rasterio’s Landsat-8 QA tools is [here](https://github.com/mapbox/rio-l8qa).

Platform: UNKNOWN Classifier: Programming Language :: Python :: 3 Classifier: License :: Unlicense Classifier: Topic :: Landsat :: data conversion Description-Content-Type: text/markdown

Release files for landsat-L1-qa-tool 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for landsat-L1-qa-tool 0.1.0
File Size Uploaded
landsat_L1_qa_tool-0.1.0.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for landsat-L1-qa-tool 0.1.0
File Interpreter ABI Platform
landsat_L1_qa_tool-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / landsat_L1_qa_tool-0.1.0.tar.gz

Download URL landsat_L1_qa_tool-0.1.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a5d98244643802904b452ae8d768111cfa4b321b931fc7ce541f05d1b84cac6b
BLAKE2b-256 checksum
How to use checksums
16a37b918dc9c3ff9b1d15044b3a6522f61a5b5703def63111779bd116983d5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / landsat_L1_qa_tool-0.1.0-py3-none-any.whl

Download URL landsat_L1_qa_tool-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61111d20384b1b5ae893202fb524e3ad3f593ff7e87fcad4700852633ab87e27
BLAKE2b-256 checksum
How to use checksums
b65984aef1abcf3f9192ff2107cacef14dc9d5a478fe6385261a78da0cf17136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page