gdaladdo(1)

NAME
gdaladdo - gdaladdo builds or rebuilds overview images

SYNOPSIS

gdaladdo [-r {nearest,average,gauss,average_mp,average_magphase,mode}]
         [-ro] [--help-general] filename levels

DESCRIPTION

The gdaladdo utility can be used to build or rebuild overview images for most supported file formats with one over several downsampling algorithms.

-r {nearest,average,gauss,average_mp,average_magphase,mode}:
    Select a resampling algorithm.

-ro:
    (available from GDAL 1.6.0) open the dataset in read-only mode, in order to generate external overview (for GeoTIFF especially).

filename:
    The file to build overviews for.

levels:
    A list of integral overview levels to build.

Mode (available from GDAL 1.6.0) selects the value which appears most often of all the sampled points. average_mp is unsuitable for use. Average_magphase averages complex data in mag/phase space. Nearest and average are applicable to normal image data. Nearest applies a nearest neighbour (simple sampling) resampler, while average computes the average of all non-NODATA contributing pixels. Gauss resampling (available from GDAL 1.6.0) applies a Gaussian kernel before computing the overview, which can lead to better results than simple averaging in e.g case of sharp edges with high contrast or noisy patterns. The advised level values should be 2, 4, 8, ... so that a 3x3 resampling Gaussian kernel is selected.

Selecting a level value like 2 causes an overview level that is 1/2 the resolution (in each dimension) of the base layer to be computed. If the file has existing overview levels at a level selected, those levels will be recomputed and rewritten in place.

Some format drivers do not support overviews at all. Many format drivers store overviews in a secondary file with the extension .ovr that is actually in TIFF format. The GeoTIFF driver stores overviews internally to the file operated on, unless the -ro flag is specified.

External overviews created in TIFF format may be compressed using the COMPRESS_OVERVIEW configuration option. All compression methods, supported by the GeoTIFF driver, available here. (eg --config COMPRESS_OVERVIEW DEFLATE). The photometric interpretation can be set with --config PHOTOMETRIC_OVERVIEW {RGB,YCBCR,...}, and the interleaving with --config INTERLEAVE_OVERVIEW {PIXEL|BAND}.

To produce the smallest possible JPEG-In-TIFF overviews, you should use :

--config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL

Most drivers also support an alternate overview format using Erdas Imagine format. To trigger this use the USE_RRD=YES configuration option. This will place the overviews in an associated .aux file suitable for direct use with Imagine or ArcGIS as well as GDAL applications. (eg --config USE_RRD YES)

EXAMPLE

Create overviews, embedded in the supplied TIFF file:

gdaladdo -r average abc.tif 2 4 8 16

Create an external compressed GeoTIFF overview file from the ERDAS .IMG file:

gdaladdo --config COMPRESS_OVERVIEW DEFLATE erdas.img 2 4 8 16

Create an external JPEG-compressed GeoTIFF overview file from a 3-band RGB dataset:

gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR
         --config INTERLEAVE_OVERVIEW PIXEL rgb_dataset.ext 2 4 8 16

Create an Erdas Imagine format overviews for the indicated JPEG file:

gdaladdo --config USE_RRD YES airphoto.jpg 3 9 27 81

AUTHORS

Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer <silke@intevation.de>