Just another COG in the machine: all about Cloud Optimized Geotiffs
Kris Johnson, NRRI - GIS/LIS 2023
Speakers notes go here.
Cloud Optimized GeoTIFF (COGs):
- What are they?
- How can I make one for my kids?
- How (and why) would I use one?
- Examples
- My use case
Speakers notes go here.
Who's heard of COGs? Used them?
A
Cloud Optmized GeoTIFF
is
a regular GeoTIFF file, hosted on a
HTTP file server, with an
internal organization that
allows clients issuing โHTTP
GET range requests to ask for just
the parts of a file they need.
Speakers notes go here.
Let's break that definition down
Speakers notes go here.
A regular GeoTIFF
Speakers notes go here.
GeoTIFF is a public domain metadata standard that enables
georeferencing information to be embedded within an image (TIFF)
file.
Essentially, a common
raster data format
Speakers notes go here.
A regular GeoTIFF
...with an internal organization...
Speakers notes go here.
Translation: Tiling and Overviews
and compression
Speakers notes go here.
Internal Tiling
Speakers notes go here.
Tiles
- Each tile is its own TIFF image
- With its own metadata and header
- Usually 256x256, but can be any size
Speakers notes go here.
Overviews
Speakers notes go here.
Overviews
Allow for smaller, lower resolution versions to be used in place of the
original
Speakers notes go here.
Compression:
just allows for even faster streaming to clients
Speakers notes go here.
A web server capable of HTTP range requests
Speakers notes go here.
object storage in the โ๏ธ
Speakers notes go here.
files on a traditional web server
Speakers notes go here.
A web server capable of HTTP range requests
Speakers notes go here.
Look for
Accept-Ranges: bytes
in the response header
Speakers notes go here.
Range requests (AKA byte serving)
Speakers notes go here.
Pulling it all together:
Allows clients to request only the relevant portions of the image, and
not the whole file ๐
Speakers notes go here.
How can I make one?
Speakers notes go here.
GDAL
what else?
Speakers notes go here.
since version 3.1
gdalwarp -of COG intput.tif outputCOG.tif
gdal_translate world.tif world_webmerc_cog.tif -of COG
-co TILING_SCHEME=GoogleMapsCompatible -co COMPRESS=JPEG
https://gdal.org/drivers/raster/cog.html
Speakers notes go here.
Then, load it onto a web server and you're ready to ๐ข
Speakers notes go here.
How do you use them?
Speakers notes go here.
Anywhere you can use a regular GeoTIFF, actually
Speakers notes go here.
- Desktop GIS
- Web Maps
- Data Sharing and Distribution
Speakers notes go here.
Why use a โ๏ธ?
- Improved performance / Reduced cost
- Scalability
- Accessibility / Interoperability
- Reduced data duplication
Improved performance / Reduced cost
- efficient access
- reduced bandwidth consumption
internal tiling and overviews
Scalability
Efficient streaming enables integration with cloud-based workflows
Accessibility / Interoperability
-
widely adopted
-
Many places deliver imagery as a COG (USGS, Planet, OpenAerialMap)
-
GeoTIFF is a common format
open source ba-dang
To summarize:
- It's a twist on a common data format
- Use it to distribute data
- Use it in place of a GIS server
Summary
Thank you!
Kris Johnson, NRRI/UMD
kristofj@d.umn.edu