faizan1041
(Faizan Ali)
February 19, 2020, 1:36pm
#1
I have the following payload for https://services.sentinel-hub.com/api/v1/process:
payload = {
"input": {
"bounds": {
"properties": {
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
},
"bbox": bbox
},
"data": [
{
"type": "S2L2A",
"dataFilter": {
"timeRange": {
"from":strt_dt,
"to":end_dt
}
}
}
]
},
"output":{"resx":10,"resy":10,
"responses":[{
"identifier":"default",
"format":{"type":"image/jpeg"}
`Preformatted text` }]},
"evalscript": eval_script_rgb
}
It gives this error:
{"error":{"status":400,"reason":"Bad Request","message":"The bounding box area is too large! Please zoom in.","code":"RENDERER_EXCEPTION"}}
However, if I use static width and height like this:
"output":{"width":1000,"height":940}
I don’t see that error then. Any explanations on this?
gmilcinski
(Grega Milcinski)
February 19, 2020, 1:54pm
#2
The process API gives you maximum 2.000 x 2.000 px output (might be 2.500x2.500, not sure). So I am guessing that your BBOX, when “measured” in px of 10m size, is larger than that.
I suggest you try with smaller area.
For larger areas we have another service:
https://docs.sentinel-hub.com/api/latest/#/BATCH_API/batch_processor
faizan1041
(Faizan Ali)
February 19, 2020, 2:05pm
#3
Okay, so do you mean I should try it like this?
"output":{"resx":10,"resy":10, ...
I tried it and it gives the same error.
gmilcinski
(Grega Milcinski)
February 19, 2020, 2:19pm
#4
One question, in which CRS is your request?
The resx/resy is defined in the “CRS units”. So if you are using WPSG:4326 (lot/lan), your units are lot/lan degrees, so your resolution is “10 deg”. Therefore you should convert the units from meters to degrees.
If you want to get “exact values” (as close to raw values as possible) it is recommended to use UTM CRS, in which case resx will be in meters.
1 Like
faizan1041
(Faizan Ali)
February 19, 2020, 8:23pm
#5
I’m using ESPG 32719, I just converted them to UTM and here are the coordinates for that:
[346442.8204,6316360.2440,348559.3710,6318048.8917]
But still I get the same error, i.e.
{"error":{"status":400,"reason":"Bad Request","message":"The bounding box area is too large! Please zoom in.","code":"RENDERER_EXCEPTION"}}
gmilcinski
(Grega Milcinski)
February 19, 2020, 8:35pm
#6
Please send the full request, so that we can try it out.
faizan1041
(Faizan Ali)
February 20, 2020, 6:01am
#7
This is solved anyways, I was using the wrong CRS in
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
So, I had to change it to:
"crs": "http://www.opengis.net/def/crs/EPSG/0/32719"
and it worked. Thanks for your support!
gmilcinski
(Grega Milcinski)
February 20, 2020, 6:13am
#8
So it was the issue described above
One question, in which CRS is your request?
The resx/resy is defined in the “CRS units”. So if you are using WPSG:4326 (lot/lan), your units are lot/lan degrees, so your resolution is “10 deg”. Therefore you should convert the units from meters to degrees.
If you want to get “exact values” (as close to raw values as possible) it is recommended to use UTM CRS, in which case resx will be in meters.
Good to know it is working for you now.