Geoscience Reference
In-Depth Information
-setalpha
(from GDAL 1.8.0) Adds an alpha band if the output file is specified and the
input file has 3 bands, or sets the alpha band of the output file if it is specified and
the input file has 4 bands, or sets the alpha band of the input file if it has 4 bands
and no output file is specified. The alpha band is set to 0 in the image collar and
to 255 elsewhere.
-setmask
(from GDAL 1.8.0) Adds a mask band to the output file, or adds a mask band
to the input file if it does not already have one and no output file is specified.
The mask band is set to 0 in the image collar and to 255 elsewhere.
-q
(from GDAL 1.8.0) Suppress progress monitor and other non-error output.
infile
The input file. Any GDAL supported format, any number of bands, normally 8bit
Byte bands.
To illustrate how you can use a different value other than black (0) or white (255)
we will show an example of a multi-band image using the option -color . We will
convert all pixels in the following RGB image that have a value near to blue (0,0,255).
Pixels within a spectral distance of 10 will be converted. The larger the threshold,
the more pixel values will be converted.
nearblack -of GTiff -near 10 -color 0,0,255 noisy.tif -o
output.tif
8.6 gdaltransform
The gdaltransform utility reprojects a list of coordinates in text format,
similar to what gdalwarp does for images. The list of coordinates can be read from
standard input (keyboard). You can also reproject coordinates from a text file using
a mechanism known as piping or redirecting standard input from file (see examples
below). The definitions for the source and target reference system are similar to the
gdalwarp command with a variety of supported formats. A complete list is shown
in the options below (see also Sect. 3.1 ) . They can either be set using -s_srs and
-t_srs respectively, or implicitly interpreted by providing a source and (optionally)
destination image ( srcfile and dstfile ). In that case the list of input/output
coordinates refer to image coordinates (pixel and line).
Coordinates are read as pairs (x y) or triplets (x y z) of decimal numbers per line
from standard input (keyboard). Geographical coordinates (Lon Lat) must also be
defined in decimal form (e.g., 2
.
4152
.
31) and not in degrees, minutes and seconds
 
 
Search WWH ::




Custom Search