Due to data limitations, I need to use TOA data to extract cloud shadows instead of SR data. Is there any good way?

In addition, why is the amount of SR data less than that of TOA?

and this is the code I used.

var qa = image.select('BQA');
var pattern = ee.Number(2).pow(4).toInt();
var mask = qa.bitwise_and(pattern).rightShift(4);
return image.updateMask(mask.not());

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.