We got a bunch of VRT files that we made using QGIS 2 and which reference a varying number of ECW files (from 8 to 300).

Those VRT files were perfectly runing QGIS 2.18.

Problem is: Opening those VRT files with QGis3 make either QGIS crash, or they are extremely slow to open (20min+), while QGIS memory consumption grow up to several GB.

We tried to recreate those VRT using the QGIS Build a virtual raster which calls directly gdalbuildvrt, with no success.

Here is the question:

  • Why does this happen and could it be fixed?
  • If not, is there a good alternative to VRT?

NB: An issue already exists at this subject, but no solution was provided (the gdalinfo -approx_stats one does not work).

Here are the infos about one of those VRT:

$ gdalinfo myfile.vrt
Driver: VRT/Virtual Raster
Files: myfile.vrt
      (...plus 300 others...)   
Size is 438830, 731382
Coordinate System is `'
Origin = (1341999.944345191121101,8294000.062092189677060)
Pixel Size = (0.199963874261849,-0.199963874081155)
Corner Coordinates:
Upper Left  ( 1341999.944, 8294000.062) 
Lower Left  ( 1341999.944, 8147750.084) 
Upper Right ( 1429750.091, 8294000.062) 
Lower Right ( 1429750.091, 8147750.084) 
Center      ( 1385875.018, 8220875.073) 
Band 1 Block=128x128 Type=Byte, ColorInterp=Red
Band 2 Block=128x128 Type=Byte, ColorInterp=Green
Band 3 Block=128x128 Type=Byte, ColorInterp=Blue

The content of this VRT:

<VRTDataset rasterXSize="438830" rasterYSize="731382">
  <GeoTransform>  1.3419999443451911e+06,  1.9996387426184947e-01,  0.0000000000000000e+00,  8.2940000620921897e+06,  0.0000000000000000e+00, -1.9996387408115546e-01</GeoTransform>
  <VRTRasterBand dataType="Byte" band="1">
    <SimpleSource resampling="nearest">
      <SourceFilename relativeToVRT="0">//path/to/Ortho_HR_1342_8200_2015_RVB_CC49.ecw</SourceFilename>
      <SourceProperties RasterXSize="15003" RasterYSize="25005" DataType="Byte" BlockXSize="256" BlockYSize="256" />
      <SrcRect xOff="0" yOff="0" xSize="15003" ySize="25005" />
      <DstRect xOff="0" yOff="470085" xSize="15003" ySize="25005" />
    <SimpleSource resampling="nearest">
       (... and so on ...)


Our configurations are:

  • Windows 10 (64bits)
  • QGIS 3.4 (64bits)
  • QGIS project's csr are RGF93/CC49 (3949)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.