I have a sample bounding box with the following parameters:
> sample_coords_wgs84 = [14.130497,47.638267,14.653169,47.876458]
> resolution = 10
> sample_bbox = BBox(bbox=sample_coords_wgs84, crs=CRS.WGS84)
> sample_size = bbox_to_dimensions(sample_bbox, resolution=resolution)
>
> print(f"Image shape at {resolution} m resolution: {sample_size} pixels")
Output : Image shape at 10 m resolution: (3938, 2616) pixels
The evalscript I use:
evalscript_select_bands = """
//VERSION=3
function setup() {
return {
input: [{
bands: ["B02", "B03", "B04","B08"]
}],
output: {
bands: 3
}
};
}
function evaluatePixel(sample) {
return [sample.B04, sample.B03, sample.B02];
}
"""
request_true_color = SentinelHubRequest(
evalscript=evalscript_select_bands,
input_data=[
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL2_L2A,
time_interval=("2020-06-12", "2020-06-13"),
)
],
responses=[SentinelHubRequest.output_response("default", MimeType.TIFF)],
bbox=sample_bbox,
resolution=(10,10),
data_folder=results_dir,
config=config,
)```
When I run the following command to get the data.
new_request = request_true_color.get_data(save_data=True)
I get the following. Not sure how to download the original resolution sentinel-2 image of any bbox.
DownloadFailedException: Failed to download from:
https://services.sentinel-hub.com/api/v1/process
with HTTPError:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/api/v1/process
Server response: "{"error":{"status":400,"reason":"Bad Request","message":"Your request of 3908.24 meters per pixel exceeds the limit 1500.00 meters per pixel of the collection S2L2A. Please revise the resolution (or corresponding width/height) to make sure it is in supported range.","code":"RENDERER_EXCEPTION"}}"