On mercredi 30 octobre 2019 15:52:54 CET Jose Gomez-Dans wrote: > Hi, > > I'm mosaicking a large number of small tiles using the GDAL python bindings > (python 3.7, gdal 3.0.1, but also tested on 2.4.2). Code is something like > > ``` > > *output_fname = "/something/or/other.vrt"* > *fnames = ["file1.tif", ..., "fileN.tif"]* > > > > > *dst_ds = gdal.BuildVRT( output_fname, fnames, > options=gdal.BuildVRTOptions(separate=True), )* > *dst_ds = None* > ``` > > This fails with lots of errors like > ERROR 4: fileXXX.tif: No such file or directory > Warning 1: Can't open fileXXX.tif. Skipping it
gdalbuildvrt is normally cautious about non opening too many files at the same time. I can't replicate your issue with the following script ``` from osgeo import gdal import shutil fnames = [] for i in range(1024): dstname = 'testbuildvrt/byte%d.tif' % i shutil.copy('byte.tif', dstname) fnames.append(dstname) dst_ds = gdal.BuildVRT( "/tmp/out.vrt", fnames, options=gdal.BuildVRTOptions(separate=True), ) dst_ds = None ``` > The aim of this is to create a VRT mosaic that can then be converted to > GeoTIFF. If you want a mosaic, you likely want separate=False. Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev