<HTML><BODY><div><div>Hi, Even.<br> </div><div><span lang="en"><span><span>Using both options </span></span></span>"-optim raster" and "-optim vector" <span lang="en"><span><span>results in the same size files. This is expected, since, as follows from the option description, it only affects the rasterization algorithm.</span></span></span></div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Wednesday, March 20, 2024 1:04 AM +03:00 from Even Rouault <even.rouault@spatialys.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_17108858812076139544_BODY"><div class="cl_925219"><p> </p><div class="moz-cite-prefix_mr_css_attr">Le 19/03/2024 à 22:56, Rahkonen Jukka via gdal-dev a écrit :</div><blockquote type="cite"><div class="WordSection1_mr_css_attr"><p class="MsoNormal_mr_css_attr"><span style="mso-fareast-language:EN-US">Hi,</span></p><p class="MsoNormal_mr_css_attr"><span style="mso-fareast-language:EN-US"> </span></p><p class="MsoNormal_mr_css_attr"><span style="mso-fareast-language:EN-US" lang="EN-US">I suppose that something similar than with gdalwarp <a href="https://trac.osgeo.org/gdal/wiki/UserDocs/GdalWarp#GeoTIFFoutput-coCOMPRESSisbroken" class="moz-txt-link-freetext_mr_css_attr" target="_blank"> https://trac.osgeo.org/gdal/wiki/UserDocs/GdalWarp#GeoTIFFoutput-coCOMPRESSisbroken</a> happens but with gdal_rasterize I think there are no tricks that could help.</span></p></div></blockquote><p>Actually the -optim switch may help: <a href="https://gdal.org/programs/gdal_rasterize.html#cmdoption-gdal_rasterize-optim" class="moz-txt-link-freetext_mr_css_attr" target="_blank">https://gdal.org/programs/gdal_rasterize.html#cmdoption-gdal_rasterize-optim</a></p><p>I suspect "-optim raster" is what you would want to optimize raster size</p><pre class="moz-signature_mr_css_attr">--
<a href="http://www.spatialys.com" class="moz-txt-link-freetext_mr_css_attr" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre></div></div></div></div></div></blockquote> <div> </div></div></BODY></HTML>