[gdal-dev] [Python bindings] BuildOverviews() not supported for VRT dataset

umbertofilippo umbertofilippo at tiscali.it
Fri Feb 7 05:02:58 PST 2020


Yeah you're totally right obviously :)

i forgot to copy and paste ds = gdal.BuildVRT(out_vrt, rasters,
options=vrt_options) in between...

out_vrt = os.path.join(out_dir, 'mosaic.vrt')
ds = gdal.BuildVRT(out_vrt, [raster1.tif, raster2.tif])
ds = None # this did the trick!
ds = gdal.BuildVRT(out_vrt, rasters, options=vrt_options)
factors = [128, 256, 512]
gdal.SetConfigOption('COMPRESS_OVERVIEW', 'DEFLATE')
ds.BuildOverviews("AVERAGE", factors)

Anyway, great that you already fixed it!

Umberto



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list