COGs in ArcMap and ArcGIS Pro

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.

Steps:

  1. Get yourself a GDAL environment installed (e.g., Anaconda, then “conda install -c conda-forge gdal”)
  2. Test the https hosted COG in gdal:
    gdalinfo /vsicurl/https://address.to.files/theHostedCOG.tif
  3. Now create a GDAL VRT:
    gdal_translate -of vrt /vsicurl/https://address.to.files/theHostedCOG.tif theHostedCOG.vrt
  4. 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).