[PROJ] [gdal-dev] LIBERTIFF / Thread-safe TIFF reader

Even Rouault even.rouault at spatialys.com
Sun Dec 22 07:40:03 PST 2024


(dropping gdal-dev)

>
> geotiff.js has LERC support.

Actually looking at 
https://github.com/geotiffjs/geotiff.js/blob/master/src/compression/lerc.js, 
I see it supports LERC_ZSTD and there's a 'import { ZSTDDecoder } from 
'zstddec'", so adding standalone ZSTD support should likely be easy for 
someone with moderate JS skills.

> Floating point LERC TIFFs compressed with a MAX_Z_ERROR to one decimal 
> better than the *stated precision* of the grids
That might be tricky to determine since not all grids are published with 
a stated precision (for ones in an ASCII format looking at the original 
file could potentially give some hint assuming the number of decimals 
used reflect the precision, but for ones in let's say GTX or GSB, we 
can't really tell), and we can't use the EPSG accuracy of the 
transformation to determine it. For example the KKJ <--> ETRS89 TIN 
transformation is published in EPSG with an accuracy of 3 cm, but NLS 
Finland wants results to be reproducible with a precision of 1e-4 m
> would be smaller and more efficiently compressed/decompressed. By 
> maybe a 1/3rd over zstd and deflate.

Experiment with our current biggest grid EGM_2008:

42646903 egm_lerc_zstd_level_22_1e-3.tif   # -co COMPRESS=lerc_zstd -co 
MAX_Z_ERROR=0.001 -co TILED=yes  -co ZSTD_LEVEL=22
42911471 egm_lerc_deflate_1e-3.tif    # -co COMPRESS=lerc_deflate -co 
MAX_Z_ERROR=0.001 -co TILED=yes
43592935 egm_lerc_zstd_1e-3.tif        # -co COMPRESS=lerc_zstd -co 
MAX_Z_ERROR=0.001 -co TILED=yes
45776592 egm_lerc_1e-3.tif                # -co COMPRESS=lerc -co 
MAX_Z_ERROR=0.001 -co TILED=yes
60089671 egm_lerc_deflate_1e-4.tif   # -co COMPRESS=lerc_deflate -co 
MAX_Z_ERROR=0.0001 -co TILED=yes
60684447 egm_lerc_zstd_1e-4.tif       # -co COMPRESS=lerc_zstd -co 
MAX_Z_ERROR=0.0001 -co TILED=yes
61279322 egm_lerc_1e-4.tif               # -co COMPRESS=lerc -co 
MAX_Z_ERROR=0.0001 -co TILED=yes
78849988 egm_zstd_predictor_3_level_22.tif     # -co COMPRESS=zstd -co 
ZSTD_LEVEL=22 -co PREDICTOR=3 -co TILED=yes
80585622 /home/even/proj/PROJ-data/us_nga/us_nga_egm08_25.tif    # 
tiled, LZW, Predictor=3
82209385 egm_zstd_predictor_3_level_9.tif        # -co COMPRESS=zstd -co 
PREDICTOR=3 -co TILED=yes

-- 
http://www.spatialys.com
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.
Mood of the day: "Bien entendu, on peut sauter sur sa chaise comme un cabri en disant : les standards ! les standards ! les standards ! Mais ça n’aboutit à rien et ça ne signifie rien." ~ dixit De Gaulle



More information about the PROJ mailing list