[gdal-dev] Overviews are not taken into account while reading with specified resampling method

Even Rouault even.rouault at spatialys.com
Thu Aug 27 07:08:29 PDT 2020


On jeudi 27 août 2020 15:08:02 CEST Denis Rykov wrote:
> I found the culprit. If remove this section from each band definition in
> VRT file then everything works fine:
> 
> <ComplexSource>
> 	<SourceFilename relativeToVRT="1" shared="0">dummy.tif</SourceFilename>
> 	<SourceBand>3</SourceBand>
> 	<SourceProperties BlockXSize="128" BlockYSize="128"
> RasterXSize="40961" RasterYSize="139265" dataType="Byte" />
> 	<SrcRect xOff="0" xSize="1" yOff="0" ySize="1" />
> 	<DstRect xOff="0" xSize="1" yOff="0" ySize="1" />
> 	<ScaleRatio>0</ScaleRatio>
> 	<ScaleOffset>0.0</ScaleOffset></ComplexSource

I'm perhaps missing something, but the above snippet added by RasterIO doesn't make sense 
to me. It just sets the pixel at (0,0) to 0. I bet it is completely useless. It would make more 
sense to have xSize/ySize of DstRect to cover the whole raster. And as <NoDataValue> is set 
on the VRTRasterBand, this should be used to fill the target raster anyway.

As far as why overviews of the original VRT aren't used is concerned, I'm not sure why. I'd 
have expected it to work, but I must be missing something.

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/20200827/3655a6f8/attachment.html>


More information about the gdal-dev mailing list