I am trying downloading third party image provided by PlanetScope like below
response = oauth.post('https://services.sentinel-hub.com/api/v1/process',
headers={"Authorization" : "Bearer {}".format(token)},
json={
'input': {
"bounds": {
"properties": {
"crs": "http://www.opengis.net/def/crs/EPSG/0/{}".format(4326)
},
"bbox": [17.99468170678354, -33.00874492411722, 18.0043495889445, -32.99965133466019]
},
"data": [{
"type": "CUSTOM",
"dataFilter": {
"collectionId": collection_id,
"timeRange": {
"from": date_.strftime("%Y-%m-%dT%H:%M:%SZ"),
"to": date_.strftime("%Y-%m-%d") + "T23:59:59Z"
}
}
}]
},
"output": {
'resx': 3,
'resy': 3,
"responses": [
{
"identifier": "default",
"format": {
"type": "image/tiff"
}
}
]
},
"evalscript": """
//VERSION=3
function setup() {
return {
input: [{"bands": ["B4", "B2", "B3", "B1"], units: "DN"}],
output: { id: "default", bands: 4, sampleType: SampleType.UINT16}
};
}
function evaluatePixel(sample) {
return [sample.B3, sample.B2, sample.B1];
}
"""
})
For the above request, I am getting an error stated below.
{“error”:{“status”:400,“reason”:“Bad Request”,“message”:“Your request of 1011.45 meters per pixel exceeds the limit 500.00 meters per pixel of the collection cbefbbed-5318-457c-8b7e-8f1af362054f. Please zoom in.”,“code”:“RENDERER_EXCEPTION”}}
When I provided the bbox
bounds with epsg value 32734
I am able to download the image correctly.
Again I tried providing bbox
bounds with epsg value 4326
but removed resx
and resy
from the output
then image is getting downloaded but the pixel resolution of output image is larger than 3m which I was expecting.
How can I ensure I am able to download the image with 3m pixel resolution while keeping the epsg value fixed at 4326?