1gdal_translate(1) General Commands Manual gdal_translate(1)
2
3
4
6 gdal_translate - gdal_translate converts raster data between different
7 formats
8
10 gdal_translate [--help-general]
11 [-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
12 CInt16/CInt32/CFloat32/CFloat64}] [-not_strict]
13 [-of format] [-b band] [-outsize xsize[%] ysize[%]]
14 [-scale [src_min src_max [dst_min dst_max]]]
15 [-srcwin xoff yoff xsize ysize] [-projwin ulx uly lrx lry]
16 [-a_srs srs_def] [-a_ullr ulx uly lrx lry] [-a_nodata value]
17 [-gcp pixel line easting northing]*
18 [-mo "META-TAG=VALUE"]* [-quiet] [-sds]
19 [-co "NAME=VALUE"]*
20 src_dataset dst_dataset
21
23 The gdal_translate utility can be used to convert raster data between
24 different formats, potentially performing some operations like
25 subsettings, resampling, and rescaling pixels in the process.
26
27 -ot: type
28 For the output bands to be of the indicated data type.
29
30 -not_strict:
31 Be forgiving of mismatches and lost data when translating to the
32 output format.
33
34 -of format:
35 Select the output format. The default is GeoTIFF (GTiff). Use the
36 short format name.
37
38 -b band:
39 Select an input band band for output. Bands are numbered from 1
40 Multiple -b switches may be used to select a set of input bands to
41 write to the output file, or to reorder bands.
42
43 -outsize xsize[%] ysize[%]:
44 Set the size of the output file. Outsize is in pixels and lines
45 unless '' is attached in which case it is as a fraction of the
46 input image size.
47
48 -scale [src_min src_max [dst_min dst_max]]:
49 Rescale the input pixels values from the range src_min to src_max
50 to the range dst_min to dst_max. If omitted the output range is 0
51 to 255. If omitted the input range is automatically computed from
52 the source data.
53
54 -srcwin xoff yoff xsize ysize:
55 Selects a subwindow from the source image for copying based on
56 pixel/line location.
57
58 -projwin ulx uly lrx lry:
59 Selects a subwindow from the source image for copying (like
60 -srcwin) but with the corners given in georeferenced coordinates.
61
62 -a_srs srs_def:
63 Override the projection for the output file. The srs_def may be any
64 of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file
65 containing the WKT.
66
67 -a_ullr ulx uly lrx lry:
68 Assign/override the georeferenced bounds of the output file. This
69 assigns georeferenced bounds to the output file, ignoring what
70 would have been derived from the source file.
71
72 -a_nodata value:
73 Assign a specified nodata value to output bands.
74
75 -mo 'META-TAG=VALUE':
76 Passes a metadata key and value to set on the output dataset if
77 possible.
78
79 -co 'NAME=VALUE':
80 Passes a creation option to the output format driver. Multiple -co
81 options may be listed. See format specific documentation for legal
82 creation options for each format.
83
84 -gcp pixel line easting northing:
85 Add the indicated ground control point to the output dataset. This
86 option may be provided multiple times to provide a set of GCPs.
87
88 -quiet:
89 Suppress progress monitor and other non-error output.
90
91 -sds:
92 Copy all subdatasets of this file to individual output files. Use
93 with formats like HDF or OGDI that have subdatasets.
94
95 src_dataset:
96 The source file name.
97
98 dst_dataset:
99 The destination file name.
100
102 gdal_translate -of GTiff -co "TILED=YES" utm.tif utm_tiled.tif
103
105 Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer
106 <silke@intevation.de>
107
108
109
110GDAL 31 Jul 2007 gdal_translate(1)