Re: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with LERC_DEFLATE
So I tried LERC_DEFLATE and MAX_Z_ERROR=0.5 and that worked amazingly! From 350MB DEFLATE PREDICTOR 3, to 45MB... There are free 32bit elevation data here if anyone's interested: https://land.copernicus.eu/imagery-in-situ/eu-dem/eu-dem-v1.1?tab=download. Rahkonen Jukka (MML) escreveu no dia quinta, 18/11/2021 à(s) 17:34: > Hi, > > > > I have no experience on 32 bit images but play with gdaladdo and > compression options and report what you find. External overviews (-ro) are > handy for testing because you can simply rename or delete the .ovr file and > make new run with other options. External overviews take some more space > than it takes to add internal overviews into TIFF but best option as > external should be best as internal too. > > > > -Jukka Rahkonen- > > > > *Lähettäjä:* Duarte Carreira > *Lähetetty:* torstai 18. marraskuuta 2021 18.30 > *Vastaanottaja:* Rahkonen Jukka (MML) > > *Kopio:* gdal-dev@lists.osgeo.org > *Aihe:* Re: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with > LERC_DEFLATE > > > > Well, it didn't even occur to me to compress the overviews with > translate... > > I was expecting a bit more compressing from lerc... > > > > About tif 32bit, what compression do you think would yield better ratios? > > > > Thanks. > > > > Rahkonen Jukka (MML) escreveu no > dia quinta, 18/11/2021 à(s) 12:41: > > 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 *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
Re: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with LERC_DEFLATE
Hi, I have no experience on 32 bit images but play with gdaladdo and compression options and report what you find. External overviews (-ro) are handy for testing because you can simply rename or delete the .ovr file and make new run with other options. External overviews take some more space than it takes to add internal overviews into TIFF but best option as external should be best as internal too. -Jukka Rahkonen- Lähettäjä: Duarte Carreira Lähetetty: torstai 18. marraskuuta 2021 18.30 Vastaanottaja: Rahkonen Jukka (MML) Kopio: gdal-dev@lists.osgeo.org Aihe: Re: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with LERC_DEFLATE Well, it didn't even occur to me to compress the overviews with translate... I was expecting a bit more compressing from lerc... About tif 32bit, what compression do you think would yield better ratios? Thanks. Rahkonen Jukka (MML) mailto:jukka.rahko...@maanmittauslaitos.fi>> escreveu no dia quinta, 18/11/2021 à(s) 12:41: 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 mailto:gdal-dev-boun...@lists.osgeo.org>> Puolesta Duarte Carreira Lähetetty: torstai 18. marraskuuta 2021 13.45 Vastaanottaja: gdal-dev@lists.osgeo.org<mailto: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
Re: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with LERC_DEFLATE
Hi Even. I created a ticket: https://github.com/OSGeo/gdal/issues/4848 Thanks. >We would need a MAX_Z_ERROR_OVERVIEW config option for that. Please >file an enhancement ticket > >Even >Le 18/11/2021 à 12:44, Duarte Carreira a écrit : >>* 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
Re: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with LERC_DEFLATE
Well, it didn't even occur to me to compress the overviews with translate... I was expecting a bit more compressing from lerc... About tif 32bit, what compression do you think would yield better ratios? Thanks. Rahkonen Jukka (MML) escreveu no dia quinta, 18/11/2021 à(s) 12:41: > 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 *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
Re: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with LERC_DEFLATE
We would need a MAX_Z_ERROR_OVERVIEW config option for that. Please file an enhancement ticket Even Le 18/11/2021 à 12:44, Duarte Carreira a écrit : 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 -- http://www.spatialys.com My software is free, but my time generally not. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] setting MAX_Z_ERROR on overviews compressed with LERC_DEFLATE
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 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
[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