If you have a look at the extents of the layers that we have multiplied (you can do it double–clicking on their names of the layer in the table of contents and looking at their properties), you will see that they are not the same, since the extent covered by the flow accumulation layer is smaller that the extent of the full DEM. There are other interesting things about this algorithm that we have just run, apart from the no–data values and how they are handled. If it is instead computed using only values corresponding to a basin (as in he case above), the result that we obtain is a meaningful one that actually gives information about the configuration of the basin. For instance, an elevation histogram of a raster layer doesn’t have much meaning. This technique is used frequently to mask values in a raster layer, and is useful whenever you want to perform calculations for a region other that the arbitrary rectangular region that is used by raster layer. Then we multiply by the DEM, to get the elevation value in those cells inside the basin ( DEM * 1 = DEM) and the no–data value outside ( DEM * no_data = no_data) What we are doing in the first part of the formula here is to divide the accumulated flow layer by itself, which will result in a value of 1 inside the basin, and a no–data value outside. Enter the following formula in the corresponding field:Ī refers to the accumulated flow layer (since it is the first one to appear in the list) and b refers to the DEM. Open the calculator dialog and select both layers of the project in the input layers field. If you select the Identify tool to know the value of a layer at a given point, select the layer that we have just created, and click on a point outside of the basin, you will see that it contains a no–data value.įor the next exercise we are going to use two layers instead of one, and we are going to get a DEM with valid elevation values only within the basin defined in the second layer. Open the algorithm dialog again, select the accflow layer as the only input layer, and enter the following formula: log(a). We can calculate that using the raster calculator. Using the logarithm of that flow accumulation will yield a much more informative representation. As you can see, the rendering is not very informative, due to the way values are distributed. It contains those values only within the area of a given watershed, with no–data values outside of it. This layer contains values of accumulated flow, a hydrological parameter. Let’s now perform another calculation, this time on the accflow layer. The input layer that we used has valid values in all its cells, so the last parameter has no effect at all. You will get a layer that has the same appearance of the input layer, but with different values. Now open the toolbox and open the dialog corresponding to the raster calculator.įor non English users: use always “.”, not “,”.Ĭlick Run to run the algorithm. Open the QGIS project corresponding to this lesson and you will see that it contains several raster layers. Understanding that is important to later get the expected results when using the calculator, and also to understand certain techniques that are commonly applied with it. This will let us see how it is used and how it deals with some particular situations that it might find. In this lesson we will be performing some calculation with the raster calculator, most of them rather simple. It’s a very flexible and versatile algorithm that can be used for many different calculations, and one that will soon become an important part of your toolbox. The raster calculator is one of the most powerful algorithms that you will find. ![]() We will also explain what are no–data values and how the calculator and other algorithms deal with them In this lesson we will see how to use the raster calculator to perform some operations on raster layers. Using modeler-only tools for creating a model ![]() ![]() Module: Spatial Database Concepts with PostGIS Module: Database Concepts with PostgreSQL Module: Creating and Exploring a Basic Map QGIS Desktop User Guide/Manual (QGIS 3.28).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |