Skip to content
Permalink
Browse files

Fixed bug that caused GDAL raster layers without a geotransform to no…

…t be displayed

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4998 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
larsl
larsl committed Mar 11, 2006
1 parent 3122e9d commit 213682310a0b03cb8b17d28e144557666c985347
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/raster/qgsrasterlayer.cpp
@@ -4073,7 +4073,13 @@ QString QgsRasterLayer::getMetadata()

if (providerKey.isEmpty())
{
if (gdalDataset->GetGeoTransform(adfGeoTransform) == CE_None)
if (gdalDataset->GetGeoTransform(adfGeoTransform) != CE_None)
{
// if the raster does not have a valid transform we need to use
// a pixel size of (1,-1), but GDAL returns (1,1)
adfGeoTransform[5] = -1;
}
else
{
myMetadataQString += "<tr><td bgcolor=\"gray\">";
myMetadataQString += tr("Origin:");

0 comments on commit 2136823

Please sign in to comment.
You can’t perform that action at this time.