Skip to main content

Hello


I’m trying to download sentinel2 12 bands tiff - all bands in 10m resolution but I am getting them in the original 10,20,60m resolution.


wms_12_band_request = WcsRequest(

data_collection=DataCollection.SENTINEL2_L2A,

data_folder=‘test_dir’,

layer=‘BANDS-S2-L2A’,

bbox=betsiboka_bbox,

time=(‘2019-01-01’, ‘2020-12-31’),

resx=‘10m’,

resy=‘10m’,

image_format=MimeType.TIFF,

maxcc=0.1,

time_difference=datetime.timedelta(hours=2),

config=config

)


What do I need to change in the code or in the configuration layer?

Or do I need to download it as is and then use gdal to translate each band?


Thanks

Shahar

If you perform a WCS request to Sentinel Hub and set it to 10-meter resolution, you will get all bands scaled to 10-meter resolution. Sentinel Hub’s response cannot return data at different resolutions.


Might it be that it just appears that they are in 20/60 meter resolution, as all the neighbouring 10-meter pixels will have the same value?


I’m not sure I understand what you mean by neighboring pixels.

I open the response.tiff file with qgis.

Every band has its original resolution (10,20,60) and not all of them at 10m which means that I now need to resample them myself.


I have a hard time understanding, what is happening in your case.

Can you send some more information, so that we can check more in details:


  • which account’s e-mail and instance ID you are using (feel free to mask out second half of instance ID and your e-mail)

  • an example of the “response.tiff” (e.g. share it via wetransfer or similar and add a link here)


id: e034c959-4b7b-4562-a729…

user - AGRITASK …


wetransfer link : https://we.tl/t-OE9iDYqoQL


tnx


I checked the response.tif and I am pretty certain that all bands in this file have a resolution of 10 meters. In general, all bands in the GeoTiff have the same resolution.


How do you think/see that some bands have a resolution of 20/60m? Can you demonstrate this step?


" In general, all bands in the GeoTiff have the same resolution." - That’s part of the reason I’m writing.


Make a copy of the respone.tif file. load them both into qgis with a symbology of a single band.

Then select band 1 that has 60m res, and for the other file select band 2 with 10m.

Now you turn the top layer on and off to see the pixels are of different sizes.


I did just that and I am still confident that all the bands are in 10 meter resolution.

It probably appears that e.g. B1 is in 60m resolution for a simple fact that 36 (6x6) 10-meter pixels have exactly the same value (as expected, these values are upscaled from 60m pixel), so they appear larger.

If you look at the border of the BBOX, you will actually visually notice some smaller pixels, as your BBOX does intersect with some 60m pixels only partially.



You are very right, thank you. I totally missed that all the pixels should have the same value because it is upsampling and not down.


On that subject:

What interpolation would be applied if instead of 10m I would give resx=100m?

Is there a way to control that behavior?


You can choose among different inerpolation options for both down- and up-sampling, see this documentation:

docs.sentinel-hub.com
d3714e73b38a87afa3c31502a6696052a7395163.png


Sentinel-2 L1C



Use Sentinel Hub Processing API to access Sentinel-2 L1C data with 13 spectral bands and 5-day revisit time.







You can configure this in Advanced parameters of the layer, similarly as described in 3rd point here.


Reply