Usage
gdal_translate(src_dataset, dst_dataset, ot, strict, of = "GTiff", b, mask,
expand, outsize, scale, unscale, srcwin, projwin, epo, eco, a_srs, a_ullr,
a_nodata, mo, co, gcp, q, sds, stats, additional_commands, sd_index,
output_Raster = FALSE, verbose = FALSE, ...)
Arguments
src_dataset
Character. The source dataset name. It
can be either file name, URL of data source or subdataset
name for multi-dataset files.
dst_dataset
Character. The destination file name.
ot
Character.
("Byte"/"Int16"/"UInt16"/"UInt32"/"Int32"/"Float32"/"Float64"/"CInt16"/"CInt32"/"CFloat32"/"CFloat64").
For the output bands to be of the indicated data type.
strict
Logical. Don't be forgiving of mismatches
and lost data when translating to the output format.
of
Character. Select the output format. The
default is GeoTIFF (GTiff). Use the short format name.
b
Numeric or Character. Select an input band band
for output. Bands are numbered from 1. Multiple bands may
be used to select a set of input bands to write to the
output file, or to reorder bands. Starting with GDAL
1.8.0, band can also be set to "m
mask
Numeric. (GDAL >= 1.8.0) Select an input band
band to create output dataset mask band. Bands are
numbered from 1. band can be set to "none" to avoid
copying the global mask of the input dataset if it
exists. Otherwise it is copied by default ("aut
expand
Character. ("gray"|"rgb"|"rgba"). (From
GDAL 1.6.0) To expose a dataset with 1 band with a color
table as a dataset with 3 (RGB) or 4 (RGBA) bands. Useful
for output drivers such as JPEG, JPEG2000, MrSID, ECW
that don't support color indexed data
outsize
Numeric. (c(xsize[ size of the output file. Outsize is in pixels and lines
unless ' of the input image size.
scale
Numeric.
(c(src_min,src_max,dst_min,dst_max)). Rescale the input
pixels values from the range src_min to src_max to the
range dst_min to dst_max. If omitted the output range is
0 to 255. If omitted the input range is automatically
computed from
unscale
Logical. Apply the scale/offset metadata
for the bands to convert scaled values to unscaled
values. It is also often necessary to reset the output
datatype with the -ot switch.
srcwin
Numeric. (c(xoff,yoff,xsize,ysize)).
Selects a subwindow from the source image for copying
based on pixel/line location.
projwin
Numeric. (c(ulx,uly,lrx,lry)). Selects a
subwindow from the source image for copying (like
-srcwin) but with the corners given in georeferenced
coordinates.
epo
Logical. (Error when Partially Outside) (GDAL
>= 1.10) If this option is set, -srcwin or -projwin
values that falls partially outside the source raster
extent will be considered as an error. The default
behaviour starting with GDAL 1.10 is to acce
eco
Logical. (Error when Completely Outside) (GDAL
>= 1.10) Same as -epo, except that the criterion for
erroring out is when the request falls completely outside
the source raster extent.
a_srs
Character. Override the projection for the
output file. The srs_def may be any of the usual GDAL/OGR
forms, complete WKT, PROJ.4, EPSG:n or a file containing
the WKT.
a_ullr
Numeric. (c(ulx,uly,lrx,lry)).
Assign/override the georeferenced bounds of the output
file. This assigns georeferenced bounds to the output
file, ignoring what would have been derived from the
source file.
a_nodata
Numeric. Assign a specified nodata value
to output bands. Starting with GDAL 1.8.0, can be set to
none to avoid setting a nodata value to the output file
if one exists for the source file
mo
Character. ("META-TAG=VALUE"). Passes a
metadata key and value to set on the output dataset if
possible.
co
Character. ("NAME=VALUE"). Passes a creation
option to the output format driver. Multiple -co options
may be listed. See format specific documentation for
legal creation options for each format.
gcp
Numeric.
(c(pixel,line,easting,northing(,elevation))). Add the
indicated ground control point to the output dataset.
This option may be provided multiple times to provide a
set of GCPs.
q
Logical. Suppress progress monitor and other
non-error output.
sds
Logical. Copy all subdatasets of this file to
individual output files. Use with formats like HDF or
OGDI that have subdatasets.
stats
Logical. (GDAL >= 1.8.0) Force
(re)computation of statistics.
additional_commands
Character. Additional commands
to pass directly to gdal_translate.
sd_index
Numeric. If the file is an HDF4 or HDF5
file, which subdataset should be returned (1 to the
number of subdatasets)? If this flag is used,
src_dataset should be the filename of the multipart
file.
output_Raster
Logical. Return output dst_dataset
as a RasterBrick?
...
Other parameters to pass to gdal_translate.