Hi Grega,
Thanks, this already more clear. I’m especially looking for the dates if the ‘mosaickingOrder’ of leastCC is used (e.g. via a SentinelHubRequest) as with this example extracting the least cloudy mosaick between to dates.
Is there a way to adapt the evalscript to return the date of the used pixel in this leastCC mosaick, e.g. doing the mosaicking within the evalscript?
Thanks!
evalscript = """
//VERSION=3
function setup() {
return {
input: [{
bands: ["B02","B03","B04","B05","B06","B07","B08","B8A","B11","B12", "CLP"],
units: "DN"
}],
output: {
bands: 10,
sampleType: "INT16"
}
};
}
function evaluatePixel(sample) {
if (sample.CLP > 0.4) {
return [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}
return [sample.B02, sample.B03, sample.B04, sample.B05, sample.B06,
sample.B07, sample.B08, sample.B8A, sample.B11, sample.B12];
}
"""
request = SentinelHubRequest(
evalscript=evalscript,
input_data=[
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL2_L2A,
time_interval=(time_window[0], time_window[1]),
mosaicking_order='leastCC',
maxcc=maxcc
)],
responses=[
SentinelHubRequest.output_response('default', MimeType.TIFF)
],
bbox=bbox,
size=bbox_size,
config=config
)