earth-chris / earthlib-legacy

Spectral endmembers and unmixing tools for satellite land cover mapping.
https://earth-chris.github.io/earthlib
MIT License
24 stars 3 forks source link

Fix Sentinel-2 cloud masking #7

Closed earth-chris closed 3 years ago

earth-chris commented 3 years ago

Currently, one of the bit flags in the Sentinel2 cloud masking function appears to be incorrect, and the image data are not properly masked as a result. This should not produce these big swaths of 0-value pixels:

image

Edits should apply to ccblc/Mask.py.

earth-chris commented 3 years ago

https://github.com/earth-chris/earthlib/blob/master/earthlib/Mask.py

earth-chris commented 3 years ago

Per our discussion earlier this evening, here's a link to an earth engine developer guide for using the COPERNICUS/S2_CLOUD_PROBABILITY collection: https://developers.google.com/earth-engine/tutorials/community/sentinel-2-s2cloudless