Skip to content

Instantly share code, notes, and snippets.

@vincentsarago
Created February 10, 2020 03:28
Show Gist options
  • Save vincentsarago/f5b5facb7744d647c0f724bd583af534 to your computer and use it in GitHub Desktop.
Save vincentsarago/f5b5facb7744d647c0f724bd583af534 to your computer and use it in GitHub Desktop.
# First add internal overviews
$ gdaladdo my-file.tif
# Then translate the geotiff to a COG (`TILED=YES`) and keep overviews
$ gdal_translate -of GTiff -co TILED=YES -co COPY_SRC_OVERVIEWS=YES -co COMPRESS=DEFLATE my-file.tif my-cog.tif
# or use rio-cogeo (see COG Talk - Part 1)
$ rio cogeo my-file.tif my-cog.tif --cog-profile deflate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment