Geoscience Reference
In-Depth Information
to change the SimpleSource tags to KernelFilteredSource and add the Kernel. To
implement a simple 3
×
3 average (smoothing) filter, just replace all kernel coefficients
to 0
111. Some image viewers such as openev and Quantum GIS can open the VRT
file to view the results directly. To convert the filtered virtual raster to a real raster,
you can use the gdal_translate utility.
.
11.4 gdal_calc.py
The Python script gdal_calc.py allows you to perform raster calculations from
the command line. The raster arguments must have the same spatial dimension in
order to perform the pixel by pixel operations. Both arithmetic (
+ , , ,/
) and log-
ical operations (
) are supported. Logical operations can be combined using
logical_or and logical_and statements. You should take care of selecting
the appropriate output data type to hold the result using the option --type . Existing
output files can only be overwritten if the option --overwrite is set.
<, = ,>
Usage: gdal_calc.py [-A <filename>] [--A_band] [-B...-Z
filename] [other_options] --calc
-h|--help
Show this help message and exit.
--calc=CALC
Calculation in gdalnumeric syntax using
+−
/* or any numpy array functions
(i.e. logical_and()).
-A A
Input gdal raster file, note you can use any letter A-Z.
--A_band=A_BAND
Number of raster band for file A.
--outfile=OUTF
Output file to generate or fill.
--NoDataValue=NODATAVALUE
Set output nodatavalue (Defaults to datatype specific values).
--type=TYPE
Set datatype must be one of ['Int32', 'Int16', 'Float64', 'UInt16', 'Byte',
'UInt32', 'Float32'].
--format=FORMAT
GDAL format for output file (default 'GTiff').
--creation-option=CREATION_OPTIONS|--co=CREATION_OPTIONS
Passes a creation option to the output format driver. Multipleoptions may be listed.
See format specific documentation for legalcreation options for each format.
--overwrite
Overwrite output file if it already exists.
 
 
Search WWH ::




Custom Search