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

Denis Rykov rykovd at gmail.com
Wed Aug 26 09:18:39 PDT 2020


I have remote *.vrt raster and *.vrt.ovr accessible through HTTP. When I
run the following script with rasterio:

with rasterio.open("http://*.vrt"") as src:
    image = src.read(indexes=[1, 2, 3], **{
        "window": Window(col_off=6961, row_off=105176, width=5671, height=5648),
        "resampling": Resampling.cubic,
        "boundless": True,
        "out_shape": (3, 383, 385),
        "masked": True
    })

depending on "resampling" algorithm GDAL sends different amounts of
requests to the server. In the case of "cubic" it doesn't take into account
overviews and sends requests directly to *.tif files (900 in my case). In
case of "nearest" everything is ok (only 60 requests, *.vrt.ovr is taken
into account).

Does GDAL check the resampling algorithm of overviews and in case it
differs from the option specified in read() method they are bypassed or it
works differently?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200826/c2f49e1f/attachment.html>


More information about the gdal-dev mailing list