GDAL_CREATE(1)

πŸ“¦
version 3.4.3 Β· 2 versions
, in epel 9

πŸ’– GDAL_CREATE(1) πŸ’–

okay so bestie, real talk: this is a GDAL manual page, and it's about gdal_create β€” the tool that makes a brand-new raster file out of thin air (no source dataset needed, we're literally manifesting it ✨).


🌸 NAME 🌸

gdal_create β€” create a raster file (without source dataset). yes, from scratch. no input needed. main character energy fr fr πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

gdal_create [--help-general]
   [-of format]
   [-outsize xsize ysize]
   [-bands count]
   [-burn value]*
   [-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
         CInt16/CInt32/CFloat32/CFloat64}] [-strict]
   [-a_srs srs_def] [-a_ullr ulx uly lrx lry] [-a_nodata value]
   [-mo "META-TAG=VALUE"]* [-q]
   [-co "NAME=VALUE"]*
   [-if input_dataset]
   out_dataset

✨ DESCRIPTION ✨

so the gdal_create utility can be used to initialize a new raster file from its dimensions, its band count, and to set various parameters β€” think CRS, geotransform, nodata value, metadata. it's giving "build a raster from vibes and flags" πŸŽ€

it also has a special-case era: it can be used in cases like creating a PDF file from an XML composition file. iconic, honestly 🧚


πŸ’œ THE OPTIONS πŸ’œ

-ot <type>

forces the output image bands to have a specific data type that the driver supports. the options are, and I quote, one of the following: Byte, UInt16, Int16, UInt32, Int32, Float32, Float64, CInt16, CInt32, CFloat32 or CFloat64. pick your fighter ⭐

-of <format>

selects the output format. starting with GDAL 2.3, if you don't specify it, the format gets guessed from the extension (before that? it was GTiff, fyi). use the short format name, okay bestie 🫢

-outsize <xsize> <ysize>

sets the size of the output file in pixels. first figure is width, second one is height. width then height. don't mix them up 😭

-bands <count>

number of bands. defaults to 1 if -outsize is specified, or 0 otherwise. yes, zero. that's a real default, ngl πŸ’€

-burn <value>

a fixed value to burn into a band for all objects. you can supply a list of -burn options β€” one per band being written to πŸ”₯

-a_srs <srs_def>

overrides the projection for the output file. the <srs_def> may be any of the usual GDAL/OGR forms: complete WKT, PROJ.4, EPSG:n, or a file containing the WKT. and no, no reprojection is done β€” it's just assigning, not transforming, so don't come for me πŸ™ˆ

-a_ullr <ulx> <uly> <lrx> <lry>

assigns the georeferenced bounds of the output file. upper-left x, upper-left y, lower-right x, lower-right y β€” that's the whole squad πŸ’…

-a_nodata <value>

assigns a specified nodata value to the output bands πŸ“

-mo META-TAG=VALUE

passes a metadata key and value to set on the output dataset, if possible. keyword: if possible, bestie πŸŽ€

-co <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. obsessed with a driver that lets you choose 😌

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 πŸ“š

-q

suppresses progress monitor and other non-error output. quiet mode. silent. mysterious. πŸ¦‹

-if <input_dataset>

new in version 3.3 ⭐

name of a GDAL input dataset that serves as a template for default values of the options -outsize, -bands, -ot, -a_srs, -a_ullr and -a_nodata. but heads up β€” the pixel values will not be copied. it's a template, not a copy-paste situation, iykyk πŸ’€

<out_dataset>

the destination file name. the whole point. the moment. the main character 🫢


🌈 EXAMPLES 🌈

  • initialize a new GeoTIFF file with a uniform value of 10:
gdal_create -outsize 20 20 -a_srs EPSG:4326 -a_ullr 2 50 3 49 -burn 10 out.tif
  • create a PDF file from a XML composition file:
gdal_create -co COMPOSITION_FILE=composition.xml out.pdf
  • initialize a blank GeoTIFF file from an input one:
gdal_create -if prototype.tif output.tif

πŸ‘‘ AUTHOR πŸ‘‘

Even Rouault <even.rouault@spatialys.com> β€” legend behavior, honestly πŸ’œ

1998-2026


okay that's the whole page, you ate that πŸ’…βœ¨ and for the cute sign-off: this whole thing comes to you from GDAL, dated Jan 08, 2026 β€” go forth and create some rasters, bestie, you got this 🫢🌸

πŸ“¦ where this page comes from