.TH "gdal_calc" 1 "Sun Apr 9 2017" "GDAL" \" -*- nroff -*- .ad l .nh .SH NAME gdal_calcgdal_calc\&.py \- Command line raster calculator with numpy syntax .SH "SYNOPSIS" .PP .PP .nf gdal_calc.py [-A ] [--A_band] [-B...-Z filename] [other_options] Options: -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 (default 1) --outfile=OUTF output file to generate or fill --NoDataValue=NODATAVALUE set output nodata value (Defaults to datatype specific value) --type=TYPE output 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. Multiple options may be listed. See format specific documentation for legal creation options for each format. --allBands=ALLBANDS process all bands of given raster (A-Z) --overwrite overwrite output file if it already exists --debug print debugging information .fi .PP .SH "DESCRIPTION" .PP Command line raster calculator with numpy syntax\&. Use any basic arithmetic supported by numpy arrays such as +-*\\ along with logical operators such as >\&. Note that all files must have the same dimensions, but no projection checking is performed\&. .SH "EXAMPLE" .PP add two files together .PP .nf gdal_calc.py -A input1.tif -B input2.tif --outfile=result.tif --calc="A+B" .fi .PP .PP average of two layers .PP .nf gdal_calc.py -A input.tif -B input2.tif --outfile=result.tif --calc="(A+B)/2" .fi .PP .PP set values of zero and below to null .PP .nf gdal_calc.py -A input.tif --outfile=result.tif --calc="A*(A>0)" --NoDataValue=0 .fi .PP .SH "AUTHORS" .PP Chris Yesson =''> Etienne Tourigny =''>