
QGIS 2 Cookbook
By :

The raster calculator is one of the most flexible and versatile tools in QGIS. This allows you to perform algebraic operations based on raster layers, and compute new layers. This recipe shows you how to use it.
Open the catchment_area.tif
file. The file should look like the following screenshot:
Open the Processing Toolbox option and find the algorithm called Raster calculator by searching for it using the search box. Double-click on the algorithm item to execute it, as shown in the following screenshot:
Click on the button in the Input layers field to open the layer selector. There is only one layer available: the catchment_area
layer. Select this layer.
In the Formula field, enter ln(a)
.
Click on Run to run the algorithm. The resulting layer will be added to the QGIS project, as follows:
The layers selected in the layer selector are referred to using a single letter in alphabetical order (a
for the first one, b
for the second...
Change the font size
Change margin width
Change background colour