<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Lucie,</p>
<p>Thank you for updating the blog post.</p>
<p>However, when you do a "plain save" to tiff in QGIS without any creation options you will get a very suboptimal Geotiff without any compresssion. An uncompressed Geotiff takes a long time to read and create huge file sizes. You can see it in your table that the uncompressed geotiff creates the largest file (no wonder).</p>
<p>I would recommend the following creation option, assuming that your WMS contains orthoimage data:</p>
<p>COMPRESS=JPEG</p>
<p>JPEG_QUALITY=75 (it is the default, you can either skip this option or set it to some other quality value)</p>
<p>TILED=YES</p>
<pre>PHOTOMETRIC=YCBCR<br /><br />I am 99% sure that if you use the above creation options, that the Geotiff file shows very similar performance (or better) than Geopackage and the file size would be also reduced drastically.</pre>
<p>If your data contains not Orthoimages, but a small number of homogeneous colors, you should use COMPRESS=DEFLATE or COMPRESS=LZW</p>
<p>---------</p>
<p>So something like:</p>
<pre><span class="highlightedSearchTerm">gdal_translate</span> -of GTIFF -co COMPRESS=JPEG -co JPEG_QUALITY=85 -co PHOTOMETRIC=YCBCR -co TILED=YES <code>file.xml file.tif</code></pre>
<p><br /></p>
<p>BTW, in QGIS you need to do this (use the "JPEG compression" profile) and use the green "Plus" to add the options for PHOTOMETRIC and TILED:</p>
<p><img src="cid:66ca67824e5d5c59ae442045f34d7ca6@carto.net" /></p>
<p>I would appreciate if you could use my recommendation above and compare the numbers again and inform us about the differences. And then I would be surprised if Geopackage is still the fastest or GTIFF - and if gpgk, then it would be interesting to see how much the difference really is?</p>
<p>Thanks a lot,</p>
<p>Andreas</p>
<p><br /></p>
<p id="reply-intro">On 2020-07-07 11:37, Lucie Nicolier wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<p>Hi everyone,</p>
<p>I upgraded the blog-post with all command lines I used and how I get the base TIF and the other formats from it.</p>
<p>Hope to see the parameters I used will explain the results we got.</p>
<p>I'm open to received recommendations to get better result.</p>
<p>Stay here for more information.</p>
<p>Regards,</p>
<p>Lucie</p>
<p><br /></p>
<div class="v1moz-signature">
<div class="v1moz-signature">
<div class="v1moz-signature"><span style="text-align: left; color: #000000; font-family: 'Verdana', sans-serif; font-size: 10pt;">Lucie Nicolier</span><br /><a href="mailto:lucie@opengis.ch" rel="noreferrer"> <span style="text-align: left; color: #000000; font-family: 'Verdana', sans-serif; font-size: 8pt;">lucie@opengis.ch</span> </a><br /><span style="text-align: left; color: #000000; font-family: 'Verdana', sans-serif; font-size: 8pt;"><a href="tel:+41792766776" target="_blank" rel="noopener noreferrer">+41 (0)79 276 67 76</a><br /></span><br />
<div><a href="http://www.opengis.ch" target="_blank" rel="noopener noreferrer"> <img src="cid:15941176375f044e058959e435966111@carto.net" alt="OPENGIS.ch Logo" width="200" height="80" /></a></div>
<div> </div>
<div> </div>
</div>
</div>
</div>
<div class="v1moz-cite-prefix">Le 09.06.2020 à 14:01, Matthias Kuhn a écrit :</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<p>Thanks for the excellent questions Even</p>
<p>Lucie has done the analysis and has all the parameters. She is not in the office these days. Once she is back I hope she can share the parameters and potentially also add a couple of additional rows to the table with improved parameters.</p>
<p>Sorry that I can't help more right now.</p>
<p>Matthias</p>
<div class="v1moz-cite-prefix">On 6/9/20 1:56 PM, Even Rouault wrote:</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<style type="text/css">#replybody1 p, #replybody1 li { white-space: pre-wrap; }</style>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">Matthias,</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">thanks for the analysis. There are however a few unexpected results.</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">1) I'd expect gpkg pyramid_JPEG and COG_JPEG to have very similar sizes, even COG_JPEG being potentially slightly smaller.</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">And I'd also expect COG_JPEG to be slighly faster (but with less confidence that my statement about size)</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">Has by chance the source raster an alpha band ? In which case gpkg_pyramid_JPEG would have dropped it, whereas COG_JPEG will encode it as DEFLATE compressed mask, but still the difference is surprising</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">Another explanation might be the block size. GPKG defaults to 256x256 tiles, whereas COG_JPEG to 512x512. Perhaps that affect compression efficiency. And performance? (depends if your bench maintains the GDAL raster opened between requests or not)</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">If you didn't specify quality settings, both COG_JPEG and GPKG JPEG should use the same quality of 75%</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">2) For the same compression type, block sizes and number of overviews, MBTiles (the report doesn't specify the compression scheme for it) and GeoPacakge should also have similar sizes and performance. They are really close brothers, with just a few systems tables different.</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">Even</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> Hi all,</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">></p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> At OPENGIS.ch we have recently looked into different raster formats. The</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> results can be read here:</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> <a class="v1moz-txt-link-freetext" href="https://www.opengis.ch/2020/06/09/offline-wms-benchmarking-raster-formats-fo" target="_blank" rel="noopener noreferrer">https://www.opengis.ch/2020/06/09/offline-wms-benchmarking-raster-formats-fo</a></p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> r-qfield/</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">></p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> Not that surprising, but one of the interesting findings was that webp</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> is very efficient. Low filesize, reasonable rendering performance,</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> support for transparency. In short, it has all the potential for being</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> used as default transport format for WM(T)S.</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">></p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> Looking at our server implementation, this format is not supported. Did</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> someone ever think about or even look into that?</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">></p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">> Regards</p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-paragraph-type: empty; -qt-block-indent: 0; text-indent: 0px; margin: 0px;"> </p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">--</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;">Spatialys - Geospatial professional services</p>
<p style="-qt-block-indent: 0; text-indent: 0px; -qt-user-state: 0; margin: 0px;"><a class="v1moz-txt-link-freetext" href="http://www.spatialys.com" target="_blank" rel="noopener noreferrer">http://www.spatialys.com</a></p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</div>
</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br />QGIS-Developer mailing list<br /><a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p><br /></p>

</body></html>