[gdal-dev] Reading a VRT file & overview usage

Angus Dickey angus at myheat.ca
Wed Nov 4 12:03:22 PST 2020


Even,

Thanks for having a look at the data, I see what you mean about the NODATA
value in the COGs. They are *supposed* to have an internal NODATA value set
on the band, but they actually do not. I set NODATA with gdal_edit and the
resampling method no longer affects overview usage.

For us, this workaround is perfect because the COGs were supposed to have
NODATA set anyway. For others, maybe the solution is as simple as adding a
note to the "GDAL Virtual File Systems" page. Regardless, this will be in
the mailing list archives if anyone else runs into it.

Thanks again for your help,

Angus

On Wed, Nov 4, 2020 at 8:04 AM Even Rouault <even.rouault at spatialys.com>
wrote:

> Angus,
>
> The difference of behaviour between my test case and yours is that yours
> has a
> <NoDataValue> set on the VRTRasterBand, and the source COGs don't have
> that
> value. In this situation a key optimization used by the VRT driver is
> disabled, and there's a fallback to code that won't make use of the source
> overviews to get correct results. I imagine that could be improved, but
> this
> is not a 5-minute type of fix. A workaround would probably to create your
> COGs
> with 0 set as nodata value.
>
> Even
>
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201104/8bd908b4/attachment.html>


More information about the gdal-dev mailing list