[Gdal-dev] problems with average

Frank Warmerdam warmerdam at pobox.com
Mon Mar 19 12:11:55 EDT 2007

Thekla Wirkus wrote:
> Hi,
> I have problems with creating a multipage-TIF with:
> gdaladdo -r average bild_8bit.tif 2 4 8 16
> the result-TIF has mistakes at page 2-5, page 1 is OK. The hatches are 
> normally single colors but after using gdaladdo -r average ...
> they are shown with multicolors and they are blurred.
> See the result at:
> http://wms1.ccgis.de/mapbender_dev/tmp/ergebnis_bild_8bit.tif


Average downsampling is inappropriate for discontinuous images.  That
is images where nearby pixel values are not necessarily nearby colors.
Your image has a colormap (and not just a continuous color ramp) and so
fall into this category.

You should use the default nearest neighbour downsampling instead of
using "-r average".

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

More information about the Gdal-dev mailing list