Skip to main content

Hello,


I’m using the process endpoint to retrieve a PlanetScope image.


The request parameter is:


{
"input": {
"bounds": {
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/4326"
},
"bbox": :
28.90690563893378,
28.911044251087077,
28.231900708836747,
28.23591290100576
]
},
"data": :
{
"type": "byoc-{{collection_id}}",
"dataFilter": {
"timeRange": {
"from": "2023-11-18T00:00:00.000Z",
"to": "2023-11-21T00:00:00.000Z"
}
}
}
]
}
}
,
"output": {
"width": 512,
"height": 512
}
}

While the evalScript is :


//VERSION=3
function setup() {
return {
input: :{"bands": :"Blue", "Green", "Red"]}],
output: { bands: 3}
}
}
function evaluatePixel(sample) {
return n2.5 * sample.Red / 10000,
2.5 * sample.Green / 10000,
2.5 * sample.Blue / 10000]
}//VERSION=3
function setup() {
return {
input: :{"bands": :"Blue", "Green", "Red"]}],
output: { bands: 3}
}
}
function evaluatePixel(sample) {
return n2.5 * sample.Red / 10000,
2.5 * sample.Green / 10000,
2.5 * sample.Blue / 10000]
}

I’m always getting a black image in the response, although I tried to visualize my image in EO browser and it works fine.

Please let me know what is wrong with the above configuration.


Thanks.

Hi,


I do not see anything wrong with the evalscript you are using as it works fine for me. Is the time period that you are using in your request correct?


Reply