 Hello, this is Hans van der Kras senior lecturer at IHE Delft Institute for Water Education. In this video I'm going to demonstrate how to calculate the volume of depressions in your DEM. So this is a DEM and we're going to focus on this open pit lignite mine and I'm going to clip the DEM because I'm only interested to do the analysis on this specific mine. So I clip the raster by its extent, so I choose here use canvas extent, I can add an out of range no data value and then I clip it and I call the output mine DEM and then I run it. There's the clipped DEM. For visualization purposes I copy the style, blending is also copied so I remove the one below and I would like to see the contour lines just for visualization. I know it's quite a deep mine so I put it on equidistance of 50 meters and then I save it to contours 50 and run it. There they are, I need some styling to make it more clear. Let's make it red and a bit thicker and we're going to add some labels of course with the elevation column and there it is, we can see here in jumps of 50 how deep this lignite mine is. So the idea is that I'm going to calculate the volume below a certain surface level. I'm going to see what is below zero, so what's below C level and there's a nice tool in the processing toolbox that easily does that and that's the raster surface volume tool. I choose the clipped DEM as an input, I choose zero meters for the base level and I choose here to only count what is below this base level and to report that volume. You could also choose to count only above the base level and that's useful if you want to calculate the volume of a hill like the one next to the mine. So the first output is an HTML file which simply gives you the statistics and the second output creates a dbf file which you can add to QGIS to check the results in the form of a table. Then I run it, it gives this error but you can simply ignore it, it also gives immediately the output of the volume here in textual form but let's check the results. So we have the HTML file but we also have this results viewer, it gives the same result in fact the HTML page with the statistics. Note there's a negative value because we calculated the volumes below a certain threshold, here's the HTML file, it's the same and we add the dbf from the browser and then in the attribute table you see the same results, the volume in cubic meters, the area in square meters and the amount of pixels that are reported to be below the zero meters level. Now I'm going to apply another approach to verify that this result is correct. So the first step is that I'm going to use the raster calculator to calculate all pixels here that are less or equal than zero meters to create a boolean map which gives one which is true for below or equal to zero and false for all the other pixels. I need to do that because I need a polygon because the other way of doing this is with a zone of statistics. So I'm going to convert this result to a polygon using polygonize, give an output file name, let's call it LT0 boundary, then run it, here it is, I'm going to select this polygon and remove the rest from the attribute table, there it is. This polygonized function can give some errors in the geometry and that will cause probably some differences in the end result but we'll see that. So the next step is to use the raster calculator to calculate the volumes. So I have the mined pixels that are less than zero meters and I'm going to multiply that with the elevation subtracted from zero. So I get for each pixel the depth times the area of cells and the cell size is 30 meters so 30 times 30 and I call the output pixel volumes. So for each pixel it will then have the volume. So it's done, just for visualization I'm going to put the boundary on top of it, change it to a simple outline, blue and a bit thicker. So what I now want to do is to know the sum of all these volumes within this polygon and I use the zone of statistics for that. So I'm going to use the pixel volumes as an input and the LT0 boundary as the polygon and I'm only interested in the count and the sum for the comparison with the other result and we run, close this because it adds the statistics to the polygon layer that we already had. So I open the attribute table and I see there the sum which is then the volume in cubic meters and the count and number of pixels and I can compare it with the other table from the other tool and there we see that it's more or less the same, there are some rounding errors probably caused by the geometry of the polygons. So in this video you've learned two ways of deriving the volume of a pit in your DEM. The first method is of course the quickest which is the tool from the processing toolbox and the second method I use to verify the results are more or less similar if we use zone of statistics. Hope you've enjoyed the video. If you like these videos then please subscribe to my YouTube channel. For more free GIS materials go to GISOpenCourseWare.org.