Hi,

I made some tests with an 8 bit RGB image.
First observation was that gdaladdo supports lerc_deflate (even it is not 
documented), but it does not support “MAX_Z_ERROR”. This yields same sized ovr 
file with or without max_z_error.
gdaladdo -ro lerc_def2.tif --config compress_overview lerc_deflate --config 
MAX_Z_ERROR 10

Another observation was that this option would really save some disk space. I 
compressed the lossless ovr file with gdal_translate by using -co 
max_z_error=10 and file sizes were:

source tiff: 432 072 372 bytes
lecr_deflate cog without overviews: 311 258 085 bytes

lossless lerc_deflate overviews: 118 954 009 bytes
lerc_deflare overviews with z_error=10: 52 400 583 bytes

For comparison even not relevant to original question about 32 bit data
jpeg-ycbcr overviews with default quality: 14 481 967 bytes

-Jukka Rahkonen-

Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org> Puolesta Duarte Carreira
Lähetetty: torstai 18. marraskuuta 2021 13.45
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with LERC_DEFLATE

Hi there.

I am looking into compressing overviews for a DEM, with LERC_DEFLATE and it 
works. But I'm trying to set the precision loss and get better compression, 
since for overviews I don't really care that much.
Ok, so the question is how to set the MAX_Z_ERROR for overviews compressed with 
LERC_DEFLATE?

More context:
My reasoning is to compress losslessly the dem with deflate predictor 3, and 
then compress "lossly"  the overviews with lerc_deflate.
Since this is 32bit dataset, I can't use jpeg on the overviews.

Thanks in advance.
Duarte

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to