GDAL-RASTER-WRITE(1)

πŸ“¦ version 3.13.3, in alpine 3.24, arch rolling, ubuntu stonking

✨ GDAL-RASTER-WRITE(1) ✨

okay bestie, welcome to the GDAL manual page for gdal-raster-write πŸ’– it's part of the GDAL fam, and it's lowkey iconic.

🌸 NAME 🌸

gdal-raster-write β€” write a raster dataset (pipeline only)

no fr fr, this one was added in version 3.11, so if you're on an old build it's giving "who is she" 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. the write operation? it's for use in a gdal pipeline only. it writes a raster dataset, and it's literally the last step of a pipeline. like the finale, the last song of the setlist, the closing number πŸ’…

and here's the thing you need to remember: if you wanna write a temporary dataset in the middle of a pipeline, you do NOT use this. you use gdal raster materialize instead. two completely different girls, don't mix them up 🫢


πŸ‘‘ SYNOPSIS πŸ‘‘

* write [OPTIONS] <OUTPUT>
--------------------------

Write a raster dataset.

Positional arguments:
  -o, --output <OUTPUT>                                Output raster dataset [required]

Options:
  -f, --of, --format, --output-format <OUTPUT-FORMAT>  Output format ("GDALG" allowed)
  --co, --creation-option <KEY>=<VALUE>                Creation option [may be repeated]
  --overwrite                                          Whether overwriting existing output dataset is allowed
                                                       Mutually exclusive with --append
  --append                                             Append as a subdataset to existing output
                                                       Mutually exclusive with --overwrite

that's the whole vibe check right there, no cap ✨


πŸŽ€ STANDARD OPTIONS πŸŽ€

  • -f, --of, --format, --output-format <OUTPUT-FORMAT> β€” which output raster format are we doing today? the allowed values can be pulled up with:
gdal --formats | grep raster | grep rw | sort

it's giving "let the tool tell you the options" and honestly slay 🌈

  • --co, --creation-option <NAME>=<VALUE> β€” many formats have one or more optional creation options, and they control the little particulars about the file being created. like, for example, the GeoTIFF driver supports creation options that control compression, and whether the file should be tiled. cute right?
    • this one may be repeated. repeat it as many times as you need, she's flexible πŸ’…
    • heads up tho: the creation options available vary by format driver, and some simple formats have, like, actually zero creation options. not everyone can serve.
    • you can list the options supported for a format with the --formats command line option, but β€” and this is important bestie β€” 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 πŸ“š don't be out here guessing.
  • --overwrite β€” allow the program to overwrite an existing target file or dataset. otherwise, by default, gdal errors out if the target file or dataset already exists 😭 so if you're re-running stuff, you want this flag. it's the "yes i know she's already there, i want her gone" option.
note: --overwrite is mutually exclusive with --append. pick a lane, queen πŸ‘‘
  • --append β€” append input raster as a new subdataset to an existing output file. only works with drivers that support adding subdatasets, such as GTiff (GeoTIFF File Format) and GPKG (GeoPackage raster). and plot twist: this one also creates the output dataset if it does not exist yet πŸ¦‹ so it's giving versatile.
note: --append is mutually exclusive with --overwrite. literally cannot do both. periodt. also GTiff and GPKG are the ones named here β€” other drivers gotta support subdatasets too for this to work. no guessing at behaviour, that's just what the page says 😌

πŸ’– EXAMPLES πŸ’–

Example 1: Write a GeoTIFF file

$ gdal raster pipeline ... [other commands here] ... ! write out.tif --overwrite

see how the ! is the handoff and write is the closer? that's the whole pipeline finale energy right there πŸ”₯ note the --overwrite because yes, we're being decisive today.


🧚 AUTHOR 🧚

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


1998-2026


okay that's the whole page bestie, you're so ready πŸ’œ go write some rasters, you're gonna eat, no cap πŸ“

GDAL β€” GDAL-RASTER-WRITE(1) β€” Aug 18, 2026 🌈✨ bye babe, ily, hydrate and back up your data πŸ’…πŸ«Ά

πŸ“¦ where this page comes from