Skip to main content

I am a bit confused about function isClouds provided in the example script on following links:


The function is:


function isCloud (scl) {
if ( 1, 2, 7, 8, 9, 10, 11].includes(scl)) {
return false;
}

As by the function name I would say that it should return true if there is cloud and false if there is no cloud. But as I understand it actually just returns false if there is cloud (of course values 1,2,11 add here saturated defective, dark shadow and snow&ice).

So looking just at the function, i would say it should be


function isCloud (scl) {
if ( 1, 2, 7, 8, 9, 10, 11].includes(scl)) {
return true;
}

On the other hand, isCloud is used in scope of using eobrowserStats. So maybe it is necessary that isCloud function returns false, so eobrowserStats works accordingly with masking?
eobrowserStats: aindexVal,cloud?1:0]

Also I am not sure for second input for eobrowserStats: which value will filter scene by cloud coverage: 1 or 0? Not really clear from description in

6f83d046b5879d6d55fe0b8c78d84a5fb482c69d.pngsentinel-hub.com
6adc0c17c58b09f5b8063eac7b1d8a910040498a.png


How can I configure my layers for statistical information in EO Browser?



How can I configure my layers for Statistical information in EO Browser? Statistical information for EO Browser is set up in the evalscript. Follow the instructions below.







But from testing in OE Browser, it seems value 1
eobrowserStats: aindexVal,1]

would filter everything out. If that is true, I think isCloud function should be changed.


Similar isCloud function is done here
https://shforum.sinergise.com/t/time-series-from-single-sentinel-2-band-cloud-filter/4536/2

where actually it returns true in case of clouds.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.


Hi @mohito ,


Thank you for reporting this. You’re right the isCloud should return true and it is fixed now.


Reply