GDAL-RASTER-UPDATE(1)

πŸ“¦
version 3.13.3 Β· 4 versions
, in alpine 3.24, arch rolling, ubuntu stonking

πŸ¦‹ GDAL-RASTER-UPDATE β€” bestie's guide to updating a raster with another raster πŸ¦‹

okay so this little cutie lives in the GDAL manual (that's GDAL-RASTER-UPDATE(1) iykyk) and she's brand new β€” added in version 3.12 ✨


✨ NAME ✨

gdal-raster-update β€” update the destination raster with the content of the input one πŸ’…

fr fr, she was Added in version 3.12, so she's the new girl and she's already serving.

πŸŽ€ SYNOPSIS πŸŽ€

Usage: gdal raster update [OPTIONS] <INPUT> <OUTPUT>

Update the destination raster with the content of the input one.

Positional arguments:
  -i, --input <INPUT>                        Input raster datasets [required] [not available in pipelines]
  -o, --output <OUTPUT>                      Output raster dataset [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:
  --geometry <GEOMETRY>                      Clipping geometry (WKT or GeoJSON)
  --geometry-crs <GEOMETRY-CRS>              CRS of clipping geometry
  -r, --resampling <RESAMPLING>              Resampling method. RESAMPLING=nearest|bilinear|cubic|cubicspline|lanczos|average|rms|mode|min|max|med|q1|q3|sum (default: nearest)
  --no-update-overviews                      Do not update existing overviews

Advanced Options:
  --if, --input-format <INPUT-FORMAT>        Input formats [may be repeated] [not available in pipelines]
  --oo, --open-option <KEY>=<VALUE>          Open options [may be repeated] [not available in pipelines]
  --wo, --warp-option <NAME>=<VALUE>         Warping option(s) [may be repeated]
  --to, --transform-option <NAME>=<VALUE>    Transform option(s) [may be repeated]
  --et, --error-threshold <ERROR-THRESHOLD>  Error threshold

πŸ’– DESCRIPTION πŸ’–

so like. gdal raster update is the girl who looks at your existing output raster and goes "bestie, let me pour the pixel values of the input raster into you" πŸ«—βœ¨ and if the input and output datasets don't share the same coordinate reference systems, she'll reproject on the way in. no biggie. the way that she stays in her lane though?? iconic β€” the extent, size, resolution or coordinate reference system of the output dataset are not modified by this operation. periodt. not touched. πŸ’…

also she updates the overviews for you (using gdal raster overview refresh β€” she doesn't do it herself, she delegates like a true main character πŸ‘‘), unless you pass --no-update-overviews. then she minds her business.

and!! starting with GDAL 3.13, gdal raster update can be used as a step of a pipeline, with the input dataset being the output of the previous step 🧚 that's the upgrade arc, we love to see it.


🌸 PROGRAM-SPECIFIC OPTIONS 🌸

  • --et, --error-threshold <ERROR-THRESHOLD> β€” error threshold for transformation approximation, expressed as a number of input pixels. defaults to 0.125 pixels unless the RPC_DEM transformer option is specified, in which case an exact transformer, i.e. --error-threshold=0, will be used. so like, specify RPC_DEM and she goes full precision mode 😀✨
  • --geometry <WKT_or_GeoJSON> β€” geometry as a WKT or GeoJSON string of a polygon (or multipolygon) to which to restrict the update πŸ”’ so she only does her thing inside that shape, okay??
    • if the input geometry is GeoJSON, its CRS is assumed to be WGS84, unless there is a CRS defined in the GeoJSON geometry or --geometry-crs is specified.
    • if the input geometry is WKT, its CRS is assumed to be the one of the input dataset, unless --geometry-crs is specified.
    • the X and Y axis are the "GIS friendly ones", that is X is longitude or easting, and Y is latitude or northing. no chaos, x is x bestie πŸ—ΊοΈ
  • --geometry-crs <CRS> β€” CRS in which the coordinate values of --geometry are expressed. if not specified, it is assumed to be the CRS of the input dataset. the geometry will be reprojected from the geometry-crs <arrow>β†’</arrow> to the CRS of the dataset being updated. she travels πŸ’«
  • --no-update-overviews β€” do not update existing overviews. that's it. that's the whole vibe. πŸ™ˆ
  • --to, --transform-option <NAME>=<VALUE> β€” set a transformer option suitable to pass to GDALCreateGenImgProjTransformer2(). see GDALCreateRPCTransformerV2() for RPC specific options πŸ‘€
  • -r, --resampling <RESAMPLING> β€” resampling method to use. available methods are:
    • nearest: nearest neighbour resampling (default, fastest algorithm, worst interpolation quality).
    • bilinear: bilinear resampling.
    • cubic: cubic resampling.
    • cubicspline: cubic spline resampling.
    • lanczos: Lanczos windowed sinc resampling 🌊
    • average: average resampling, computes the weighted average of all non-NODATA contributing pixels.
    • rms: root mean square / quadratic mean of all non-NODATA contributing pixels.
    • mode: mode resampling, selects the value which appears most often of all the sampled points. in the case of ties, the first value identified as the mode will be selected.
    • max: maximum resampling, selects the maximum value from all non-NODATA contributing pixels.
    • min: minimum resampling, selects the minimum value from all non-NODATA contributing pixels.
    • med: median resampling, selects the median value of all non-NODATA contributing pixels.
    • q1: first quartile resampling, selects the first quartile value of all non-NODATA contributing pixels.
    • q3: third quartile resampling, selects the third quartile value of all non-NODATA contributing pixels.
    • sum: compute the weighted sum of all non-NODATA contributing pixels.
  • --wo, --warp-option <NAME>=<VALUE> β€” set a warp option. the GDALWarpOptions::papszWarpOptions docs show all options. multiple options may be listed. go read the docs bestie, they're right there πŸ“š

πŸŽ€ PROGRAM-SPECIFIC OPTIONS πŸŽ€

(yes bestie, there are two of these sections in the original β€” she's extra, we respect it πŸ’…)

  • --if, --input-format <format> β€” format/driver name to be attempted to open the input file(s). it is generally not necessary to specify it, but it can be used to skip automatic driver detection, when it fails to select the appropriate driver. this option can be repeated several times to specify several candidate drivers. note that it does not force those drivers to open the dataset. in particular, some drivers have requirements on file extensions πŸ‘€ (so like, don't be shocked if your driver doesn't take the bait.)

May be repeated.

  • --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 β€” but listen, (non-blocking errors emitted as warnings are considered as a successful execution) so don't spiral if you see a lil warning, she's still thriving 🫢


🌈 EXAMPLES 🌈

Example 1: Update existing out.tif with content of in.tif using cubic interpolation

$ gdal raster update -r cubic in.tif out.tif

that's it. cubic. in. out. slay ✨


πŸ‘‘ AUTHOR πŸ‘‘

Even Rouault <even.rouault@spatialys.com> β€” the legend, the icon, the moment 🫑


1998-2026


okay and one tiny lil sign-off bestie: this whole page is from the GDAL manual, the page is GDAL-RASTER-UPDATE(1), and the date on the tin is Aug 18, 2026 πŸ—“οΈπŸ’– now go update that raster, you got this πŸ¦‹πŸŽ€βœ¨
πŸ“¦ where this page comes from