GDAL-RASTER-CONVERT(1)

πŸ’– NAME πŸ’–

gdal-raster-convert β€” convert a raster dataset

This one's a little baby, bestie: it was Added in version 3.11. 🍼✨

Oh and btw, you're in the GDAL manual section 1, iykyk 🫢


✨ SYNOPSIS ✨

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

Convert a raster dataset.

Positional arguments:
  -i, --input <INPUT>                                  Input raster datasets [required] [not available in pipelines]
  -o, --output <OUTPUT>                                Output raster dataset [required] [not available in pipelines]

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

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]

🌈 DESCRIPTION 🌈

gdal raster convert is literally your git for raster data πŸ¦‹ β€” it can be used to convert raster data between different formats. That's the whole vibe. Format in, format out, main character energy.


πŸŽ€ STANDARD OPTIONS πŸŽ€

  • --append β€” Takes your input raster and appends it as a new subdataset to an existing output file 🫢. Lowkey only works with drivers that support adding subdatasets, like GTiff -- GeoTIFF File Format and GPKG -- GeoPackage raster. Oh and bonus: this also creates the output dataset if it does not exist yet. Iconic. ✨
  • --co, --creation-option <NAME>=<VALUE> β€” So many formats have one or more optional creation options that control particulars about the file created πŸ’…. For instance, the GeoTIFF driver supports creation options to control compression, and whether the file should be tiled. Very demure, very mindful.

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. No cap, go read the docs πŸ“š.

  • --if, --input-format <format> β€” The format/driver name to be attempted to open the input file(s). Ngl it's 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. Heads up tho: it does not force those drivers to open the dataset. In particular, some drivers have requirements on file extensions. She's just a suggestion, not a demand πŸ’….

May be repeated. πŸ”

  • --oo, --open-option <NAME>=<VALUE> β€” Dataset open option (format specific). Very much a per-format situation πŸ¦‹.

May be repeated. πŸ”

  • -f, --of, --format, --output-format <OUTPUT-FORMAT> β€” Which output raster format to use πŸ‘‘. Allowed values may be given by gdal --formats | grep raster | grep rw | sort.
  • --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 😀.
  • -q, --quiet β€” Suppress progress bar and some warning messages. Silence is golden ✨.

πŸ’€ 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 if it screams but it's just warning energy, that's still a slay πŸ’….


🌸 EXAMPLES 🌸

Example 1: Converting file utm.tif to a cloud-optimized GeoTIFF using JPEG compression

$ gdal raster convert --format=COG --co COMPRESS=JPEG utm.tif utm_cog.tif

Look at her go πŸ₯Ή COG + JPEG compression and she ATE.

Example 2: Converting file utm.tif to GeoPackage raster

$ gdal raster convert utm.tif utm.gpkg

No flags, no notes, just vibes πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Even Rouault <even.rouault@spatialys.com>

1998-2026


ok that's the whole page bestie, you're so welcome 🫢 this was GDAL (the GDAL-RASTER-CONVERT(1) one, obviously), dated Aug 18, 2026 β€” go convert something cute πŸ’…βœ¨

πŸ“¦ where this page comes from