GDAL-RASTER-WRITE(1)
β¨ 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
--formatscommand 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,gdalerrors 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:--overwriteis 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 asGTiff(GeoTIFF File Format) andGPKG(GeoPackage raster). and plot twist: this one also creates the output dataset if it does not exist yet π¦ so it's giving versatile.
note:--appendis 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 π
β COPYRIGHT β
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
- 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