 Hello, welcome back on my YouTube channel. In this video I'm going to show how to calculate a stream power index using PCRuster tools in QGIS. I'll also show you how to calculate the sediment transport index. The stream power index, or SPI, is a geomorphological metric used to quantify the erosive power of water flow in landscapes. It's a measure indicating the potential for water to erode, transport and deposit sediments. It can be used to help predicting erosion and deposition patterns in a landscape, which is useful for understanding and managing a variety of natural hazards and land use issues. The stream power index can be calculated by using the natural logarithm of the specific catchment area times the tangent of the slope in radiance. The sediment transport index is a measure used in geomorphology to quantify the potential for erosion and deposition in a landscape. The sediment transport index is a function of the specific catchment area of a pixel and its slope. This index is used instead of the one-dimensional slope length factor as in the universal soil loss equation. My values of STI indicate areas of the landscape where overland flow is a high potential for doing geomorphic work, such as erosion and transport. Conversely, low STI values indicate areas where the potential for geomorphic work is low. Note that in literature you probably find different equations for these indices and also you can note that often the exponents used in the equations can be different. I have a digital elevation model here and the first thing I need to do is to convert this DEM to the PCRuster format because we're going to use PCRuster tools and output data type is scalar and I save it to a file on my hard disk called DEM.map. In this video I assume that you have installed PCRuster and the PCRuster tools plugin and you can see other videos on how to do this. Later in the process I need the pixel size and I can find the pixel size of the DEM in the later properties and here you see that the pixel size is 5, which means 5 meters. Note that the positive value of the pixel size is for the x dimension and the negative one by convention for the y dimension. The next step is to calculate the flow direction and I'll use the LDDcreate tool from the PCRuster tools. I keep all the defaults and I save the result as flowdirection.map. This can take a while depending on the size of your raster and here's the result. With the flow direction roster I can now use the aquiflux tool to calculate the flow accumulation but it also needs another input which is the material layer. This is a raster with the materials that need to be accumulated and in this case I just use value 1 as to be scalar so I count the amount of pixels that are contributing from upstream to the pixel under consideration. I save this as material and run the algorithm. This results as expected in a raster where every pixel has now value 1. I'll use this material raster as an input in the aquiflux tool. For LDD layer I choose the flow direction. For material layer I choose material and save the result as flowaccumulation.map. We run it and here is the result and we need to style it a bit to see what is calculated. Flow accumulation has very extreme values so let's first choose a ramp and use veridis but we invert it so the more blue the bigger the streams the more cells accumulate and if I switch to cumulative count I see here the drainage pattern. So the value of the cells mean how many upstream cells drain to that cell. The next step is to calculate the slope and you can find it under derivatives of digital elevation models. Use the DEM as an input and save the result as slope fraction because the slope tool from PC raster calculates the slope as a fraction. Here's the result. We can style it using single-bamp pseudo color because it's continuous data and we can stretch the colors a bit in the current map canvas. We convert the slope fractions to degrees and we need to use the atom function, the arc tangent or inverse tangent. So the input is the slope fraction and then the output is slope degrees. Run it and there is the result. So now we have all the inputs to calculate the stream power index. We can calculate the stream power index using the raster calculator. Create the following equation, use the natural logarithm, double click on flow accumulation, click the times button and add here the pixel size which is 5x5 meters. So we multiply the pixel size with the flow accumulation so we know the total upstream area or the specific catchment area of the pixel. Then we multiply this with the tangent of the slope in degrees which we need to convert to slope in radians and we do that by dividing pi by 180 which is 0.01745329 etc. We need some brackets to close the equation. Then we define the output name. Make sure you have diff as the extension because you cannot write a PC raster format and click OK and there's the result. Now we can style the result using the layer styling panel, choose single and single color. You see that the value range can be negative for the flatter areas and we can set that to 0. Now you can see in the legend that the more green or yellow it gets the more power the stream has for erosion. Now we can go back to the raster calculator to calculate the sediment transport index. Start with the bracket. Then similar as with the stream power index you need to multiply the flow accumulation by the pixel area. It's 5 by 5 meters to get the specific catchment area of each pixel. And we divide that by 22.13. Let's put this whole term in brackets because we need to raise it to the power of 0.6. As said in the beginning of this video you can see different parameters in literature. Here we just use 0.6 and this whole term will then be multiplied by the sinus with the slope in degrees divided by 0.0896. We raise that term to the power of 1.3. 1.3 was mentioned in the beginning of this video but 1.4 was what I found in literature. So different parameters can be used and it's a relative index so it probably depends on your area which gives the best result. So save the result also to a TIFF file. It doesn't work with the PC Raster output. And here is the result and let's style the result. Single and pseudo color and here you see it. There's also a huge range of values. We can play with the min max settings and cap the max to maybe 20 to see more contrast. So here high values of STI indicate areas of the landscape where overland flow is a high potential for erosion and transport. Now if these were many steps for you I also made them available as tools through the resource sharing plugin. Install the QGIS resource sharing plugin. Use the green icon that was added. Go to settings and click add repository. Call it PC Raster and add the URL to the PC Raster GitHub repository for in the resource sharing tools. Then go to all collections and install QGIS PC Raster user script collection and it will add 13 processing tools. You find them under scripts and there you see sediment transport index and stream power index. Let's test it. I have a DEM here in PC Raster format and I choose an output layer. Make sure to change the extension to PC Raster dot map because we're using PC Raster functions only and click run and there's the result which we can style and here it is with the inverted color ramp. So in yellow more the deposition and in blue more the erosion. Now I do the sediment transport index. Call it STI dot map and run it. Note that here we can set the M and the N parameter of the equation the exponents and here's the result. It has a lot of no data values. We previously also had that but the layers below obscured it a bit. We can see it and we can cap the max as we did before so we don't only see the extreme values there and then when we zoom in we can see the sediment transport index. I hope this video was useful. Please subscribe to my youtube channel if you want to receive updates. See you next time.