Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lossless compression information for LERC #89

Merged
merged 6 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloud-optimized-geotiffs/cogs-details.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ There are a variety of compression codecs supported by GeoTIFF. Compression code

**JPEG** is a **lossy** compression codec useful for true-color GeoTIFFs intended to be used only for visualization. Because it's lossy, it tends to produce smaller file sizes than deflate or LZW. JPEG should only be used with RGB `Byte` data.

**LERC** (Limited Error Raster Compression) is a lossy but very efficient compression algorithm for floating point data. This compression rounds values to a precision provided by the user and tends to be useful e.g. for elevation data where the source data is known to not have precision beyond a known value. But note, this compression is **not lossless**. Additionally, LERC is a relatively new algorithm and may not be supported everywhere. GDAL needs to be compiled with the LERC driver in order to load a GeoTIFF with LERC compression.
**LERC** (Limited Error Raster Compression) is a very efficient compression algorithm for floating point data. This compression rounds values to a precision provided by the user and tends to be useful for data, such as elevation, where the source data is known to have precision to a known value. But note, this compression is **not lossless** when used with a precision greater than 0. Additionally, LERC is a relatively new algorithm and may not be supported everywhere. GDAL needs to be compiled with the LERC driver in order to load a GeoTIFF with LERC compression.

Some other compression algorithms may be preferred depending on the data type and distribution, and if the goal is maximum compression or not. Codecs that produce the smallest file sizes _tend_ to take longer to read into memory. If the network bandwidth to load the file is slow, then a very efficient compression algorithm may be most efficient, even if it takes longer to decompress when loaded. Alternatively, if the network speed is very fast, or if reading from a local disk, a slightly less efficient compression codec that decompresses faster may be preferred.

Expand Down
2 changes: 1 addition & 1 deletion cookbooks/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Cookbooks should address common questions and present solutions for cloud-optimi

Cookbooks:

* [Zarr Visualization Cookbook (in development)](https://nasa-impact.github.io/zarr-visualization-cookbook/)
* [Zarr Visualization Report (in development)](https://nasa-impact.github.io/zarr-visualization-report/)
Loading