Best way to handle cloud in a Polygon

Hey there,

We’re using the current script to remove clouds in a specified polygon

function index(x, y) {
	return (x - y) / (x + y);

const NGDR = index(B03, B04);
const bRatio = (B03 - 0.175) / (0.39 - 0.175);

const isCloud = bRatio > 1 || (bRatio > 0 && NGDR > 0);
const ndvi = index(B08, B04);
return isCloud ? [ndvi, 1] : [ndvi, 0];

But for this case, using the EO Browser, we check that image (2020-02-15) is entire covered by clouds.

If I check the NDVI time-series of this polygon, even I reduce the Cloud Coverage % to 30. The 2015-02-15 date still consired

(I used the EO Browser to demonstrate the problem, but we’re facing it in the API also)

Is there a better way or script to handle clouds ? I check the SLC for L2A is only improved for Europe.

We use Sentinel Hub for Brazil Agriculture


Cloud detection is never perfect unfortunately.
You have few options listed here:

Sentinel-2 L2A data are available outside Europe as well, but only since December 2018.

Another option is to use s2cloudless, the Python library, but you need to do this off-line for the moment:

We are now implementing s2cloudless option to be available on-the-fly, similarly as SCL in L2A product, but this will take a couple of months to become available.