GDAL_CREATE(1)
π GDAL_CREATE(1) π
okay bestie, welcome to gdal_create β page GDAL_CREATE(1) straight outta the GDAL manual β¨ pull up a chair, grab a boba, we're making raster files from absolutely nothing π¦
πΈ NAME πΈ
gdal_create β Create a raster file (without source dataset)
β¨ SYNOPSIS β¨
Usage: gdal_create [--help] [--long-usage] [--help-general]
[-ot Byte|Int8|[U]Int{16|32|64}|CInt{16|32}|[C]Float{32|64}]
[-of <output_format>] [-outsize <xsize> <ysize>]
[-bands <count>] [-burn <value>]... [-a_srs <srs_def>]
[-a_ullr <ulx> <uly> <lrx> <lry>] [-a_nodata <value>]
[-mo <NAME>=<VALUE>]... [-co <NAME>=<VALUE>]... [--quiet]
[-if <input_dataset>]
<out_dataset>
π DESCRIPTION π
So gdal_create is the "girl, just make a file" utility π
It initializes a brand-new raster file from scratch β you tell it the dimensions, the band count, and all the little parameters like CRS, geotransform, nodata value, metadata. No source dataset needed, it's giving immaculate conception β¨
It also handles some special-case behaviour, like creating a PDF file from an XML composition file. yes really, iconic.
TIP: Equivalent in new "gdal" command line interface: See gdal raster create.
okay now the options, strap in π
--helpβ Show this help message and exit. the classic "what do I even do" button π«Ά--help-generalβ Gives a brief usage message for the generic GDAL commandline options and exit. it's the general-vibes help, not the this-command help π-q,--quietβ Suppress progress messages and other non-error output. silence, but make it chic π-ot <type>β Force the output image bands to have a specific data type supported by the driver, which may be one of the following:Byte,Int8,UInt16,Int16,UInt32,Int32,UInt64,Int64,Float32,Float64,CInt16,CInt32,CFloat32orCFloat64. pick your fighter, no cap β¨-of <format>β Select the output format. If not specified, the format is guessed from the extension. Use the short format name. yes the short name, don't be extra π¦-outsize <xsize> <ysize>β Set the size of the output file in pixels. First value is width. Second one is height. width first, height second, that's the order, periodt π-bands <count>β Number of bands. Defaults to1if-outsizeis specified, or0otherwise. lowkey a sneaky default switch, pay attention π-burn <value>β A fixed value to burn into a band. A list of-burnoptions can be supplied, one per band (the first value will apply to the first band, the second one to the second band, etc.). If a single value is specified, it will apply to all bands. one value = everybody gets it, many values = one each, matching in order πΈ-a_srs <srs_def>β Override the projection for the output file. The<srs_def>may be any of the usual GDAL/OGR forms, complete WKT, PROJ.4,EPSG:nor a file containing the WKT. No reprojection is done. so it's a label, not a glow-up β nothing gets warped here, fr fr π-a_ullr <ulx> <uly> <lrx> <lry>β Assign the georeferenced bounds of the output file. upper-left x, upper-left y, lower-right x, lower-right y, in that exact order π«Ά-a_nodata <value>β Assign a specified nodata value to output bands. the "this pixel is not real" value π»-mo <META-TAG>=<VALUE>β Passes a metadata key and value to set on the output dataset if possible. note the "if possible", don't come for me if the driver says no π-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. 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--formatcommand 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. tldr: every driver has its own menu, check the driver docs, they're the final boss π-if <input_dataset>β Added in version 3.3. Name of GDAL input dataset that serves as a template for default values of options-outsize,-bands,-ot,-a_srs,-a_ullrand-a_nodata. Note that the pixel values will not be copied. it copies the vibe, not the pixels, iykyk π<out_dataset>β The destination file name. the name of your new baby π±
π― 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 0 = ate, non-zero = something went sideways π and yeah, warnings don't count as a fail, she still calls that a success π
π EXAMPLES π
πΈ Example 1: 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
π¦ Example 2: Create a PDF file from a XML composition file
gdal_create -co COMPOSITION_FILE=composition.xml out.pdf
β¨ Example 3: Initialize a blank GeoTIFF file from an input one
gdal_create -if prototype.tif output.tif
π AUTHOR π
Even Rouault <even.rouault@spatialys.com> β the icon, the moment, the legend π
π COPYRIGHT π
1998-2026
and that's the whole page bestie, you're officially certified π«Ά this was GDAL_CREATE(1) from the GDAL manual, version date Aug 18, 2026 β go forth and create rasters, you absolute main character ππβ¨
π¦ 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