TIFF files for different regions contain different number of bands

I have an instance configured in the SentinelHub dashboard for requesting Sentinel-2 bands, each layer is one band. I request these as TIFF files using the WcsRequest object in the sentinelhub-py Python package. I have used it for various regions and it has always previously returned TIFF files containing a single band, where the values are the reflectance values.

Here is an example request:

req = WcsRequest(
  bbox=BBox(bbox=[73.187, 34.390, 73.208, 34.415], crs=CRS.WGS84),

Here is the corresponding URL that the request is being made to, according to the file written by the Python package (when I use version 3 of the Python package):
(I have replaced my instance ID with “INSTANCE_ID”.)

However, I just tried to download an image for a different region, and the TIFF files for this region each contain 3 bands instead of 1. The parameters I’m passing to the WcsRequest are exactly the same except for the bounding box (the new bounding box is BBox(bbox=[-78.2, 35.4, -77.7, 35.9], crs=CRS.WGS84)), and the URL parameters that it produces are exactly the same except for the bounding box and the image timestamp.

This difference in the TIFF file format happens when I use sentinelhub-py version 3.0.0 as well as when I use version 2.6.1.

What might be causing this?

Hi @akenney,

I managed to reproduce your issue. We’ll look at it and let you know more shortly.

It turns out your second bounding box was too large. The returned image would have size 4519 x 5561, which is more than service limit 5000x5000.

In the next release of sentinelhub-py we will make sure that a response of such request will be an error message instead of a 3-channel image. For now you can achieve the same thing by turning “Show warnings” flags off for your configuration in Sentinel Hub Configurator.

Ohh, okay. Thank you for figuring it out and explaining!

In the newly released version sentinelhub-py 3.0.2 we added an additional parameter that is being sent to the service. Therefore in 3.0.2 you will get back an error informing you about a request size instead of a 3-channel image.