For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cloud Optimized GeoTIFFs

Convert rasters to Cloud Optimized GeoTIFFs (COGs) with GDAL. Use recommended settings to improve streaming performance in Felt.

A Cloud Optimized GeoTIFF (COG) lets software read part of a raster without downloading the whole file. COGs help Felt display data quickly, whether uploaded or streamed from your bucket. For streaming, see Stream large rasters.

Required?
Setting
Recommended values

Required

Overview resampling

bilinear for floating-point data; nearest for integer or categorical data

Required

Block size

Internal tiles of 512x512 pixels, best for streaming. 256x256 also works.

Recommended

Overviews

Several overview levels. The COG output format in GDAL adds them.

Recommended

Compression

YCbCr with JPEG compression for 8-bit RGB data; DEFLATE, LZW, or ZSTD for floating-point and integer data

Recommended

Transparency

An explicit nodata mask band

Recommended

Summary statistics

Min, max, mean, and standard deviation, stored in the header as the GeoTIFF specification describes

Convert rasters to Cloud Optimized GeoTIFFs

The GDAL command-line tools convert most raster files to COGs.

  1. Install the GDAL command-line tools. If you use Homebrew on macOS, run brew install gdal.

  2. Use the gdal_translate command with the COG output format and the -stats flag. This creates a COG with summary statistics and overviews, which Felt streams most efficiently.

For floating-point data, such as elevation or temperature, use bilinear resampling:

$ gdal_translate -stats -of COG -resampling bilinear -co COMPRESS=LZW {input}.tif {output}.tif

For integer or categorical data, such as land cover classes, use nearest resampling:

Streaming performance

Streaming performance for COGs depends on each file's settings, where the files are stored, and how much area each file covers. Felt fetches data from your bucket as the map needs it, and a tile fails to load if Felt can't fetch and process its data in time. To show many COGs as one layer, see VRT mosaics.

For streaming, we recommend these practices in addition to the Recommended COG settings:

  • Use 512×512 blocks, not 256×256. They work best for generating map tiles.

  • Host files in Amazon S3, in the same region as Felt if you can. Felt runs on Amazon Web Services, so files in S3 near Felt reach it with the least delay. Storage with high latency, or in a different region, slows streaming.

  • Use files that cover larger areas, such as 5° × 5° or 10° × 10° instead of 1° × 1°. Felt reads fewer files per tile, so the layer stays fast when you zoom out.

  • Limit the zoom levels where a slow layer shows, with zoom-based styling, or stop people from zooming out past them with map constraints.

Streaming slows down as you zoom out, because each tile covers more files. For a dataset of 1° × 1° files, Felt reads 1–2 files per tile at zoom 8–10, about 24 at zoom 6, and more than 1,000 at zoom 3, where tiles are likely to time out. If you stream through a VRT, precompute its statistics.

Before adding a large dataset, test a subset, such as 10–20 GB, and check the zoom level where performance degrades. If performance is still poor, contact support@felt.com.

Last updated

Was this helpful?