# Cloud Optimized GeoTiffs

<figure><img src="https://217108486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmRfGitkyjOEMvVsEyGWN%2Fuploads%2F08MmgWY4fhRoT30b6B27%2Fforest%20loss.png?alt=media&#x26;token=7aec7a4c-614e-46c5-be2c-cf15cbabad02" alt="" width="563"><figcaption></figcaption></figure>

While Felt can read many raster formats, storing your data as a [Cloud Optimized Geotiff](https://cogeo.org/) (COGs) allows efficient access of subsets of data for fast viewing.

{% hint style="success" %}
This feature is only available to customers on the [Enterprise plan](https://felt.com/pricing). To upgrade, [contact sales](https://felt.com/sales).
{% endhint %}

## Configuration

<table><thead><tr><th width="149.22918701171875">Required?</th><th width="188.5181884765625">Configuration option</th><th>Recommended values</th></tr></thead><tbody><tr><td>Mandatory</td><td>Overview resampling</td><td><ul><li><code>bilinear</code> for floating point data</li><li><code>nearest</code> for integer or categorical data</li></ul></td></tr><tr><td>Mandatory</td><td>Block size</td><td><code>256x256</code> or <code>512x512</code></td></tr><tr><td>Recommended</td><td>Compression scheme</td><td><ul><li><code>YCbCr</code> with JPG compression for 8-bit RGB data</li><li><code>DEFLATE</code>, <code>LZW</code>, or <code>ZSTD</code> for floating point data</li></ul></td></tr><tr><td>Recommended</td><td>Transparency</td><td>Set 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, per the GeoTIFF specification</td></tr></tbody></table>

{% hint style="warning" %}
If you upload a Cloud Optimized GeoTIFF that meets the mandatory requirements but doesn’t have summary statistics, Felt will sample the entire file to compute the values, which will add additional processing time.
{% endhint %}

## Converting raster files to Cloud Optimized GeoTIFFs

1. Install the [GDAL](https://gdal.org/en/stable/download.html#binaries) command line tools. If you’re using [homebrew](https://brew.sh/) on MacOS, you can do this with `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 will create a COG with summary stats and overviews that will be most efficiently streamed into Felt.

<details>

<summary>Example for floating-point data</summary>

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

</details>

<details>

<summary>Example for integer data</summary>

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

</details>
