I'm relatively new to GIS and am wanting to mask out the clouds of Landsat images using the supplied QA band, I'm limited to free programs, mainly QGIS.

So far I've managed to get a cloud mask shapefile using an extension for QGIS. My problem however is that I want to do this for a few hundred files and I can't find any way to do this without spending hours manually. My hope is that I can cut clouds and their shadows from the bands of data so I can perform NDVI analysis without having to worry about inaccurate data.

I've had a go at using Google Earth Engine and whilst my coding knowledge is rather limited I am making progress now.

  • 2
    Can you describe how you do it manually? What is the extension called? What is the number of the landsat satellite?
    – Bera
    Commented Dec 20, 2021 at 17:25
  • I used the Cloud Masking plugin from QGIS Python Plugins Repository. Using this all i need to do is select the folder containing all the data from the image capture and it does the rest of the work. I'm using a mix of Landsat 5 and 7, both however contain the same QA cloud layer when I downloaded them.
    – shaza Lee
    Commented Dec 21, 2021 at 0:05
  • I would highly recommend Earth Engine for your task. It's a few lines of code in EE.
    – Aaron
    Commented Dec 21, 2021 at 5:08

1 Answer 1


If you're happy to use an external tool, consider ODC STAC, which can be used with Landsat data from USGS. This will allow you to cloud mask and then run all kinds of analyses using Python.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.