Edit in place various information of an existing GDAL dataset.
gdal_edit [--help-general] [-ro] [-a_srs srs_def] [-a_ullr ulx uly lrx lry] [-tr xres yres] [-unsetgt] [-a_nodata value] [-unsetnodata] [-unsetstats] [-stats] [-approx_stats] [-gcp pixel line easting northing [elevation]]* [-unsetmd] [-oo NAME=VALUE]* [-mo "META-TAG=VALUE"]* datasetname
The gdal_edit.py script can be used to edit in place various information of an existing GDAL dataset (projection, geotransform, nodata, metadata).
It works only with raster formats that support update access to existing datasets.
CAUTION: depending on the format, older values of the updated information might still be found in the file in a "ghost" state, even if no longer accessible through the GDAL API. This is for example the case of the GTiff format (this is not a exhaustive list)
Gives a brief usage message for the generic GDAL commandline options and exit.
(GDAL >= 1.11) Open the dataset in read-only. Might be useful for drivers refusing to use the dataset in update-mode. In which case, updated information will go into PAM .aux.xml files.
Defines the target coordinate system. This coordinate system will be written to the dataset. If the empty string or None is specified, then the existing coordinate system will be removed (for TIFF/GeoTIFF, might not be well supported besides that).
Assign/override the georeferenced bounds of the dataset.
Set target resolution. The values must be expressed in georeferenced units. Both must be positive values.
Remove the georeference information.
(GDAL >= 2.0) Remove band statistics information.
(GDAL >= 2.0) Calculate and store band statistics.
(GDAL >= 2.0) Calculate and store approximate band statistics.
Assign a specified nodata value to output bands.
(GDAL >= 2.1) Remove existing nodata values.
Add the indicated ground control point to the dataset. This option may be provided multiple times to provide a set of GCPs.
(GDAL >= 2.0) Remove existing metadata (in the default metadata domain). Can be combined with -mo.
Passes a metadata key and value to set on the output dataset if possible. This metadata is added to the existing metadata items, unless -unsetmd is also specified.
(GDAL >= 2.0) Open option (format specific).
-a_ullr, -tr and -unsetgt options are exclusive.
-unsetstats and either -stats or -approx_stats options are exclusive.
gdal_edit -mo DATUM=WGS84 -mo PROJ=GEODETIC -a_ullr 7 47 8 46 test.ecw