1GDALADDO(1) GDAL GDALADDO(1)
2
3
4
6 gdaladdo - Builds or rebuilds overview images.
7
9 gdaladdo [-r {nearest,average,gauss,cubic,cubicspline,lanczos,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 algo‐
16 rithms.
17
18 -r {nearest (default),average,gauss,cubic,cubicspline,lanczos,aver‐
19 age_magphase,mode}
20 Select a resampling algorithm.
21
22 nearest applies a nearest neighbour (simple sampling) resampler
23
24 average computes the average of all non-NODATA contributing pix‐
25 els.
26
27 gauss applies a Gaussian kernel before computing the overview,
28 which can lead to better results than simple averaging in e.g
29 case of sharp edges with high contrast or noisy patterns. The
30 advised level values should be 2, 4, 8, ... so that a 3x3
31 resampling Gaussian kernel is selected.
32
33 cubic applies a cubic convolution kernel.
34
35 cubicspline applies a B-Spline convolution kernel.
36
37 lanczos applies a Lanczos windowed sinc convolution kernel.
38
39 average_magphase averages complex data in mag/phase space.
40
41 mode selects the value which appears most often of all the sam‐
42 pled points.
43
44 -b <band>
45 Select an input band band for overview generation. Band number‐
46 ing starts from 1. Multiple -b switches may be used to select a
47 set of input bands to generate overviews.
48
49 -ro open the dataset in read-only mode, in order to generate exter‐
50 nal overview (for GeoTIFF especially).
51
52 -clean remove all overviews.
53
54 -oo NAME=VALUE
55 Dataset open option (format specific)
56
57 -minsize <val>
58 Maximum width or height of the smallest overview level. Only
59 taken into account if explicit levels are not specified.
60 Defaults to 256.
61
62 New in version 2.3.
63
64
65 <filename>
66 The file to build overviews for (or whose overviews must be
67 removed).
68
69 <levels>
70 A list of integral overview levels to build. Ignored with -clean
71 option.
72
73 New in version 2.3: levels are no longer required to build over‐
74 views. In which case, appropriate overview power-of-two factors
75 will be selected until the smallest overview is smaller than the
76 value of the -minsize switch.
77
78
79 gdaladdo will honour properly NODATA_VALUES tuples (special dataset
80 metadata) so that only a given RGB triplet (in case of a RGB image)
81 will be considered as the nodata value and not each value of the
82 triplet independently per band.
83
84 Selecting a level value like 2 causes an overview level that is 1/2 the
85 resolution (in each dimension) of the base layer to be computed. If
86 the file has existing overview levels at a level selected, those levels
87 will be recomputed and rewritten in place.
88
89 For internal GeoTIFF overviews (or external overviews in GeoTIFF for‐
90 mat), note that -clean does not shrink the file. A later run of gdal‐
91 addo with overview levels will cause the file to be expanded, rather
92 than reusing the space of the previously deleted overviews. If you just
93 want to change the resampling method on a file that already has over‐
94 views computed, you don't need to clean the existing overviews.
95
96 Some format drivers do not support overviews at all. Many format driv‐
97 ers store overviews in a secondary file with the extension .ovr that is
98 actually in TIFF format. By default, the GeoTIFF driver stores over‐
99 views internally to the file operated on (if it is writable), unless
100 the -ro flag is specified.
101
102 Most drivers also support an alternate overview format using Erdas
103 Imagine format. To trigger this use the USE_RRD =YES configuration
104 option. This will place the overviews in an associated .aux file suit‐
105 able for direct use with Imagine or ArcGIS as well as GDAL applica‐
106 tions. (e.g. --config USE_RRD YES)
107
109 External overviews created in TIFF format may be compressed using the
110 COMPRESS_OVERVIEW configuration option. All compression methods, sup‐
111 ported by the GeoTIFF driver, are available here. (e.g. --config COM‐
112 PRESS_OVERVIEW DEFLATE). The photometric interpretation can be set
113 with the PHOTOMETRIC_OVERVIEW =RGB/YCBCR/... configuration option, and
114 the interleaving with the INTERLEAVE_OVERVIEW =PIXEL/BAND configuration
115 option.
116
117 For JPEG compressed external overviews, the JPEG quality can be set
118 with "--config JPEG_QUALITY_OVERVIEW value"
119
120 For LZW or DEFLATE compressed external overviews, the predictor value
121 can be set with "--config PREDICTOR_OVERVIEW 1|2|3"
122
123 To produce the smallest possible JPEG-In-TIFF overviews, you should use
124 :
125
126 --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL
127
128 External overviews can be created in the BigTIFF format by using the
129 BIGTIFF_OVERVIEW configuration option : --config BIGTIFF_OVERVIEW
130 {IF_NEEDED|IF_SAFER|YES|NO}. The default value is IF_SAFER starting
131 with GDAL 2.3.0 (previously was IF_NEEDED). The behaviour of this
132 option is exactly the same as the BIGTIFF creation option documented in
133 the GeoTIFF driver documentation.
134
135 · YES forces BigTIFF.
136
137 · NO forces classic TIFF.
138
139 · IF_NEEDED will only create a BigTIFF if it is clearly needed (uncom‐
140 pressed, and overviews larger than 4GB).
141
142 · IF_SAFER will create BigTIFF if the resulting file might exceed 4GB.
143
144 See the documentation of the raster.gtiff driver for further explana‐
145 tions on all those options.
146
148 Functionality of this utility can be done from C with GDALBuil‐
149 dOverviews().
150
152 Create overviews, embedded in the supplied TIFF file, with automatic
153 computation of levels (GDAL 2.3 or later)
154
155 gdaladdo -r average abc.tif
156
157 Create overviews, embedded in the supplied TIFF file:
158
159 gdaladdo -r average abc.tif 2 4 8 16
160
161 Create an external compressed GeoTIFF overview file from the ERDAS .IMG
162 file:
163
164 gdaladdo -ro --config COMPRESS_OVERVIEW DEFLATE erdas.img 2 4 8 16
165
166 Create an external JPEG-compressed GeoTIFF overview file from a 3-band
167 RGB dataset (if the dataset is a writable GeoTIFF, you also need to add
168 the -ro option to force the generation of external overview):
169
170 gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR
171 --config INTERLEAVE_OVERVIEW PIXEL rgb_dataset.ext 2 4 8 16
172
173 Create an Erdas Imagine format overviews for the indicated JPEG file:
174
175 gdaladdo --config USE_RRD YES airphoto.jpg 3 9 27 81
176
177 Create overviews for a specific subdataset, like for example one of
178 potentially many raster layers in a GeoPackage (the "filename" parame‐
179 ter must be driver prefix, filename and subdataset name, like e.g.
180 shown by gdalinfo):
181
182 gdaladdo GPKG:file.gpkg:layer
183
185 Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer <silke@inteva‐
186 tion.de>
187
189 1998-2021
190
191
192
193
194 Jan 05, 2021 GDALADDO(1)