We’re currently using the python API to make the requests.
The script is shown below
evalscript_true_color = """
//VERSION=3
function setup() {
return {
input: [{
bands: ["B02", "B03", "B04", "B05", "B06", "B07", "B08", "CLM", "SCL"]
}],
output: {
bands: 9
}
};
}
function evaluatePixel(sample) {
return [sample.B04, sample.B03, sample.B02, sample.B08, sample.B05, sample.B06, sample.B07, sample.CLM, sample.SCL];
}
"""
self.json_request = {
"input": {
"bounds": {
"bbox": self.coords_limit
},
"data": [
{
"dataFilter": {
"timeRange": {
"from": self.startDate+"T00:00:00Z",
"to": self.endDate+"T23:59:59Z"
},
'mosaickingOrder': 'leastCC',
},
"type": "sentinel-2-l2a"
}
]
},
"output": {
'width': self.regionToDownloadSize[0],
'height': self.regionToDownloadSize[1],
"responses": [
{
"identifier": "default",
"format": {
"type": "image/tiff"
}
}
]
},
"evalscript": evalscript_true_color
}
self.requestImage = SentinelHubRequest(
data_folder = path,
evalscript = evalscript_true_color,
input_data = [
SentinelHubRequest.input_data(
data_collection = DataCollection.SENTINEL2_L2A,
time_interval = (self.startDate, self.endDate),
mosaicking_order = 'leastCC'
)
],
responses = [
SentinelHubRequest.output_response('default', MimeType.TIFF)
],
bbox = self.BBoxToDownload,
size = self.regionToDownloadSize,
config = config
)
after the request is made, we’re applying the function self.requestImage.get_data(save_data=True).
the issue is that we keep getting a timeout error, but this error appear in different times, even with the same entry parameters like the bounding box coordinates and time interval,
and there is plenty of available processing units in our account.
For example, using the bounding box coordinates like -50.8138002863102,-23.375325558502,-50.46507130589259,-23.014571727683297, and time interval from 01-01-2021 to 15-01-2021 (just an example, the dates are in valid formats), when executed, the error can still appear.