Is there a way to apply the maxcc parameter at pixel scale (rather than getting it from the tile metadata)? If I set maxcc to 100., then I get all the scenes, but if possible I would like to apply it at pixel scale.
Thanks for a great service!
Is there a way to apply the maxcc parameter at pixel scale (rather than getting it from the tile metadata)? If I set maxcc to 100., then I get all the scenes, but if possible I would like to apply it at pixel scale.
Thanks for a great service!
MAXCC does the filtering per scene basis.
You can find some ideas on what to do what I believe you want to do, here:
https://www.sentinel-hub.com/faq/best-way-do-cloud-filtering-specific-aoi
Note that we are working on adding s2cloudless layer to all Sentinel-2 products, so cloud masking will become even simpler - you will simply use CLM (cloud mask) or CLP (cloud probabiliy) bands (instead of Hollstein of SCL or similar)
Thanks! When I try the instructions at https://www.sentinel-hub.com/faq/best-way-do-cloud-filtering-specific-aoi, I get this error:
with HTTPError:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/ogc/fis/MY_KEY
Server response: “Failed to evaluate script!
ReferenceError: SCL is not defined”
How do I define SCL? Even if I add a var scl = SCL; at the top of the script, the error persists
Make sure you are doing this on Sentinel-2 L2A datasource as SCL is only available there…
You can find an example of script for using SCL here:
It is now possible to get information from scene classification layer produced by Sen2Cor, for data where L2A is available, of course.
Data can be retrieved by identifier “SCL” (e.g. instead of return eB02]; for blue color one can use return eSCL];).
Data can be then used for e.g. validation of the pixel value, e.g. along the lines:
function validate (samples) {
var scl = Math.round(samples.SCL);
if (scl == 3) { // SC_CLOUD_SHADOW
return true;
} else if (scl == 9) { // SC_CLOUD_H…
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.