.\" Man page generated from reStructuredText. . .TH "GDAL_CALC" "1" "Mar 05, 2021" "" "GDAL" .SH NAME gdal_calc \- Command line raster calculator with numpy syntax. . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gdal_calc.py \-\-calc=expression \-\-outfile=out_filename [\-A filename] [\-\-A_band=n] [\-B...\-Z filename] [other_options] .ft P .fi .UNINDENT .UNINDENT .sp DESCRIPTION .sp Command line raster calculator with numpy syntax. Use any basic arithmetic supported by numpy arrays such as \fB+\fP, \fB\-\fP, \fB*\fP, and \fB\e\fP along with logical operators such as \fB>\fP\&. Note that all files must have the same dimensions, but no projection checking is performed. .INDENT 0.0 .TP .B \-\-help Show this help message and exit .UNINDENT .INDENT 0.0 .TP .B \-h The same as \fI\%\-\-help\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-calc=expression Calculation in gdalnumeric syntax using \fB+\fP, \fB\-\fP, \fB/\fP, \fB*\fP, or any numpy array functions (i.e. \fBlog10()\fP). Multiple \fB\-\-calc\fP options can be listed to produce a multiband file (GDAL >= 3.2). .UNINDENT .INDENT 0.0 .TP .B \-A Input gdal raster file, you can use any letter (A\-Z). .UNINDENT .INDENT 0.0 .TP .B \-\-A_band= Number of raster band for file A (default 1). .UNINDENT .INDENT 0.0 .TP .B \-\-outfile= Output file to generate or fill. .UNINDENT .INDENT 0.0 .TP .B \-\-NoDataValue= Output nodata value (default datatype specific value). .UNINDENT .INDENT 0.0 .TP .B \-\-type= Output datatype, must be one of [\fBInt32\fP, \fBInt16\fP, \fBFloat64\fP, \fBUInt16\fP, \fBByte\fP, \fBUInt32\fP, \fBFloat32\fP]. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 Despite the datatype set using \fB\-\-type\fP, when doing intermediate aritmethic operations using operands of the same type, the operation result will honor the original datatype. This may lead into unexpected results in the final result. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-format= GDAL format for output file. .UNINDENT .INDENT 0.0 .TP .B \-\-creation\-option=