<div dir="ltr"><div>Hi Jukka,</div><div>Yes, you should definitely be using tiled tiff with jxl. The actual tile size (256,512 or 1024) did not seem to make much difference in file size from what I have experienced, so you can choose that value depending on how you plan to use the tifs later on.</div><div>In production use here, we use "-co BIGTIFF=YES -co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co COMPRESS=JXL -co JXL_EFFORT=3" . Setting the effort to 3 greatly reduces compression time while having very little effect on final image size on 16bit satellite imagery.</div><div><br></div><div>Regards,</div><div>TB<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 24, 2024 at 1:00 PM Rahkonen Jukka via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg4625377549725747682">
<div lang="FI" style="overflow-wrap: break-word;">
<div class="m_4625377549725747682WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">I made some tests about using JPEGXL (JXL) compression in GeoTIFF. I am interested in lossless compression. So far I have learned that stripes are not good, but results from tiled TIFFs are promising.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">The GeoTIFF driver manual has a warning about WEBP compression: “There is a significant time penalty for each tile/strip with lossless WebP compression, so you may want to increase the BLOCKYSIZE value for strip layout.”
I wonder if the same applies to JPEG XL compression as well. Without tiles this command was very slow<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">gdal_translate -of gtiff -co compress=jxl p4433h.tif p4433h_jxl.tif<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">This one was faster.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">gdal_translate -of gtiff -co tiled=yes -co compress=jxl p4433h.tif p4433h_jxl_tiled.tif<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Not only being slow but the compression with stripes does not really compress much. See the file sizes:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">With stripes: 359 211 087 p4433h_jxl.tif<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">With 256x256 tiles: 142 188 540 p4433h_jxl_tiled.tif<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Referense (LZW): 283 864 896 p4433h_lzw.tif<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">What might be the optimal block size for JXL-in-GeoTIFF when the aim is a good compression ratio and reasonable processing time?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></blockquote></div>