<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
04.04.2012 16:57, Oyvind Idland написал:
<blockquote
cite="mid:CAEVk4t1k7_OL65LXaeyQFWuY3nxHAoZ8ZFKcJ+82Q4FWv6o+zw@mail.gmail.com"
type="cite">How do I get overviews to work with VRT datasets ?<br>
<br>
What I do is<br>
- creating a .vrt with additional alpha band + nodata using
gdalbuildvrt (wrapping an existing TIFF)<br>
- creating overviews using gdaladdo. I then get an external .ovr
file.<br>
- creating a new TIFF from the VRT<br>
<br>
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,<br>
but the output TIFF does not have overviews in it.. just the
original bitmap and a mask for it.<br>
<br>
Example:<br>
<br>
gdalbuildvrt _r-32-2-4776-64728.vrt -overwrite -addalpha
-srcnodata 0 -vrtnodata 0 r-32-2-4776-64728.tif<br>
<br>
gdaladdo _r-32-2-4776-64728.vrt 2 4 8 16 32 64<br>
<br>
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<br>
<br>
<br>
Also, I tried to add overviews embedded inside the source tiff
(wrapped in the same .vrt), but still no overviews in the output.<br>
<br>
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.<br>
<br>
What am I doing wrong ? :)<br>
<br>
<br>
-- oyvind<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
This is the bug and I'm working to fix it.<br>
I think this bug are mentioned in such tickets <a
class="moz-txt-link-freetext"
href="http://trac.osgeo.org/gdal/ticket/2076">http://trac.osgeo.org/gdal/ticket/2076</a>
and <a class="moz-txt-link-freetext"
href="http://trac.osgeo.org/gdal/ticket/3482">http://trac.osgeo.org/gdal/ticket/3482</a><br>
<br>
Regards,<br>
Dmitry<br>
</body>
</html>