1gdaladdo(1) General Commands Manual gdaladdo(1)
2
3
4
6 gdaladdoBuilds or rebuilds overview images.
7
9 gdaladdo [-r {nearest,average,gauss,cubic,cubicspline,lanczos,average_mp,average_magphase,mode}]
10 [-b band]* [-minsize val]
11 [-ro] [-clean] [-oo NAME=VALUE]* [--help-general] filename [levels]
12
14 The gdaladdo utility can be used to build or rebuild overview images
15 for most supported file formats with one of several downsampling
16 algorithms.
17
18 -r {nearest
19 (default),average,gauss,cubic,cubicspline,lanczos,average_mp,average_magphase,mode}:
20 Select a resampling algorithm.
21
22 -b band:
23 (available from GDAL 1.10) Select an input band band for overview
24 generation. Band numbering starts from 1. Multiple -b switches may
25 be used to select a set of input bands to generate overviews.
26
27 -ro:
28 (available from GDAL 1.6.0) open the dataset in read-only mode, in
29 order to generate external overview (for GeoTIFF especially).
30
31 -clean:
32 (available from GDAL 1.7.0) remove all overviews.
33
34 -oo NAME=VALUE:
35 (starting with GDAL 2.0) Dataset open option (format specific)
36
37 -minsize val:
38 (starting with GDAL 2.3) Maximum width or height of the smallest
39 overview level. Only taken into account if explicit levels are not
40 specified. Defaults to 256.
41
42 filename:
43 The file to build overviews for (or whose overviews must be
44 removed).
45
46 levels:
47 A list of integral overview levels to build. Ignored with -clean
48 option. Starting with GDAL 2.3, levels are no longer required to
49 build overviews. In which case, appropriate overview power-of-two
50 factors will be selected until the smallest overview is smaller
51 than the value of the -minsize switch.
52
53 Mode (available from GDAL 1.6.0) selects the value which appears most
54 often of all the sampled points. average_mp is unsuitable for use.
55 Average_magphase averages complex data in mag/phase space. Nearest and
56 average are applicable to normal image data. Nearest applies a nearest
57 neighbour (simple sampling) resampler, while average computes the
58 average of all non-NODATA contributing pixels. Cubic resampling
59 (available from GDAL 1.7.0) applies a cubic convolution kernel. Gauss
60 resampling (available from GDAL 1.6.0) applies a Gaussian kernel before
61 computing the overview, which can lead to better results than simple
62 averaging in e.g case of sharp edges with high contrast or noisy
63 patterns. The advised level values should be 2, 4, 8, ... so that a 3x3
64 resampling Gaussian kernel is selected. CubicSpline resampling
65 (available from GDAL 2.0) applies a B-Spline convolution kernel.
66 Lanczos resampling (available from GDAL 2.0) applies a Lanczos windowed
67 sinc convolution kernel.
68
69 gdaladdo will honour properly NODATA_VALUES tuples (special dataset
70 metadata) so that only a given RGB triplet (in case of a RGB image)
71 will be considered as the nodata value and not each value of the
72 triplet independently per band.
73
74 Selecting a level value like 2 causes an overview level that is 1/2 the
75 resolution (in each dimension) of the base layer to be computed. If the
76 file has existing overview levels at a level selected, those levels
77 will be recomputed and rewritten in place.
78
79 For internal GeoTIFF overviews (or external overviews in GeoTIFF
80 format), note that -clean does not shrink the file. A later run of
81 gdaladdo with overview levels will cause the file to be expanded,
82 rather than reusing the space of the previously deleted overviews. If
83 you just want to change the resampling method on a file that already
84 has overviews computed, you don't need to clean the existing overviews.
85
86 Some format drivers do not support overviews at all. Many format
87 drivers store overviews in a secondary file with the extension .ovr
88 that is actually in TIFF format. By default, the GeoTIFF driver stores
89 overviews internally to the file operated on (if it is writable),
90 unless the -ro flag is specified.
91
92 Most drivers also support an alternate overview format using Erdas
93 Imagine format. To trigger this use the USE_RRD=YES configuration
94 option. This will place the overviews in an associated .aux file
95 suitable for direct use with Imagine or ArcGIS as well as GDAL
96 applications. (e.g. --config USE_RRD YES)
97
99 External overviews created in TIFF format may be compressed using the
100 COMPRESS_OVERVIEW configuration option. All compression methods,
101 supported by the GeoTIFF driver, are available here. (e.g. --config
102 COMPRESS_OVERVIEW DEFLATE). The photometric interpretation can be set
103 with --config PHOTOMETRIC_OVERVIEW {RGB,YCBCR,...}, and the
104 interleaving with --config INTERLEAVE_OVERVIEW {PIXEL|BAND}.
105
106 For JPEG compressed external overviews, the JPEG quality can be set
107 with '--config JPEG_QUALITY_OVERVIEW value' (GDAL 1.7.0 or later).
108
109 For LZW or DEFLATE compressed external overviews, the predictor value
110 can be set with '--config PREDICTOR_OVERVIEW 1|2|3' (GDAL 1.8.0 or
111 later).
112
113 To produce the smallest possible JPEG-In-TIFF overviews, you should use
114 :
115
116 --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL
117
118
119 External overviews can be created in the BigTIFF format by using the
120 BIGTIFF_OVERVIEW configuration option : --config BIGTIFF_OVERVIEW
121 {IF_NEEDED|IF_SAFER|YES|NO}. The default value is IF_SAFER starting
122 with GDAL 2.3.0 (previously was IF_NEEDED). The behaviour of this
123 option is exactly the same as the BIGTIFF creation option documented in
124 the GeoTIFF driver documentation.
125
126 · YES forces BigTIFF.
127 · NO forces classic TIFF.
128 · IF_NEEDED will only create a BigTIFF if it is clearly needed
129 (uncompressed, and overviews larger than 4GB).
130 · IF_SAFER will create BigTIFF if the resulting file might exceed 4GB.
131 See the documentation of the GeoTIFF driver for further explanations on
132 all those options.
134 Functionality of this utility can be done from C with
135 GDALBuildOverviews().
137 Create overviews, embedded in the supplied TIFF file, with automatic
138 computation of levels (GDAL 2.3 or later)
139 gdaladdo -r average abc.tif
140 Create overviews, embedded in the supplied TIFF file:
141 gdaladdo -r average abc.tif 2 4 8 16
142 Create an external compressed GeoTIFF overview file from the ERDAS .IMG
143 file:
144 gdaladdo -ro --config COMPRESS_OVERVIEW DEFLATE erdas.img 2 4 8 16
145 Create an external JPEG-compressed GeoTIFF overview file from a 3-band
146 RGB dataset (if the dataset is a writable GeoTIFF, you also need to add
147 the -ro option to force the generation of external overview):
148 gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR
149 --config INTERLEAVE_OVERVIEW PIXEL rgb_dataset.ext 2 4 8 16
150 Create an Erdas Imagine format overviews for the indicated JPEG file:
151 gdaladdo --config USE_RRD YES airphoto.jpg 3 9 27 81
153 Frank Warmerdam warmerdam@pobox.com, Silke Reimer silke@intevation.de
154
155
156
157GDAL Thu Jul 25 2019 gdaladdo(1)