loader image
Skip to main content
Completion requirements


10. Clipping layers to the catchment boundary

For visualization, it is nicer to clip the layers to the boundary of the catchment.

1. Let’s first clip the channels vector layer to see only the streams that are inside the catchment. Go to the main menu and select Vector | Geoprocessing Tools | Clip...

Clip Vectors Menu

2 .Fill in the dialog as in the figure below to use the catchment layer as a "cookie cutter" to clip the Input layer channels to the boundary of the Overlay layer Rur_catchment. Call the Clipped layer Rur_channels.shp. Click Run to run the tool. Click Close to return the main screen.

You'll probably get this error:


This is caused by geometrical errors in the channels layer. Let's fix this.

3. Click Close to close the Clip dialog.

4. In the Layers panel, select the channels layer.

5. In the toolbar of the Processing Toolbox, click  to Edit Features In-Place.

Some tools support this. For those tools, it is not necessary to save the result into a new layer.

6. Choose Vector geometry | Fix geometries.


7. In the Fix geometries dialog, keep the default Repair method and click Modify All Features.


8. Click Close to close the dialog.

9. In the toolbar, click  to toggle off editing mode and save the result.

10. In the toolbar, click  to unselect the lines. Also click  in the Processing Toolbox to toggle off in-place editing.

Now we can repeat the clipping. There's an easy way to redo operations by using the history.

11. In the toolbar of the Processing Toolbox, click  to open the Processing History dialog.


12. Search for Clip and double click to re-open the dialog.

You'll see that the Processing History stored the input layers and output file name that you had used before in the dialog.

13. Click Run.

Now the Clip tool runs without errors.

14. Click Close to close the dialog. Also close the Processing History dialog.

We can easily copy the styles from channels to Rur_channels.

15. Right-click on the channels layer and choose Styles | Copy Style | All Style Categories.

16. Now right-click on Rur_channels and choose  Styles | Paste Style | All Style Categories.

17. Remove channels from the layers list and make sure that Rur_channels layer is at the top of the list.

We can clip the DEM in the same way as we did in Section 6. The only difference is that we have to give a no data value that is out of the range of elevations—we often use -9999 for that. Here we don’t need the clipped DEM, because we are going to apply a styling technique to create a nice effect to highlight our study area.

Watch this video to check the steps of this section: