[gdal-dev] COG and VRT behaviour

Ian Reese xycarto at gmail.com
Wed Oct 5 20:58:05 PDT 2022


Hi GDAL,

Let's say I have two GTiff files in COG format:

f1.tif
f2.tif

f1.tif and f2.tif are created like so:

gdal_translate input.tif f1.tif \
-of COG \
-co BLOCKSIZE=256 \
-co COMPRESS=JPEG \

I can easily create a vrt of these two COGs and get the expected behaviour
where the VRT honours the overviews of the f1 and f2 COGs.

gdalbuildvrt cog.vrt f1.tif f2.tif

This is my question, is it possible to create a COG Tif from this VRT that
copies over the overviews from each COG in the VRT?

For example something like:

gdal_translate cog.vrt cog.tif -of COG -co OVERVIEWS=FORCE_USE_EXISTING

I suspect this may not be possible. My guess is that translate is confused
by which overviews to use when creating the single cog.tif? Or that when I
created f1.tif and f2.tif I missed a setting?

I have tried many combinations to get this to work, but I think it might be
time to ask the experts. Any insight to this would be greatly appreciated.

Cheer,

Ianto

-- 
Ian C Reese
https://xycarto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221006/913aafa8/attachment.htm>


More information about the gdal-dev mailing list