Can a raster calculator be used in QGIS?

Can a raster calculator be used in QGIS?

As gene mentions, the raster calculator can also be used to solve this in QGIS. Note there is the one that comes with QGIS as well as one (RasterCalc) or more plugins available that may have different capablities. There are several ways you could approach the problem with different formulas (such as a conditional statement or diff function).

Where do I find the raster bands in QGIS?

The Raster bands list contains all loaded raster layers that can be used. To add a raster to the raster calculator expression field, double click its name in the Fields list. You can then use the operators to construct calculation expressions, or you can just type them into the box.

When to use raster calculator for conditional calculation?

When A is 3 or 11, (A@1 = 3 + A@1 = 11) part returns 1. Otherwise it returns 0. Thanks for contributing an answer to Geographic Information Systems Stack Exchange!

How to create mask on the fly in QGIS?

In other words, for every cell greater than or equal to 0, set its value to 1. Otherwise set it to 0. This creates the mask on the fly. If you want to classify a raster – say, for instance into two elevation classes, you can use the following expression to create a raster with two values 1 and 2 in one step.

Do you need to add the difference between the two rasters?

As you said in the question, just adding them won’t work since it doesn’t account for the relative difference between top of dam and ground. You need to add the difference between the two rasters to the first raster to effectively replace the values of overlap. You can first get the difference by R3=R2-R1.

How to subtract DEM from dams in raster?

If you have the dams in a raster file with the cells that represent the dams having the elevation data and the other cells being nodata, you can subtract the dem from the dams layer in the raster calculator (R2-R1 in Chris’ answer).