Hi, I am trying to download B02 reflectance from sentinel2_L2A source but i am receiving an error during it. I am attaching both the error and the evalscript.
B02_evalscript = """
//VERSION=3
function evaluatePixel(sample) {
let val = sample.B02;
return [val, sample.dataMask];
}
function setup() {
return {
input: [{
bands: [
"B02",
"dataMask"
]
}],
output: [
{
id: "B02",
bands: 1,
sampleType: SampleType.FLOAT32
},
{
id: "dataMask",
bands: 1
}
]
}
}
DownloadFailedException: Failed to download from:
https://services.sentinel-hub.com/api/v1/statistics
with HTTPError:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/api/v1/statistics
Server response: "{"status": 400, "reason": "Bad Request", "message": "Failed to evaluate script!\nundefined:1084: evaluatePixel must return an object containing arrays\n throw \"evaluatePixel must return an object containing arrays\";\n ^\n", "code": "COMMON_EXCEPTION"}"
Can you pinpoint where the problem lies.
Thanks
Sidharrth