[gdal-dev] vrt and too many open files error
Even Rouault
even.rouault at spatialys.com
Fri Oct 6 08:55:46 PDT 2017
On vendredi 6 octobre 2017 17:29:40 CEST Julien Michel wrote:
> Dear all,
>
> I have a VRT file, which I generated by a script I wrote, that simply
> mosaics 2750 tiles (images of the same size). I can not read back this
> vrt file with gdal, it says:
>
> $ gdalinfo cloud_plain.vrt
>
> ERROR 4: Too many open files
> gdalinfo failed - unable to open 'cloud_plain.vrt'.
>
> Reading this tracker [1], I think it should not complain ? Note that
> this happens when parsing the vrt file, not actually reading data. If I
> gdal_translate only a small portion spanning a few tiles, it will still
> complain. Shall I file a bug report or is this behavior expected ?
Julien,
it is likely that if you built it at hand that your VRT sources lack a SourceProperties element
<SourceProperties RasterXSize="xxx" RasterYSize="xxx" DataType="xxx"
BlockXSize="xxx" BlockYSize="xxx" />
Without that element, GDAL must open each file, and you hit the 1024 file descriptor limit
~~~
That said, in theory the VRT driver could be improved to avoid having that element at all (and
it would be desirable not having it). It is just needed so we can instanciate a ProxyDataset
object since it needs to know those characteristics, but the VRT logic itself shouldn't need
them until it identifies that it must read from the source. At the time where I improved that
point in GDAL, I was still a bit unfamiliar with the code base and didn't dare touching that
aspect ;-)
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171006/41a7f1a4/attachment-0001.html>
More information about the gdal-dev
mailing list