Skip to content

v0.4.0

Pre-release
Pre-release

Choose a tag to compare

@alpha-beta-soup alpha-beta-soup released this 03 Jul 04:22
· 141 commits to master since this release

Compression and compaction

What's Changed

Full Changelog: v0.3.0...v0.4.0


Compaction

Sample images for compaction (https://github.com/mommermi/geotiff_sample), rounding all bands down to the nearest 100, and only compacting where all three bands with a common ancestor have the same value. (Images only showing B01, but compaction is across all bands.)

H3
Screenshot from 2025-07-03 15-07-26

rHEALPix
Screenshot from 2025-07-03 15-07-37

Geohash
Screenshot from 2025-07-03 15-07-46

S2
Screenshot from 2025-07-03 15-07-55


Compression

Sample compression results for H3, compacted as above, but at a higher maximum resolution (13); and with the following forms of compression:

Compression Size
none 43 MB
lz4 5.8 MB
brotli 3.3 MB
snappy 6.3 MB
zstd 4.9 MB

The input image is 5.7 MB at 10 m resolution, and with whatever compression that sample image comes with.

H3 represenation of the image requires 2.091 million cells, vs 1.002 million cells for the raster (so this is 2x over-sampled). But note that sample image values are rounded to the nearest 100 for the demonstration of compaction, so the comparison really isn't 1:1.

Even higher compression and compaction would be expected for true categorical raster data (or vector data).