[gdal-dev] VRT and overviews

Oyvind Idland oyvind.idland at gmail.com
Wed Apr 4 08:57:44 EDT 2012


How do I get overviews to work with VRT datasets ?

What I do is
 - creating a .vrt with additional alpha band + nodata using gdalbuildvrt
(wrapping an existing TIFF)
 - creating overviews using gdaladdo. I then get an external .ovr file.
 - creating a new TIFF from the VRT

First, it seems that the .vrt does not get updated, as there is no
<Overview> tags. I then tried to manually add <Overview> for each band,
but the output TIFF does not have overviews in it.. just the original
bitmap and a mask for it.

Example:

gdalbuildvrt _r-32-2-4776-64728.vrt -overwrite -addalpha -srcnodata 0
-vrtnodata 0 r-32-2-4776-64728.tif

gdaladdo _r-32-2-4776-64728.vrt 2 4 8 16 32 64

gdal_translate -of GTiff -co COMPRESS=JPEG -co JPEG_QUALITY=80 -co
PHOTOMETRIC=YCBCR -b 1 -b 2 -b 3 -mask 4 -co COPY_SRC_OVERVIEWS=YES
--config GDAL_TIFF_INTERNAL_MASK YES _r-32-2-4776-64728.vrt
output\r-32-2-4776-64728.tif


Also, I tried to add overviews embedded inside the source tiff (wrapped in
the same .vrt), but still no overviews in the output.

Note, that what I'm really trying to do, is to create TIFF with JPEG
compression, and adding a mask that is not "contaminated" with jpeg
artifacts.

What am I doing wrong ? :)


-- oyvind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120404/c17014a8/attachment.html


More information about the gdal-dev mailing list