2

I am new to GEE and I wanted to use this as part of my research. My first step was to mask the clouds off the images.

The code i created basically mask out pixels based on the Quality Flag Bit 27, which removes all pixels that are too bright. The problem I have is that it doesnt seemed to work on all images.

Is there a sure way to mask out clouds and cloud-shadows for sentinel 3?

This is the code that I used for the cloud masking:

    function checkBit(image, bit) {
      return image.bitwiseAnd(Math.pow(2, bit)).rightShift(bit);
         }
    function checkBitSentinel3(bit) {
      return function(image) {
        var q = image.select('quality_flags')
        var cloud= checkBit(q, bit).eq(0)

        return cloud
       }
    }
   var cloud = image.map(checkBitSentinel3(27)).max();
   var cloudmasked=image.mask(cloud);
  • 1
    Hello! Please attach your code and what you have carried out so far. – Vijay Ramesh Jan 24 at 14:27
  • Hi! I attached the code I used. – Marco Conopio Jan 26 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.