1GDAL_EDIT(1)                         GDAL                         GDAL_EDIT(1)
2
3
4

NAME

6       gdal_edit  -  Edit  in  place  various  information of an existing GDAL
7       dataset.
8

SYNOPSIS

10          gdal_edit [--help-general] [-ro] [-a_srs srs_def]
11                  [-a_ullr ulx uly lrx lry] [-a_ulurll ulx uly urx ury llx lly]
12                  [-tr xres yres] [-unsetgt] [-unsetrpc] [-a_nodata value] [-unsetnodata]
13                  [-unsetstats] [-stats] [-approx_stats]
14                  [-setstats min max mean stddev]
15                  [-scale value] [-offset value] [-units value]
16                  [-colorinterp_X red|green|blue|alpha|gray|undefined]*
17                  [-gcp pixel line easting northing [elevation]]*
18                  [-unsetmd] [-oo NAME=VALUE]* [-mo "META-TAG=VALUE"]*  datasetname
19

DESCRIPTION

21       The gdal_edit.py script can be used to edit in place  various  informa‐
22       tion  of  an  existing  GDAL dataset (projection, geotransform, nodata,
23       metadata).
24
25       It works only with raster formats that support update access to  exist‐
26       ing datasets.
27
28       CAUTION:
29          Depending  on  the  format,  older values of the updated information
30          might still be found in the file in a  "ghost"  state,  even  if  no
31          longer accessible through the GDAL API. This is for example the case
32          of the raster.gtiff format (this is not a exhaustive list).
33
34       --help-general
35              Gives a brief usage message for  the  generic  GDAL  commandline
36              options and exit.
37
38       -ro    Open  the  dataset  in  read-only.  Might  be useful for drivers
39              refusing to use the  dataset  in  update-mode.  In  which  case,
40              updated information will go into PAM .aux.xml files.
41
42              New in version 1.11.
43
44
45       -a_srs <srs_def>
46              Defines  the  target  coordinate system.  This coordinate system
47              will be written to the dataset.  If the empty string or None  is
48              specified,  then  the existing coordinate system will be removed
49              (for TIFF/GeoTIFF, might not be well supported besides that).
50
51       -a_ullr ulx uly lrx lry:
52              Assign/override the georeferenced bounds of the dataset.
53
54       -a_ulurll ulx uly urx ury llx lly:
55              Assign/override the georeferenced bounds  of  the  dataset  from
56              three  points:  upper-left,  upper-right  and lower-left. Unlike
57              -a_ullr, this also supports rotated datasets (edges not parallel
58              to coordinate system axes).
59
60              New in version 3.1.
61
62
63       -tr <xres> <yres>
64              Set target resolution. The values must be expressed in georefer‐
65              enced units.  Both must be positive values.
66
67       -unsetgt
68              Remove the georeference information.
69
70       -unsetrpc
71              Remove RPC information.
72
73              New in version 2.4.
74
75
76       -unsetstats
77              Remove band statistics information.
78
79              New in version 2.0.
80
81
82       -stats Calculate and store band statistics.
83
84              New in version 2.0.
85
86
87       -setstatsmin max mean stddev
88              Store user-defined values for band statistics (minimum, maximum,
89              mean  and  standard  deviation).  If any of the values is set to
90              None, the real statistics are calclulated from the file and  the
91              ones set to None are used from the real statistics.
92
93              New in version 2.4.
94
95
96       -approx_stats
97              Calculate and store approximate band statistics.
98
99              New in version 2.0.
100
101
102       -a_nodata <value>
103              Assign a specified nodata value to output bands.
104
105       -unsetnodata
106              Remove existing nodata values.
107
108              New in version 2.1.
109
110
111       -scale <value>
112              Assign  a  specified  scale  value to output bands.  If a single
113              scale value is provided it will be set for all bands.   Alterna‐
114              tively  one  scale value per band can be provided, in which case
115              the number of scale values must match the number of  bands.   If
116              no  scale  is  needed,  it it recommended to set the value to 1.
117              Scale and Offset are generally used together. For example, scale
118              and offset might be used to store elevations in a unsigned 16bit
119              integer file with a precision of 0.1, and  starting  from  -100.
120              True  values would be calculated as: true_value = (pixel_value *
121              scale) + offset
122
123              NOTE:
124                 These  values  can  be  applied  using  -unscale   during   a
125                 gdal_translate run.
126
127              New in version 2.2.
128
129
130       -offset <value>
131              Assign  a  specified  offset value to output bands.  If a single
132              offset value is provided it will be set for all bands.  Alterna‐
133              tively  one offset value per band can be provided, in which case
134              the number of offset values must match the number of bands.   If
135              no  offset is needed, it recommended to set the value to 0.  For
136              more see scale.
137
138              New in version 2.2.
139
140
141       -units <value>
142              Assign a unit to output band(s).
143
144              New in version 3.1.
145
146
147       colorinterp_X red|green|blue|alpha|gray|undefined
148              Change the color interpretation of band X (where X  is  a  valid
149              band number, starting at 1).
150
151              New in version 2.3.
152
153
154       -gcp pixel line easting northing [elevation]
155              Add  the  indicated  ground  control point to the dataset.  This
156              option may be provided multiple times to provide a set of GCPs.
157
158       -unsetmd
159              Remove existing metadata (in the default metadata domain).   Can
160              be combined with -mo.
161
162              New in version 2.0.
163
164
165       -mo META-TAG=VALUE
166              Passes  a metadata key and value to set on the output dataset if
167              possible.  This metadata  is  added  to  the  existing  metadata
168              items, unless -unsetmd is also specified.
169
170       -oo NAME=VALUE
171              Open option (format specific).
172
173              New in version 2.0.
174
175
176       The -a_ullr, -a_ulurll, -tr and -unsetgt options are exclusive.
177
178       The  -unsetstats  and either -stats or -approx_stats options are exclu‐
179       sive.
180

EXAMPLE

182          gdal_edit -mo DATUM=WGS84 -mo PROJ=GEODETIC -a_ullr 7 47 8 46 test.ecw
183
184          gdal_edit -scale 1e3 1e4 -offset 0 10 twoBand.tif
185

AUTHOR

187       Even Rouault <even.rouault@spatialys.com>
188
190       1998-2021
191
192
193
194
195                                 Jan 05, 2021                     GDAL_EDIT(1)
Impressum