GDAL-RASTER-OVERVIEW-ADD(1)
β¨ GDAL-RASTER-OVERVIEW-ADD β¨
okay bestie, gather round, because this is the gdal-raster-overview-add(1) page from the GDAL manual and we are about to make overviews look cute π
π NAME π
gdal-raster-overview-add β Add overviews to a raster dataset.
Added in version 3.11. β¨
πΈ SYNOPSIS πΈ
Usage: gdal raster overview add [OPTIONS] <INPUT>
Adding overviews.
Positional arguments:
-i, --dataset, --input <INPUT> Dataset (to be updated in-place, unless --external) [required]
Common Options:
-h, --help Display help message and exit
--json-usage Display usage as JSON document and exit
--config <KEY>=<VALUE> Configuration option [may be repeated]
-q, --quiet Quiet mode (no progress bar or warning message) [not available in pipelines]
Options:
--overview-src <OVERVIEW-SRC> Source overview dataset [may be repeated]
Mutually exclusive with --levels
--external Add external overviews
-r, --resampling <RESAMPLING> Resampling method. RESAMPLING=nearest|average|cubic|cubicspline|lanczos|bilinear|gauss|average_magphase|rms|mode
--levels <LEVELS> Levels / decimation factors [may be repeated]
Mutually exclusive with --overview-src
--min-size <MIN-SIZE> Maximum width or height of the smallest overview level.
--co, --creation-option <KEY>=<VALUE> Overview creation option [may be repeated]
Advanced Options:
--oo, --open-option <KEY>=<VALUE> Open options [may be repeated]
π DESCRIPTION π
gdal raster overview add is the tool you call when you want to build or rebuild overview images for basically most supported file formats, using one of several downsampling algorithms. it's giving main character energy, fr fr.
Starting with GDAL 3.12, gdal raster overview add can also be used as a step of a pipeline π«Ά. when you do that, virtual overviews get generated at the output of the step, and they can potentially be materialized in the final write step β specifically when writing a GeoTIFF file with the COPY_SRC_OVERVIEWS creation option, or when writing to a COG (Cloud Optimized GeoTIFF) file. no cap. π¦
π PROGRAM-SPECIFIC OPTIONS π
--co<NAME>=<VALUE>β Overview creation options. May be repeated. Added in version 3.12.
so like, many formats have one or more optional creation options that you can use to control particulars about the created overviews π. the options available can be obtained by looking at the OverviewCreationOptionList returned by gdal --format <FORMAT-NAME>.
most formats will support external overviews in a GeoTIFF file in a side-car file of extension .ovr πΈ. you can consult the overview creation options for GeoTIFF.
--dataset<DATASET>β Dataset name. by default it gets updated in-place (unless--externalis specified). Required for standalone execution, and it's implicit when run as a pipeline step β¨--externalβ Create external.ovroverviews as GeoTIFF files π. Not available when run as a pipeline step. periodt.--levels<level1,level2,...>β A list of overview levels to build. each overview level must be an integer value greater or equal to2. bestie, read that twice.
When explicit levels are not specified:
- If there are already existing overviews, the corresponding levels will be used to refresh them if no explicit levels are specified.
- Otherwise, appropriate overview power-of-two factors will be selected until the smallest overview is smaller than the value of the
--min-sizeswitch.
Mutually exclusive with --overview-src.
--min-size<val>β Maximum width or height of the smallest overview level. it's only taken into account if explicit levels are not specified. Defaults to256. π--overview-src<INPUT>β Add specified input raster datasets as overviews of the target dataset. Added in version 3.12.
Source overviews may come from any GDAL supported format, provided they have the same number of bands and geospatial extent than the target dataset π
That mode is currently only implemented when the target dataset is in GeoTIFF format, or when using --external.
Mutually exclusive with --levels.
-r,--resampling{nearest|average|cubic|cubicspline|lanczos|bilinear|gauss|average_magphase|rms|mode}β Select a resampling algorithm. The default isnearest, which is generally not appropriate if sub-pixel accuracy is desired π
When refreshing existing TIFF overviews, the previously used method β as noted in the RESAMPLING metadata item of the overview β will be used if -r is not specified.
The available methods are:
nearestapplies a nearest neighbour (simple sampling) resampler.averagecomputes the average of all non-NODATA contributing pixels. This is a weighted average taking into account properly the weight of source pixels not contributing fully to the target pixel.bilinearapplies a bilinear convolution kernel.cubicapplies a cubic convolution kernel.cubicsplineapplies a B-Spline convolution kernel.lanczosapplies a Lanczos windowed sinc convolution kernel.gaussapplies 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 be2, 4, 8, ...so that a 3x3 resampling Gaussian kernel is selected.average_magphaseaverages complex data in mag/phase space.rmscomputes the root mean squared / quadratic mean of all non-NODATA contributing pixels.modeselects the value which appears most often of all the sampled points.
π STANDARD OPTIONS π
--co,--creation-option<NAME>=<VALUE>β Many formats have one or more optional creation options that can be used to control particulars about the file created π«. For instance, the GeoTIFF driver supports creation options to control compression, and whether the file should be tiled.
May be repeated.
The creation options available vary by format driver, and some simple formats have no creation options at all π. A list of options supported for a format can be listed with the --formats command line option but the documentation for the format is the definitive source of information on driver creation options. See Raster drivers format specific documentation for legal creation options for each format.
--oo,--open-option<NAME>=<VALUE>β Dataset open option (format specific).
May be repeated.
β RETURN STATUS CODE β
The program returns status code 0 in case of success, and non-zero in case of error π (non-blocking errors emitted as warnings are considered as a successful execution, so don't panic, bestie π«Ά).
π EXAMPLES π
Example 1: Create overviews, embedded in the supplied TIFF file, with automatic computation of levels
gdal raster overview add -r average abc.tif
Example 2: Create overviews, embedded in the supplied TIFF file
gdal raster overview add -r average --levels=2,4,8,16 abc.tif
Example 3: Create an external compressed GeoTIFF overview file from the ERDAS .IMG file
gdal raster overview add --external --levels=2,4,8,16 --co COMPRESS=YES erdas.img
Example 4: Create an external JPEG-compressed GeoTIFF overview file from a 3-band RGB dataset
If the dataset is a writable GeoTIFF, you also need to add the --external option to force the generation of external overview π
gdal raster overview add --co OVERVIEW=JPEG --co PHOTOMETRIC=YCBCR \
--co INTERLEAVE=PIXEL rgb_dataset.ext 2 4 8 16
Example 5: Create overviews for a specific subdataset
For example, one of potentially many raster layers in a GeoPackage (the "filename" parameter must be driver prefix, filename and subdataset name, like e.g. shown by gdalinfo) π
gdal raster overview add GPKG:file.gpkg:layer
Example 6: Add 3 existing datasets at scale 1:25K, 1:50K and 1:100K as overviews of my.tif.
gdal raster overview add --overview-src ovr_25k.tif --overview-src ovr_50k.tif --overview-src ovr_100k.tif --dataset my.tif
Example 7: Create a COG file with non power-of-two overview levels.
gdal pipeline read input.tif ! reproject --output-crs=EPSG:4326 ! add overview --levels 16,64,128 ! write output.tif --format=COG
π AUTHOR π
Even Rouault <even.rouault@spatialys.com> β iconic, we stan π«Ά
πΈ COPYRIGHT πΈ
1998-2026
okay that's the whole thing, you ate that π
sending you good vibes and perfect overviews, bestie π¦ this was the GDAL GDAL-RASTER-OVERVIEW-ADD(1) page, dated Aug 18, 2026, mwah π
π¦ where this page comes from
- alpine 3.24: gdal-doc 3.13.3-r0 Β· MIT
- arch rolling: gdal 3.13.3-6 Β· MIT
- ubuntu stonking: gdal-bin 3.13.3+dfsg-1ubuntu4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms