1GDAL_CREATE(1)                       GDAL                       GDAL_CREATE(1)
2
3
4

NAME

6       gdal_create - Create a raster file (without source dataset)
7

SYNOPSIS

9          gdal_create [--help-general]
10             [-of format]
11             [-outsize xsize ysize]
12             [-bands count]
13             [-burn value]*
14             [-ot {Byte/Int16/UInt16/UInt32/Int32/UInt64/Int64/Float32/Float64/
15                   CInt16/CInt32/CFloat32/CFloat64}] [-strict]
16             [-a_srs srs_def] [-a_ullr ulx uly lrx lry] [-a_nodata value]
17             [-mo "META-TAG=VALUE"]* [-q]
18             [-co "NAME=VALUE"]*
19             [-if input_dataset]
20             out_dataset
21

DESCRIPTION

23       The  gdal_create  utility  can be used to initialize a new raster file,
24       from its dimensions, band count and set  various  parameters,  such  as
25       CRS,  geotransform, nodata value, metadata. It can be used also in spe‐
26       cial cases, like creating a PDF file from a XML composition file.
27
28       -ot <type>
29              Force the output image bands to have a specific data  type  sup‐
30              ported  by  the driver, which may be one of the following: Byte,
31              UInt16, Int16, UInt32, Int32, Float32, Float64, CInt16,  CInt32,
32              CFloat32 or CFloat64.
33
34       -of <format>
35              Select  the output format. Starting with GDAL 2.3, if not speci‐
36              fied, the format is guessed from the extension  (previously  was
37              GTiff). Use the short format name.
38
39       -outsize <xsize> <ysize>
40              Set  the  size  of  the  output  file in pixels. First figure is
41              width. Second one is height.
42
43       -bands <count>
44              Number of bands. Defaults to 1 if -outsize is  specified,  or  0
45              otherwise.
46
47       -burn <value>
48              A  fixed  value  to burn into a band for all objects.  A list of
49              -burn options can be supplied, one per band being written to.
50
51       -a_srs <srs_def>
52              Override the projection for the output file.   The<srs_def>  may
53              be any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n
54              or a file containing the WKT. No reprojection is done.
55
56       -a_ullr <ulx> <uly> <lrx> <lry>
57              Assign the georeferenced bounds of the output file.
58
59       -a_nodata <value>
60              Assign a specified nodata value to output bands.
61
62       -mo META-TAG=VALUE
63              Passes a metadata key and value to set on the output dataset  if
64              possible.
65
66       -co <NAME=VALUE>
67              Many formats have one or more optional creation options that can
68              be used to control particulars about the file created.  For  in‐
69              stance,  the GeoTIFF driver supports creation options to control
70              compression, and whether the file should be tiled.
71
72              The creation options available vary by format driver,  and  some
73              simple  formats  have  no creation options at all. A list of op‐
74              tions supported for a format can be listed  with  the  --formats
75              command  line option but the documentation for the format is the
76              definitive source of information  on  driver  creation  options.
77              See  Raster drivers format specific documentation for legal cre‐
78              ation options for each format.
79
80       -q     Suppress progress monitor and other non-error output.
81
82       -if <input_dataset>
83              New in version 3.3.
84
85
86              Name of GDAL input dataset that serves as a template for default
87              values  of  options  -outsize,  -bands, -ot, -a_srs, -a_ullr and
88              -a_nodata.  Note that the pixel values will not be copied.
89
90       <out_dataset>
91              The destination file name.
92

EXAMPLES

94       • Initialize a new GeoTIFF file with a uniform value of 10
95
96                gdal_create -outsize 20 20 -a_srs EPSG:4326 -a_ullr 2 50 3 49 -burn 10 out.tif
97
98       • Create a PDF file from a XML composition file:
99
100                gdal_create -co COMPOSITION_FILE=composition.xml out.pdf
101
102       • Initialize a blank GeoTIFF file from an input one:
103
104                gdal_create -if prototype.tif output.tif
105

AUTHOR

107       Even Rouault <even.rouault@spatialys.com>
108
110       1998-2022
111
112
113
114
115                                 Sep 02, 2022                   GDAL_CREATE(1)
Impressum