This guide will eventually be a stand alone explanation for developers on using and producing Cloud Optimized GeoTIFF's. If you are interested in contributing then please make pull requests on the Github Project. In the meantime this document will just link to a few other resources

Reading a Cloud Optimized GeoTIFF

The easiest way to read a COG in a way that takes advantage of its unique properties is to use GDAL and its VSI Curl functionality. See the GDAL Wiki on Cloud Optimized GeoTIFF in its How to read it with GDAL section. A majority of geospatial software in the world uses GDAL as a library, so incorporating it is likely the fastest way to incorporate COG reading in to your software.

Planet produces all its data as COG, and has a little tutorial on how to download part of an image using VSI Curl. Most of the tutorial is specific to working with the Planet API, but it shows the use of GDAL Warp with a COG to extract a single farm field from a larger image.

How to generate a Cloud Optimized GeoTIFF

As of version 3.1 of GDAL there is a built in COG provider which by default provides tiling and creation of overviews, use it like this:

 gdal_translate input.tif output_cog.tif -of COG -co COMPRESS=LZW

Older GDAL versions

There is a GDAL wiki page about COG creation: How to generate it with GDAL. For quick reference the one liner is:

gdal_translate in.tif out.tif -co TILED=YES -co COPY_SRC_OVERVIEWS=YES -co COMPRESS=DEFLATE


or you can use rio-cogeo plugin:

$ rio cogeo create in.tif out.tif --cog-profile deflate

Many other geospatial software should also be able to add the proper overviews and tiles. Please contribute examples!

Testing your Cloud Optimized GeoTIFF's

The ‚Äč script can be used to check that a (GeoTIFF) file follows the above described file structure

$ python test.tif
$ python

or you can use rio-cogeo plugin:

$ rio cogeo validate test.tif

Note: Radiant.Earth is also providing a hosted version of the script. And if you want to run your own hosted version you can get the source code.


See COG Performance Testing on GDAL wiki for some of the initial performance testing

Digital Globe has also done extensive performance testing with their IDAHO project, and found the format as performant as their previous custom scheme.