Opened 14 years ago

Closed 13 years ago

#2427 closed bug (fixed)

Can't build pyramids for IMG files

Reported by: alexbruy Owned by: ersts
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Rasters Version: Trunk
Keywords: pyramids, IMG Cc: dr, simgislab, alexbruy
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

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.

Change History (6)

comment:1 by lutra, 14 years ago

Hi,

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.

Closing?

comment:2 by alexbruy, 14 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.

comment:3 by lutra, 14 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.

comment:4 by lutra, 14 years ago

Owner: changed from nobody to ersts

comment:5 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

comment:6 by gislab, 13 years ago

Resolution: fixed
Status: newclosed

it works now. WinXP, r15700

Note: See TracTickets for help on using tickets.