I am having trouble with downloading the S2 L2A bands see below my request script. The request runs but it returns an empty image when I open it in ArcMap?
Your assistance is appreciated, I just removed the Bearer token.
curl -X POST https://services.sentinel-hub.com/api/v1/process \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: \
--form-string 'request={
"input": {
"bounds": {
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
387586.974469,
8098945.900398
],
[
387884.086646,
8097476.83939
],
[
389674.763248,
8097959.748413
],
[
389409.287272,
8099351.638973
],
[
387586.974469,
8098945.900398
]
]
]
},
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/32737"
}
},
"data": [
{
"dataFilter": {
"timeRange": {
"from": "2023-06-16T00:00:00Z",
"to": "2023-06-16T23:59:59Z"
},
"mosaickingOrder": "mostRecent"
},
"type": "sentinel-2-l2a"
}
]
},
"output": {
"width": 104.12118271595553,
"height": 93.89618236811039,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/tiff"
}
}
]
}
}' \
--form-string 'evalscript=//VERSION=3
function setup() {
return {
input: [
{
bands: ["B01","B04","B07","B09","B02","B05","B08","B11","B03","B06","B12","B8A"],
units: "REFLECTANCE",
}
],
output: [
{
id: "default",
bands: 12,
sampleType: "UINT16",
noDataValue: 0,
},
],
mosaicking: "SIMPLE",
};
}
function evaluatePixel(sample) {
let val = [sample.B01, sample.B02, sample.B03, sample.B04, sample.B05, sample.B06, sample.B07, sample.B08, sample.B8A, sample.B09, sample.B11, sample.B12];
return val;
}
'