for the below posted request, for the specified timeRange mentioned below:
“timeRange”: {
“from”: “2023-08-31T00:00:00Z”,
“to”: “2023-09-01T23:59:59Z”
},
“from”: “2023-08-31T00:00:00Z”: does not coincide with an acquisition timeRange
“to”: “2023-09-01T23:59:59Z”: does conincide with an acquisition timeRange
why when i run the request it receive an error indicating no statistical data is available at the specified time range “please review the attached screen-shot”
request:
{
"input": {
"bounds": {
"bbox": [
12.44693,
41.870072,
12.541001,
41.917096
]
},
"data": [
{
"dataFilter": {},
"type": "sentinel-2-l1c"
}
]
},
"aggregation": {
"timeRange": {
"from": "2023-08-31T00:00:00Z",
"to": "2023-09-01T23:59:59Z"
},
"aggregationInterval": {
"of": "P1D"
},
"width": 512,
"height": 343.697,
"evalscript": "function setup() {\n return {\n input: [{\n bands: [\n \"B04\", \"B08\", \"dataMask\"\n ]\n }],\n output: [\n {\n id: \"ndvi\", bands: 1\n },\n {\n id: \"dataMask\", bands: 1\n }\n ]\n };\n }\n \n function evaluatePixel(samples) { \n throw new Error(samples)\n const DEFAULT_OUTPUT = {\n ndvi: [NaN]+ \",\" + \n dataMask: [NaN]+ \",\" + \n };\n\n if (!samples || Object.keys(samples).length === 0 || (samples.B04 + samples.B08) === 0) {\n return DEFAULT_OUTPUT;\n }\n\n let index = null;\n index = (samples.B08 - samples.B04) / (samples.B08 + samples.B04);\n \n return {\n ndvi: [index],\n dataMask: [samples.dataMask],\n };\n }"
},
"calculations": {
"default": {}
}
}