> For the complete documentation index, see [llms.txt](https://help.felt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.felt.com/upload-anything/stream-large-rasters/cloud-optimized-geotiffs.md).

# 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)](https://cogeo.org/) 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](/upload-anything/stream-large-rasters.md).

## Recommended COG settings

<table><thead><tr><th width="149.22918701171875">Required?</th><th width="188.5181884765625">Setting</th><th>Recommended values</th></tr></thead><tbody><tr><td>Required</td><td>Overview resampling</td><td><code>bilinear</code> for floating-point data; <code>nearest</code> for integer or categorical data</td></tr><tr><td>Required</td><td>Block size</td><td>Internal tiles of <code>512x512</code> pixels, best for streaming. <code>256x256</code> also works.</td></tr><tr><td>Recommended</td><td>Overviews</td><td>Several overview levels. The <code>COG</code> output format in GDAL adds them.</td></tr><tr><td>Recommended</td><td>Compression</td><td><code>YCbCr</code> with JPEG compression for 8-bit RGB data; <code>DEFLATE</code>, <code>LZW</code>, or <code>ZSTD</code> for floating-point and integer data</td></tr><tr><td>Recommended</td><td>Transparency</td><td>An explicit <a href="https://gdal.org/en/stable/development/rfc/rfc15_nodatabitmask.html#alpha-bands">nodata mask band</a></td></tr><tr><td>Recommended</td><td>Summary statistics</td><td>Min, max, mean, and standard deviation, stored in the header as the GeoTIFF specification describes</td></tr></tbody></table>

{% hint style="warning" %}
A COG without summary statistics still works, but Felt samples the entire file to compute them, which adds processing time.
{% endhint %}

## Convert rasters to Cloud Optimized GeoTIFFs

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

1. Install the [GDAL](https://gdal.org/en/stable/download.html#binaries) command-line tools. If you use [Homebrew](https://brew.sh/) on macOS, run `brew install gdal`.
2. Use the [gdal\_translate](https://gdal.org/en/stable/programs/gdal_translate.html#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:

```bash
$ 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:

```bash
$ gdal_translate -stats -of COG -resampling nearest -co COMPRESS=DEFLATE {input}.tif {output}.tif
```

## Streaming performance

{% hint style="success" %}
Available on the Business and Enterprise plans. [Compare plans](https://felt.com/pricing#compare)
{% endhint %}

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](/upload-anything/stream-large-rasters/vrt-mosaics.md).

For streaming, we recommend these practices in addition to the [Recommended COG settings](#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](/styling/zoom-based-styling.md), or stop people from zooming out past them with [map constraints](/maps/map-settings.md#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](/upload-anything/stream-large-rasters/vrt-mosaics.md#step-5-precompute-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>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.felt.com/upload-anything/stream-large-rasters/cloud-optimized-geotiffs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
