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

2020-08-27 Thread Sean Gillies
Hi Denis, Even, On Thu, Aug 27, 2020 at 8:08 AM Even Rouault wrote: > 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: > > > > > > > > > dummy.tif > > > 3 > > > > >

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

2020-08-27 Thread Denis Rykov
In GDAL 3.1 (previous example was done in GDAL 2.2.3) I can read data from that VRT using "gdalconst.GRIORA_Cubic" but still overviews are not used: >>> from osgeo import gdal >>> from osgeo.gdal import gdalconst >>> gdal.__version__ '3.1.0' >>> url = >>>

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

2020-08-27 Thread Denis Rykov
Hi Sean. I patched rasterio as you suggested and intermediate file now looks like this (I'm trying now with a public dataset): https://gist.github.com/drnextgis/3cbdbace7b5b8b80c3c6169b109bf9db But when I read it with GDAL using non-nearest algorithm I'm getting the following error: >>> from

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

2020-08-27 Thread Even Rouault
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: > > > dummy.tif > 3 >RasterXSize="40961" RasterYSize="139265" dataType="Byte" /> > > >

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

2020-08-27 Thread Denis Rykov
I found the culprit. If remove this section from each band definition in VRT file then everything works fine: dummy.tif 3 0 0.0https://github.com/OSGeo/gdal/issues/1135>. But it has this undesirable consequence I'm experiencing. Any

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

2020-08-27 Thread Denis Rykov
I was able to reproduce this issue with pure GDAL. When you read data with boundless=True in rasterio it creates an intermediate VRT file. This is the example of file that being created in my case: PROJCS["WGS 84 / UTM zone 47N",GEOGCS["WGS

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

2020-08-26 Thread Denis Rykov
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),