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