[QGIS Commit] r8170 -
branches/gdalogr-capi-branch/qgis/src/core/raster
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Feb 19 21:54:40 EST 2008
Author: warmerdam
Date: 2008-02-19 21:54:40 -0500 (Tue, 19 Feb 2008)
New Revision: 8170
Modified:
branches/gdalogr-capi-branch/qgis/src/core/raster/qgsrasterlayer.cpp
Log:
recover if warped vrt creation fails
Modified: branches/gdalogr-capi-branch/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- branches/gdalogr-capi-branch/qgis/src/core/raster/qgsrasterlayer.cpp 2008-02-19 14:45:27 UTC (rev 8169)
+++ branches/gdalogr-capi-branch/qgis/src/core/raster/qgsrasterlayer.cpp 2008-02-20 02:54:40 UTC (rev 8170)
@@ -472,6 +472,12 @@
mGdalDataset =
GDALAutoCreateWarpedVRT( mGdalBaseDataset, NULL, NULL,
GRA_NearestNeighbour, 0.2, NULL );
+ if( mGdalDataset == NULL )
+ {
+ QgsLogger::warning("Warped VRT Creation failed.");
+ mGdalDataset = mGdalBaseDataset;
+ GDALReferenceDataset( mGdalDataset );
+ }
}
else
{
More information about the QGIS-commit
mailing list