Skip to content

Commit

Permalink
Fixed bug that caused GDAL raster layers without a geotransform to no…
Browse files Browse the repository at this point in the history
…t be displayed

git-svn-id: http://svn.osgeo.org/qgis/trunk@4998 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
larsl committed Mar 11, 2006
1 parent dd7d0e0 commit b29d129
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:");
Expand Down

0 comments on commit b29d129

Please sign in to comment.