Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3033 closed defect (fixed)

gdaladdo not producing correct overviews for greyscale+alpha image

Reported by: esok Owned by: Even Rouault
Priority: normal Milestone: 1.6.2
Component: GDAL_Raster Version: 1.6.1
Severity: normal Keywords:
Cc: warmerdam


In gdal 1.6.1, gdaladdo is not producing the correct overviews for an image I'm working on. It works correctly with gdal 1.5.4. The image is very large and can be found at in case it cannot be attached to this ticket. I then try to run:

gdaladdo -r average 200906191445-goes12-fulldisk-ir4.tiff 2 4 8 16

Symptoms: The image appears blank at some resolutions, notably 512x512 and 256x256, where the greyscale depth goes from 8 to 1. gdal 1.5.4 works correctly and the greyscale depth remains at 8 at the smaller sizes. I used ImageMagick?'s "identify -verbose" utility to determine bit depths for the overview images.

Change History (4)

comment:1 Changed 11 years ago by Even Rouault

Owner: changed from warmerdam to Even Rouault
Status: newassigned

comment:2 Changed 11 years ago by Even Rouault

Component: UtilitiesGDAL_Raster
Milestone: 1.6.2
Resolution: fixed
Status: assignedclosed

Yes, regression due to mask bands being taking into account for overview computation in GDAL 1.6, which causes problems with cascaded overview optimization.

Fixed in trunk (r17266) and branches/1.6 (r17267) by disabling cascaded optimization in those cases. Test added in r17268.

Workaround with GDAL 1.6.0 and 1.6.1 : 1) if you can live with neirest neighbour resampling, that would avoid the bug 2) if you really want average resampling, you'll have to build the overview levels one at a time, and in the following order :

gdaladdo -r average 200906191445-goes12-fulldisk-ir4.tiff 2
gdaladdo -r average 200906191445-goes12-fulldisk-ir4.tiff 4
gdaladdo -r average 200906191445-goes12-fulldisk-ir4.tiff 8
gdaladdo -r average 200906191445-goes12-fulldisk-ir4.tiff 16

comment:3 Changed 11 years ago by Even Rouault

Cc: warmerdam added

Frank, you might be interested in backporting that fix in 1.6-esri.

comment:4 Changed 11 years ago by warmerdam

Changes ported into 1.6-esri branch (r17274).


Note: See TracTickets for help on using tickets.