[COG] COG performance best practices?

Even Rouault even.rouault at spatialys.com
Tue Jun 12 12:26:23 PDT 2018


> * 4-band, 8-bit sources are assumed to be RGBA; band 4 (if present) is
> assumed to be an alpha channel and is extracted as the mask.

This can be dangerous guessing. Why not checking the band color interpretation 
(or ExtraSample in TIFF parlance) ?

> * all other sources are compressed using DEFLATE with a horizontal
> predictor (2 for GDAL)

For people not too much concerned about interoperability and using recent GDAL 
+ libtiff (recent libtiff here means a checkout from git, or using the 
internal libtiff copy in GDAL sources), I'd suggest using ZSTD, which will 
save a lot of CPU time for the same compression rate as DEFLATE.

> 
> I've compared data from Planet with re-transcoded sources using this
> pipeline; Planet's compression ratios are better, potentially because they
> use LZW rather than DEFLATE (and potentially a higher ZLEVEL; though I just
> changed that in marblecutter-tools).

That would be news to me that LZW is better than DEFLATE. To compare apples to 
apples, you should make sure to use the same settings of ZLEVEL and PREDICTOR. 
DEFLATE is supposed to be more efficient (compression-wise) than LZW due to 
the extra stage of Huffman compression.
For what I know, the use of LZW is essentially governed by the need of better 
interoperability since there are commercial software not able to consume 
DEFLATE compressed TIFF.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the COG mailing list