QGIS – COG TIFF Reports Valid from GDAL but Does Not Load in QGIS

cloud-optimized-geotiffgdalqgis

I have a normal geotiff that i've converted to a Cloud Optimized GeoTiff (COGtiff) via GDAL 3.2:

$ gdal_translate image.tif image-COG.tif -of COG

it validates successfully with 'validate_cloud_optimized_geotiff.py'

$ python3 validate_cloud_optimized_geotiff.py image-COG.tif

image-COG.tif is a valid cloud optimized GeoTIFF . The size of all IFD headers is 2530899 bytes

But when I try to load this image-COG.tif (hosted on an AWS S3 bucket) into QGIS, it doesn't show the 'Options' when I supply the file in the dialogue, so I can't click 'Add'.

A COG that someone else produced via this great COG Tutorial loads successfully into QGIS 3.2 and shows the 'Options' section in the dialogue when I supply the filepath:

qgis load COG options dialogue is shown

Is there something I'm missing on the GDAL COG translation that is necessary for QGIS to be able to load it?

Best Answer

If you do not supply authentication creds in the Raster>Add dialogue, and then supply a cogtiff link (on AWS S3 in this case) which is not publicly accessible, the Options will not show and the dataset cannot be added to the map.

Qgis appears to be caching this url as 'invalid', so even if you modify the S3 privileges to make the image public, it still will not show the options and cannot be added to the map.

Simply rename the image within S3, and then the new URL will show the options in qgis and the cogtiff can be added to the map.

Related Question