Bug report #2427
Can't build pyramids for IMG files
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||12487|
Seems that QGIS can't build pyramids for the ERDAS IMAGINE (IMG) files, even if file don't have buildin pyramids. To reproduce:
1. Open QGIS and load IMG file without internal and external pyramids
2. Right click on raster layer and select Properties-Pyramids.
3. Click on "Build pyramids" button. Nothing happens and no pyramids was builds
But with gdaladdo I can build pyramids on this files.
#1 Updated by Giovanni Manghi about 13 years ago
if you don't choose the pyramids resolution (up-right), then clicking the "build pyramid" button does nothing. Nevertheless if you choose at least one resolution then the button works, ans in the case of .img files a warning pops up
"Building pyramid overviews is not supported on this type of raster."
This is at least what happens with the .img raster you can find in the qgis sample dataset. Gdal tools also cannot create overviews for this particular file.
Did not tested gdal from the command line.
#2 Updated by Alexander Bruy about 13 years ago
I've test gdal from command line with landcover.img from the qgis sample dataset. Here is output
of gdalinfo (no pyramids)
gdalinfo -nomd gis-samples/other/landcover.img Driver: HFA/Erdas Imagine Images (.img) Files: gis-samples/other/landcover.img Size is 3663, 1964 .... Band 1 Block=64x64 Type=Byte, [[ColorInterp]]=Palette Description = Layer_1 Color Table (RGB with 14 entries)
now build pyramids
gdaladdo -r average gis-samples/landcover.img 2 4 8 16 32 0...10...20...30...40...50...60...70...80...90...100 - done.
and look with gdalinfo again
gdalinfo -nomd gis-samples/other/landcover.img Driver: HFA/Erdas Imagine Images (.img) Files: gis-samples/other/landcover.img Size is 3663, 1964 .... Band 1 Block=64x64 Type=Byte, [[ColorInterp]]=Palette Description = Layer_1 Overviews: 1832x982, 916x491, 458x246, 229x123, 115x62 Color Table (RGB with 14 entries)
Pyramids was build. When this raster loaded in QGIS in properties all this pyramids are shows as active.
#3 Updated by Giovanni Manghi about 13 years ago
So there is a problem in the way that qgis handles .img files/gdal when it comes to create pyramids. And so does the gdal tools plugin.
You may want then to open a ticket also in the gdal tools trac.
#4 Updated by Maxim Dubinin almost 12 years ago
- Resolution set to fixed
- Status changed from Open to Closed