I am quite confused about some invalid qa masks. In some images, the VALUE of the QA band is shown as 21824 (cloudless)invalid QA value, but the location is actually covered by cloud. In addition to Landsat images, the same is true of Sentinel2a images.

The mask method I used is as follows(on geemap in python language):

    def L8cfmask (image) :
        qaMask = image.select('QA_PIXEL').bitwiseAnd(ee.Number.parse ('11111',2)).eq(0)
        SaturationMask = image.select('QA_RADSAT').eq(0)
        rt = image.updateMask(qaMask).updateMask(saturationMask)

        return rt

Also, a GEE example is as followed: [https://code.earthengine.google.com/e409034b609ea806eff892945b080e9a]

In this example, I copied the code from the official website[https://developers.google.com/earth-engine/guides/ic_composite_mosaic] and changed the center of the map to focus on the colud pixels with cloudless QA value.

The Bitmask for QA_PIXEL is here:

[https://developers.google.com/earth-engine/datasets/catalog/LANDSAT_LC08_C02_T1_L2#bands] Bitmask for QA_PIXEL

Is there any way to remove these incorrect images in QA band?

  • 1
    The code you posted is unreadable, so I can't help you as I want. But take a look at this answer: gis.stackexchange.com/a/271329/80215 . Check the metadata of QA_Pixel band and decode bites to check if 21824 is actually cloudless
    – aldo_tapia
    May 23, 2022 at 13:26
  • @aldo-tapia I have added some links to my question. I think the bites I decode are correct...so confused...
    – Jianzhk
    May 26, 2022 at 8:45


Your Answer

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