As we test more COGs (Cloud Optimized GeoTIFFs) housed on web servers and from Amazon S3 buckets using the STAC catalog standard, we continue to test support for COGs in various applications (as streamed from https address). Note COGs are just Tiffs, so if you just download them, they should work in almost any application. But the goal for COGs is to use them directly from an online resource (without necessarily downloading).
QGIS has a switch when loading a file to use an online address, so COGs can be currently be loaded from https addresses. But current versions of ArcMap and ArcGIS Pro still didn’t seem to allow COGs from online addresses. Now in ArcGIS Pro, you can connect to various cloud buckets and use a COGs from there, but it doesn’t seem possible to simply load a COG from an https address. Or is there…
There is an interesting trick to get COGs (as hosted from https) to work in both ArcGIS Pro (2.7.1) and ArcMap (10.8.1). So using a locally installed gdal environment, you can create a GDAL “VRT” (virtual) file pointing at a COG as hosted using a https address. The locally created vrt file can be simply added or even dropped into ArcGIS/ArcMap.
How does this work? Since Arc* uses GDAL under-the-hood for some image I/O, support for GDAL VRTs is fairly robust and apparently allows for the ability to load https hosted COGs.
- Get yourself a GDAL environment installed (e.g., Anaconda, then “conda install -c conda-forge gdal”)
- Test the https hosted COG in gdal:
- Now create a GDAL VRT:
gdal_translate -of vrt /vsicurl/https://address.to.files/theHostedCOG.tif theHostedCOG.vrt
- Done - drag that new file “theHostedCOG.vrt” in ArcGIS Pro or ArcMap
Not well tested. Stumbled across this method testing out our new STAC image catalog services (uses COGs to host individual images).