Bug report #7879

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

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

Status:Closed
Priority:Normal
Assignee:-
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

Description

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 );

History

#1 Updated by Rashad Kanavath about 11 years ago

any update?

#2 Updated by Giovanni Manghi over 7 years ago

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

#3 Updated by Giovanni Manghi over 5 years ago

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

Also available in: Atom PDF