Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
GDAL_CREATE(1)			      GDAL			  GDAL_CREATE(1)

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
     The  gdal_create  utility can be used to initialize a new raster file, from
     its dimensions, band count and set various parameters, such as  CRS,  geot-
     ransform,	nodata	value,	metadata.  It can be used also in special cases,
     like creating a PDF file from a XML composition file.

     TIP:
	Equivalent in new "gdal" command line interface:

	See gdal raster create.

     --help
	    Show this help message and exit

     --help-general
	    Gives a brief usage message for the generic GDAL commandline options
	    and exit.

     -q, --quiet
	    Suppress progress messages and other non-error output.

     -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, CFloat32 or CFloat64.

     -of <format>
	    Select  the  output  format. If not specified, the format is guessed
	    from the extension. Use the short format name.

     -outsize <xsize> <ysize>
	    Set the size of the output file in pixels.	First  value  is  width.
	    Second one is height.

     -bands <count>
	    Number of bands. Defaults to 1 if -outsize is specified, or 0 other-
	    wise.

     -burn <value>
	    A  fixed  value  to burn into a band. A list of -burn options 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.

     -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:n  or  a
	    file containing the WKT. No reprojection is done.

     -a_ullr <ulx> <uly> <lrx> <lry>
	    Assign the georeferenced bounds of the output file.

     -a_nodata <value>
	    Assign a specified nodata value to output bands.

     -mo <META-TAG>=<VALUE>
	    Passes a metadata key and value to set on the output dataset if pos-
	    sible.

     -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 sim-
	    ple formats have no creation options at all. A list of options  sup-
	    ported for a format can be listed with the --format command line op-
	    tion  but  the documentation for the format is the definitive source
	    of information on driver creation options.	See Raster drivers  for-
	    mat  specific documentation for legal creation options for each for-
	    mat.

     -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_ullr and -a_no-
	    data.  Note that the pixel values will not be copied.

     <out_dataset>
	    The destination file name.

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 suc-
     cessful execution).

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>

COPYRIGHT
     1998-2026

				  Jun 05, 2026			  GDAL_CREATE(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=gdal_create&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help