Bug report #7879

Automatic creation of warped VRT is incompatible with pyramid (overview) supports

Added by Julien Michel almost 11 years ago. Updated almost 5 years ago.

Category:Data Provider
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:16753


From src/providers/gdal/qgsgdalprovider.cpp , line 2278, we can read that a warped VRT is automatically generated by QGis if one of the following condition holds on the raster input :
- No geo transform,
- Pixel size x < 0,
- Pixel size y > 0,
- Rotated raster,
- Raster with GCPs.

If the input raster has one of these properties, a warped VRT will be generated by QGis and there is nothing that can be done to prevent it. However, when such a warped VRT is generated, QGis will ignore any multi-resolution pyramid (or overview files) available with this raster, and QGis will also prevent the user from generating manually pyramids from the layer properties dialog (Message about gdal driver not supporting overviews, even if the input raster is actually geotiff).

As a result, large rasters with one of the properties listed above can not be used properly in Qgis.

Here is the corresponding piece of code from qgsgdalprovider.cpp :

bool hasGeoTransform = GDALGetGeoTransform( mGdalBaseDataset, mGeoTransform ) == CE_None;
if (( hasGeoTransform
&& ( mGeoTransform[1] < 0.0 || mGeoTransform[2] != 0.0 || mGeoTransform[4] != 0.0 || mGeoTransform[5] > 0.0 ) ) || GDALGetGCPCount( mGdalBaseDataset ) > 0 ) {
QgsLogger::warning( "Creating Warped VRT." );
mGdalDataset = GDALAutoCreateWarpedVRT( mGdalBaseDataset, NULL, NULL,
GRA_NearestNeighbour, 0.2, NULL );


#1 Updated by Rashad Kanavath over 10 years ago

any update?

#2 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#3 Updated by Giovanni Manghi almost 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF