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
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to