[gdal-dev] Hacking the new Landsat pixel_qa help...

Matt Perry perrygeo at gmail.com
Fri May 5 09:18:53 PDT 2017


Hi Jonathan,

Jonathan Greenberg-4 wrote
> USGS, in their infinite wisdom, decided to embed what is effectively a
> 1-bit, 16-band byte-interleaved-by-pixel image into a 16-bit, single-band
> geotiff for the Landsat quality mask.  I could write some crazy
> translation
> program that "reverse engineers" the data, but I was wondering if there is
> some way to "hack" or translate the file by simply redefining the "header"
> (change the number type to 1-bit, number of layers to 16, interleave to
> BIP).  Any suggestions for how to do this?

https://github.com/mapbox/rio-l8qa might be what you're looking for;
provides a python API and CLI for extracting arrays out of the Landsat QA
band, both the pre-Collection and collection format. It's at version 0.1 so
caveat emptor but could be useful. Let me know how it works for you.

Matt Perry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170505/8df57ba0/attachment.html>


More information about the gdal-dev mailing list