Skip to content

Commit 86ab4c8

Browse files
committed
Update gridcalculator.rst
Added a conditional example
1 parent 126c3d3 commit 86ab4c8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

python/plugins/processing/algs/saga/help/gridcalculator.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ Outputs
4848

4949
- ``Result[Raster]``: The resulting layer.
5050

51+
Example
52+
-------
53+
54+
You can for instance use the Grid Calculator module to flag 0 cells with -1:
55+
56+
ifelse(eq(g1,0), (-1), g2)
57+
58+
The formula reads like "if the cell is equal to zero, then write -1 else write the current value to the output grid".
59+
5160
See also
5261
---------
5362

0 commit comments

Comments
 (0)