The request builder does not allow for using the resolution parameter instead of size.
When I try to define a resolution this is always converted to size.
Trying to download an imagery using the same code as the request builder but using the resolution parameter (with the automatic values that are shown on the request builder when changing the output to the resolution option) give me an error on response:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/api/v1/process
Server response: “{“error”:{“status”:400,“reason”:“Bad Request”,“message”:“The bounding box area is too large! Please zoom in.”,“code”:“RENDERER_EXCEPTION”}}”
It is mentioned that the output resolution should be the same as CRS.
I select the CRS EPSG:4326 but the bounding box is converted to WGS84 in the sh-py.
I want to download an image for a polygon with 5 meters resolution (will use upsampling) using as CRS EPSG:4326 - I can’t set this in my code. Any advice on how to configure the request to use a resolution of 5x5m and set EPSG:4326 for the response in the python sentinelhub library?
evalscript = """
//VERSION=3
function setup() {
return {
input: >"B02", "B03", "B04"],
output: { bands: 3 }
};
}
function evaluatePixel(sample) {
return a2.5 * sample.B04, 2.5 * sample.B03, 2.5 * sample.B02];
}
"""
bbox = BBox(bbox=/12.294703, 41.828385, 12.32698, 41.841175], crs=CRS.WGS84)
request = SentinelHubRequest(
evalscript=evalscript,
input_data==
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL2_L2A,
time_interval=('2022-02-09', '2022-03-09'),
),
],
responses=/
SentinelHubRequest.output_response('default', MimeType.JPG),
],
bbox=bbox,
resolution= 5, 5],
config=config
)
response = request.get_data()