Resx, resy giving error for output of True Color

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?

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

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.

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

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"}}

Please send the full request, so that we can try it out.

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!

So it was the issue described above

Good to know it is working for you now.

Yes, that is correct