[gdal-dev] Extracting Subsampled Mask Band from VRT Returning 1st Band Rather Than Mask Band

Patrick Young patrick.mckendree.young at gmail.com
Wed May 15 10:28:35 PDT 2019


An additional data point; loading the VRT in QGIS, everything looks correct
at full resolution (e.g. alpha as transparency in the right spot) but as
you zoom out, alpha suddenly becomes the first band and the transparency is
bonkers.

On Wed, May 15, 2019 at 11:17 AM Patrick Young <
patrick.mckendree.young at gmail.com> wrote:

> Hi all,
>
> I'm experiencing some strange behavior when extracting a mask band using
> gdal_translate from a VRT vs the source GTiff at a reduced resolution.  I
> have a 3 band, 8 bit JPEG compressed (YCbCR) RGB geotiff with an internal
> no data mask and with internal overviews.  Making a VRT of this and running
>
> gdal_translate -b mask in.vrt mask.tif
>
>
> Returns the expected no data mask.
>
> However, if I add in "-outsize 10% 0", I instead get the first band back
> as the mask tif rather than the mask band.  Any -outsize setting has the
> same effect.
>
> Repeating this with the source geotiff rather than the vrt works as
> expected.
>
> Interestingly, running
>
> gdalinfo -oo OVERVIEW_LEVEL=1 in.vrt
>
> reports no mask flags set at all (they are reported without the -oo
> option), but running on the original geotiff rather than the vrt does
> report the mask flags.
>
> Anyone have thoughts on what the VRT driver is doing?
>
> Thanks,
> Patrick
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190515/60375392/attachment-0001.html>


More information about the gdal-dev mailing list