Skip to main content

I’m having trouble displaying the TIFF_d32 images (downloaded with SH Py) to correctly display in QGIS and GeoServer. Images display fine in ArcGIS (I’m mostly an ArcGIS user). We know the data is there and its some layer settings that needs to be changed in QGIS and GeoServer. Does anyone know how to fix it?

I am not familiar with Geoserver, but in QGIS the issue (at least in my case) was related to the “Transparency” setting. QGIS expected a band related to alpha channel (transparency) but as there was none, it set everything to transparent. I think this setting fixed the issue:


Thanks that worked! QGIS assumes there’s an alpha band and sets the transparency to that band. Just say 'None" and hit apply and ok.


The 32 bit float images load correctly in ArcGIS by default, but they display as blank in QGIS and will display only if you set “transparency” as “none”. Can I use GDAL to remove the “alpha band” or is there any special use for it? I understand that alpha band can be used for masking etc., but why is the alpha band supplied to images to default? I think you can add alpha band with GDAL?
https://www.gdal.org/gdal_translate.html, https://gis.stackexchange.com/questions/265591/adding-alpha-band-to-a-tiff-image-drastically-increases-its-filesize?noredirect=1, https://gis.stackexchange.com/questions/259511/create-alpha-band-in-geotiff-to-make-a-specific-color-transparent-using-gdal

By removing the alpha band and letting user create/add them, won’t the SH file size be lower?


I think there is no alpha band in the file actually. It is just that QGIS expects to have it for whatever reason.


Could someone suggest how to set transparency for true color/false color band to ‘none’ in geoserver for sentinel 2 images?

16bit images are showing nicely using default raster styling but 32 bit ones are showing blank.


Thank you in advance.


I am unfortunately not a user of Geoserver, so I cannot help on this.

That being said, is there a specific reason, why you want to work with 32f data? The “native” precision of Sentinel-2 data is in the range of 0-10.000. So 16 bit values range going from 0-65.535 is already more than enough precise.



It seems there is afterall an alpha band added by default to the SH Py images. I checked in QGIS, Global mapper and with GDAL Info (screenshot attached). I downloaded TIFF in d32f format and set it for true color in the configuration utility. This is problematic for data processing and visualization and I would need to manually delete the alpha band… Can you please check and confirm?


Hm, I did not know you used SentinelHub-Py for this. Could you provide some more example, so that we can try to debug on our side, e.g. code snippet as well as first 5 chars of the instance?


Hi,

By default WmsRequest or WcsRequest from sentinelhub-py don’t return images with an additional transparency layer (Just in case I rechecked today). They can do that only if you set CustomUrlParam.TRANSPARENT: True.

Is it possible that you are using this custom url parameter or that your TrueColor layer is somehow defined to return 4 channels in Configurator?


Sorry I’m setting the transparent to true. Please allow me to re-run and check the outputs and confirm, but I’m glad we figured this out!


custom_url_params={CustomUrlParam.ATMFILTER: ‘ATMCOR’,

CustomUrlParam.TRANSPARENT: True,

CustomUrlParam.SHOWLOGO: False,

CustomUrlParam.QUALITY: ‘100’,

CustomUrlParam.PREVIEW: ‘0’})


Reply