Maxcc applied to pixel scale for FISRequest API

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:

1 Like