1gdal_edit(1)                General Commands Manual               gdal_edit(1)
2
3
4

NAME

6       gdal_editEdit in place various information of an existing GDAL dataset.
7

SYNOPSIS

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

DESCRIPTION

19       The gdal_edit.py script can be used to edit in place various
20       information of an existing GDAL dataset (projection, geotransform,
21       nodata, metadata).
22
23       It works only with raster formats that support update access to
24       existing datasets.
25
26       CAUTION: depending on the format, older values of the updated
27       information might still be found in the file in a 'ghost' state, even
28       if no longer accessible through the GDAL API. This is for example the
29       case of the GTiff format (this is not a exhaustive list)
30
31       --help-general:
32           Gives a brief usage message for the generic GDAL commandline
33           options and exit.
34
35       -ro:
36           (GDAL >= 1.11) Open the dataset in read-only. Might be useful for
37           drivers refusing to use the dataset in update-mode. In which case,
38           updated information will go into PAM .aux.xml files.
39
40       -a_srs srs_def:
41
42       Defines the target coordinate system. This coordinate system will be
43       written to the dataset. If the empty string or None is specified, then
44       the existing coordinate system will be removed (for TIFF/GeoTIFF, might
45       not be well supported besides that).
46
47       -a_ullr ulx uly lrx lry:
48           Assign/override the georeferenced bounds of the dataset.
49
50       -tr xres yres :
51           Set target resolution. The values must be expressed in
52           georeferenced units. Both must be positive values.
53
54       -unsetgt:
55           Remove the georeference information.
56
57       -unsetrpc:
58           (GDAL >= 2.4) Remove RPC information.
59
60       -unsetstats:
61           (GDAL >= 2.0) Remove band statistics information.
62
63       -stats:
64           (GDAL >= 2.0) Calculate and store band statistics.
65
66       -setstatsmin max mean stddev:
67           (GDAL >= 2.4) Store user-defined values for band statistics
68           (minimum, maximum, mean and standard deviation). If any of the
69           values is set to None, the real statistics are calclulated from the
70           file and the ones set to None are used from the real statistics.
71
72       -approx_stats:
73           (GDAL >= 2.0) Calculate and store approximate band statistics.
74
75       -a_nodata value:
76           Assign a specified nodata value to output bands.
77
78       -unsetnodata:
79           (GDAL >= 2.1) Remove existing nodata values.
80
81       -scale value:
82           (GDAL >= 2.2) Assign a specified scale value to output bands. If a
83           single scale value is provided it will be set for all bands.
84           Alternatively one scale value per band can be provided, in which
85           case the the number of scale values must match the number of bands.
86           If no scale is needed, it it recommended to set the value to 1.
87           Scale and Offset are generally used together. For example, scale
88           and offset might be used to store elevations in a unsigned 16bit
89           integer file with a precision of 0.1, and starting from -100. True
90           values would be calculated as: true_value = (pixel_value * scale) +
91           offset Note: these values can be applied using -unscale during a
92           gdal_translate run.
93
94       -offset value:
95           (GDAL >= 2.2) Assign a specified offset value to output bands. If a
96           single offset value is provided it will be set for all bands.
97           Alternatively one offset value per band can be provided, in which
98           case the the number of offset values must match the number of
99           bands. If no offset is needed, it recommended to set the value to
100           0. For more see scale.
101
102       -colorinterp_X red|green|blue|alpha|gray|undefined:
103           (GDAL >= 2.3) Change the color interpretation of band X (where X is
104           a valid band number, starting at 1)
105
106       -gcp pixel line easting northing [elevation]:
107           Add the indicated ground control point to the dataset. This option
108           may be provided multiple times to provide a set of GCPs.
109
110       -unsetmd:
111           (GDAL >= 2.0) Remove existing metadata (in the default metadata
112           domain). Can be combined with -mo.
113
114       -mo 'META-TAG=VALUE':
115           Passes a metadata key and value to set on the output dataset if
116           possible. This metadata is added to the existing metadata items,
117           unless -unsetmd is also specified.
118
119       -oo 'NAME=VALUE':
120           (GDAL >= 2.0) Open option (format specific).
121
122       -a_ullr, -tr and -unsetgt options are exclusive.
123
124       -unsetstats and either -stats or -approx_stats options are exclusive.
125

EXAMPLE

127       gdal_edit -mo DATUM=WGS84 -mo PROJ=GEODETIC -a_ullr 7 47 8 46 test.ecw
128
129       gdal_edit -scale 1e3 1e4 -offset 0 10 twoBand.tif.fi
130

AUTHORS

132       Even Rouault <even dot rouault at mines dash paris dot org>
133
134
135
136GDAL                            Tue Mar 3 2020                    gdal_edit(1)
Impressum