Skip to main content

Hi, I am having problems with the quality of the result image of my requests.

In detail in order to obtain a quite decent result i had to create a quite big bbox (see attachment), but for smaller bboxes the quality is really bad.

Is there something i can do to improve it?


Here is an example of a request:


https://services.sentinel-hub.com/ogc/wms/{instance_id}?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=VEGETATION_INDEX&MAXCC=20&WIDTH=640&HEIGHT=640&SRS=EPSG:4326&BBOX={bbox}&GEOMETRY=POLYGON(({geometry



}))&FORMAT=image/png&TRANSPARENT=1&TIME=2021-04-01/2021-04-09

Hello,


It should be very simple to generate higher resolution images in your request 🙂


Instead of using WIDTH and HEIGHT you should use RESX and RESY parameters in your WMS request. Therefore, instead of setting an image size you set the X and Y of each pixel in metres. If it is Sentinel 2 I would recommend using either 10 or 20.


Here is the documentation with the parameters documented:


6cc2eaedeaa667ad275c3bc6184a2c567e973a03.pngsentinel-hub.com
d3714e73b38a87afa3c31502a6696052a7395163.png


WMS



The Sentinel Hub Web Map Service conforms to the WMS standard. It provides access to Sentinel-2's 13 unprocessed bands and processed products such as true color imagery and NDVI.







And if you go to the Request Builder, you can also build and test your requests in a neat GUI interface 🙂


4f8024ff749a55973e6bcbfbb7fcf8856bb28e40.pngapps.sentinel-hub.com

Requests Builder



Request Builder for Process API, Sentinel-Hub







Hope this helps. If you run into any more problems let me know


Will R


Hi @william.ray thanks for your response.

I have tried to use resx and resy as you suggested but i keep getting this result with both 10 or 20
Cattura


Hi!


I think you need to try requesting a smaller Area of Interest. You are limited on how large your requests can be using SentinelHub. This is to ensure that our processing API doesn’t get overwhelmed by a single request or user.


Will


@william.ray if I use a smaller bbox the result is an image so small that it’s basically a pixel, but if i use the metric units instead of the crs the image quality drops down and it’s worse than the image I sent in the first post


Hi!


Just spoken to my colleague and we realised you are requesting the image in WGS84. This would mean that the XRES and YRES would need to be in degrees. If you change the EPSG to 3857 and keep the XRES and YRES at 10 then everything should run smoothly for you now 🙂


Will


I have tried but i keep getting the same result. Here is an example of a request that i use, can you tell me what to change?


https://services.sentinel-hub.com/ogc/wms/{instance_id}?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=TRUE_COLOR&MAXCC=20&RESX=10&RESY=10&SRS=EPSG:3857&BBOX=15.8203,41.31082,15.86425,41.34382&FORMAT=image/png&TRANSPARENT=1&TIME=2021-04-01/2021-04-09


Thanks in advance,

Gaetano


Hi Gaetano,


Two things in your request need changing:


You do not need EPSG: in your SRS parameter and your BBOX is still in WGS84 (4326) coordinates not WGS84 Pseudo Mercator (3857)


Try this:


https://services.sentinel-hub.com/ogc/wms/instanceID?REQUEST=GetMap&CRS=EPSG:3857&BBOX=1761107.740196,5058296.208644,1766000.231817,5063188.07433&LAYERS=TRUE-COLOR-S2-L2A&RESX=10&RESY=10&FORMAT=image/png&TIME=2021-04-01/2021-04-16


I would recommend using the request builder as parameters in your request are automatically changed.


https://apps.sentinel-hub.com/requests-builder/


Will


Hi @william.ray I changed my request as you told me to and it works.

But onestly i am a little disappointed about the result since it’s worse than when i used width and height, could there be another reason? maybe i have to setup differently my layer?


Settimg resolution to 10 meters will give you native full resolution. This is what Sentinel-2 is capable of. If you want prettier results, you can make use of BICUBIC resolution and then ask for “1 meter resolution”. However, note that this is just interpolation, not real data…


Hi @gmilcinski, i have tried to add the upsampling parameter and it improves a bit, but if a try to to change resx & resy from 10 to 1m i get a request error. How can i set the 1 meter resolution?


Might be you have to reduce the area as the request only allows for 2500x2500 px.


Hi @william.ray sorry for the late reply,

i have tried reducing the dimension of the bbox and i have also tried several combination of parameters, but i wasn’t able to find a way to get a better result.

I guess i will keep using width and height


Gaetano


Just a curiosity, while testing with the different combinations of paramenters I got a couple of images that were completely white even if my request was completed successfully


Reply