Skip to content

Commit c58e5f0

Browse files
committed
Doc: gdal raster calc: add versionadded tag for --nodata and --propagate-nodata
1 parent 6c5b629 commit c58e5f0

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

doc/source/programs/gdal_raster_calc.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ The following options are available:
5858

5959
An expression to be evaluated using the `muparser <https://beltoforion.de/en/muparser>`__ math parser library.
6060
The expression may refer to individual bands of each input (e.g., ``X[1] + 3``) or it may be applied to all bands
61-
of an input (``X + 3``).
62-
61+
of an input (``X + 3``).
62+
6363
There are two methods by which an expression may be applied to multiple bands. In the default method, the expression is
64-
applied to each band individually, resulting in one output band for each input band. For example, with a three-band
64+
applied to each band individually, resulting in one output band for each input band. For example, with a three-band
6565
input ``X``, the expression ``--calc "X+3"`` would be expanded into ``--calc "X[1]+3" --calc "X[2]+3" --calc "X[3]+3"``.
66-
If the expression contains a reference to all bands of multiple inputs, those inputs must either have the same
67-
number of bands, or a single band. For example, if inputs ``A`` and ``B`` each have three bands, and input ``C`` has
68-
a single band, then the argument ``--calc "A + B + C"`` is equivalent to
66+
If the expression contains a reference to all bands of multiple inputs, those inputs must either have the same
67+
number of bands, or a single band. For example, if inputs ``A`` and ``B`` each have three bands, and input ``C`` has
68+
a single band, then the argument ``--calc "A + B + C"`` is equivalent to
6969
``--calc "A[1] + B[1] + C[1]" --calc "A[2] + B[2] + C[1]" --calc "A[3] + B[3] + C[1]"``.
70-
Similarly, ``--calc "sum(A,B,C)"`` would be expanded to
70+
Similarly, ``--calc "sum(A,B,C)"`` would be expanded to
7171
``--calc "sum(A[1], B[1], C[1]" --calc "sum(A[2], B[2], C[1])" --calc "sum(A[3], B[3], C[1])"``.
7272

7373
In the second method, which is enabled with :option:`--flatten`, aggregate functions (``sum``, ``avg``, ``min``, and ``max``)
@@ -77,7 +77,7 @@ The following options are available:
7777
a non-aggregate reference to all bands of an input, then one output band will still be produced for each input band. A simple
7878
example is the expression ``A / sum(A)``, which would produce an N-band raster where each output band contains the input band's
7979
fraction of the total.
80-
80+
8181
Multiple calculations may be specified; output band(s) will be produced for each expression in the order they
8282
are provided.
8383

@@ -124,12 +124,16 @@ The following options are available:
124124

125125
.. option:: --nodata
126126

127-
Set the NoData value for the output dataset. May be set to "none" to leave the NoData value undefined. If
127+
.. versionadded:: 3.12
128+
129+
Set the NoData value for the output dataset. May be set to "none" to leave the NoData value undefined. If
128130
:option:`--nodata` is not specified, :program:`gdal raster calc` will use a NoData value from the first
129131
source dataset to have one.
130132

131133
.. option:: --propagate-nodata
132134

135+
.. versionadded:: 3.12
136+
133137
If set, a NoData value in any input dataset used an in expression will cause the output value to be NoData.
134138

135139
.. GDALG output (on-the-fly / streamed dataset)

0 commit comments

Comments
 (0)