Download CLP and CLM

Yes. Hopefully following example will help:

from sentinelhub import SHConfig, BBox, CRS, SentinelHubRequest, bbox_to_dimensions, DataCollection, MimeType

bbox = BBox((8.688812,44.244215,9.307480,44.564056), crs=CRS.WGS84)
size = bbox_to_dimensions(bbox, 100)

clouds_evalscript = """
//VERSION=3
function setup() {
  return {
    input: ["CLM", "CLP"],
    output: { bands: 2, sampleType: "UINT8" }
  }
}
function evaluatePixel(sample) {
  return [ sample.CLM, sample.CLP ];
}
"""

req = SentinelHubRequest(
    evalscript=clouds_evalscript,
    input_data=[
        SentinelHubRequest.input_data(
            data_collection=DataCollection.SENTINEL2_L1C,
            time_interval=('2021-02-25','2021-03-01'),
            mosaicking_order='mostRecent'
        )
    ],
    responses=[SentinelHubRequest.output_response('default', MimeType.TIFF)],
    bbox=bbox,
    size=size,
)

masks = req.get_data()[0]

Using this I get CLM:
CLM

and CLP:
CLP

1 Like