Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract customized mask from QA band #182

Open
haoliangyu opened this issue Apr 16, 2016 · 1 comment
Open

Extract customized mask from QA band #182

haoliangyu opened this issue Apr 16, 2016 · 1 comment

Comments

@haoliangyu
Copy link

I developed a python lib pymasker to extract customized mask from Landsat 8 QA band, like

from pymasker import landsatmasker
from pymasker import confidence

# load the QA band directly
masker = landsatmasker('LC80170302014272LGN00_BQA.TIF')

# load a numpy array that contains band data
masker = landsatmasker(bandarray)

# Get mask with cloud pixels (high confidence) and cirrus pixels (high confidence).
mask = masker.getmultimask(cloud = confidence.high, cirrus = confidence.high)

# Save the result if you want.
masker.savetif(mask, 'result.tif')

I wrote a detail guide in my blog.

How do you think adding similar functionality to landsat-util?

@scisco
Copy link
Contributor

scisco commented May 25, 2016

@haoliangyu nice. We are working on a new processing library for the next version of Landsat-util. This is something that could potentially be added there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants