How to Delineate a Watershed in QGIS in 8 Steps

QGIS is a free and open source geographic information system (GIS) that can be used in conjunction with digital elevation models (DEMs) from Equator to delineate a watershed.

  1. Find DEM data
  2. Fill Sinks
  3. Generate the Stream Network
  4. Generate a Polyline of the Stream Network
  5. Project Outlet Point
  6. Extract Coordinates of Outlet Point
  7. Generate Watershed of the Stream Network
  8. Raster to Vector
Two Watershed Layers - Equator Studios

Step 1

Find DEM Data

Uploaded DEM from Equator Site Builder

Image of our uploaded DEM from the Equator Site Builder

Before we can delineate a watershed, we need to upload our data! We will extract a Digital Elevation Model (DEM) – a geospatial dataset storing elevation values – from a platform called Equator. If you have your own DEM, you can skip this step.

The Data menu in Equator provides a plethora of elevation data, with options for further enhancement. Furthermore, it skips the step of having to re-project our DEM in QGIS which would be necessary if we extract our DEM data from elsewhere. If you are new to Equator, the Data Menu Overview provides a walkthrough of how to extract elevation data. Once we have acquired our DEM, upload it to the QGIS project and it should appear similar to the image above.

Step 1.1

Re-projection (skip this step if you used Equator Data menu)

If you extracted your data from a source other than Equator’s Data menu, then before we can continue to Step 2 we must re-project our DEM to an appropriate coordinate system (this will vary in accordance to your region of study). To do this you can use the Warp (Reproject) tool:

Raster → Projections → Warp (Reproject)

Step 2

Fill Sinks

Next, we will fill in the sinks, using Fill sinks (wang & liu) tool:

Processing Toolbox → SAGA → Fill sinks (wang & liu)

Be sure to select Filled DEM as your only Output File

Fill Sinks (Wang & liu) with correct input and output settings

Fill Sinks (Wang & Liu) with the appropriate input and output settings

Step 3

Generate the Stream network (Strahler Order)

Now that we have projected our DEM onto our project, we will generate a Strahler Order to outline our stream network. The Strahler Order is important as it will be one of the main indicators of our desired catchment, the various water networks, as well as the morphology in general. Therefore, we will need one in order to delineate a watershed. To generate our Strahler Order, we will use the Strahler Order tool:

Processing Toolbox → SAGA → Terrain Analysis – Channels → Strahler Order

Once you run the tool, a stream network should be generated as per the images below (slideshow):

Strahler Order tool with the appropriate input and output settings

Strahler Order tool with the appropriate input and output settings

Before and after of Strahler Order projection

Step 4

Generate a polyline of the Stream Network

The Strahler Order tool does well to highlight our stream network, however, in order to isolate some of the streams and make the network ‘cleaner’, we will generate a polyline of the Stream network. This will filter the network, isolating streams in accordance to their Strahler Number, whilst translating it from a raster to a polyline. To generate our polyline, we will use the Channel Network and Drainage Basins tool:

Processing Toolbox → SAGA → Terrain Analysis – Channels → Channel Network and Drainage Basins

Using the Channel Network and Drainage Basins tool, set the Threshold as the strahler number you will to use to isolate streams that possess a number greater than or equal to it (in this case our threshold was 5). Be sure to select Channels as your only Output File

Channel Network and Drainage Basins with the correct input and output settings

Channel Network and Drainage Basins with the correct input and output settings

Channel Network and Drainage Basins before and after

Step 5

Project Outlet Point

Step 7 will require the X and Y-coordinates of our outlet point. It is important to generate an outlet point so that we can identify where to delineate a watershed. We will project a point onto our site that will highlight the Outlet point in our project and extract its x & y-coordinates in step 6. We will begin with creating a new shapefile layer and then adding a point feature:

Layer → Create Layer → New Shapefile Layer

Enter a File Name, and be sure to select the appropriate Projected Coordinate System

New Shapefile Layer tool

New Shapefile Layer tool with correct output and input settings

Toggle Editing → Add Point Feature

Now that we have our shapefile, toggle editing and place a point where your outlet point is to be. 

Projected point feature

New point feature added on raster cell, indicating outline point

Step 6

Extract Coordinates of Outlet Point

Now that we have projected our outlet point, we will extract the coordinates:

Outlet → Open Attribute Table → Open Field Calculator

Open the attribute table of your outlet shapefile and access the Open Field Calculator. Select Geometry, and select $x in order to extract the value for your x-coordinates. Name the Output field name as you see fit (in our case ‘X-coord’), and set the Output field type to Decimal number (real). Repeat this process for your y-coordinates, but instead of selecting $x, select $y. The result will be two additional cells that provide the x & y-coordinates of your outlet point respectively.

Extracting x-coordinates

Extracting x-coordinates

Extracting y-coordinates

Extracting y-coordinates

You should now have two attribute cells that provide you with your x & y-coordinates respectively.

Attribute table for outlet point

Step 7

Generate Watershed of the Stream Network

Finally, we can generate our Watershed. With the x & y-coordinates of our outlet point, we will use the Upslope area tool to generate the Watershed:

Processing Toolbox → SAGA → Terrain Analysis – Hydrology → Upslope Area

Upslope Area tool

Simply open the attribute table for your outlet point and copy the cell data of the x & y-coordinates and paste them into the Target X Coordinate and Target Y Coordinate inputs respectively. Set your Elevation as your filled DEM (in our case ‘Filled_Sinks’), and select a Method (in this instance we selected ‘[0] Deterministic 8’).  Set your output either as a temporary or saved file and click ‘Run’ to generate your watershed. It should project as shown in the slideshow below (2nd image shows the watershed with the polyline stream network and outlet point above the watershed layer):

Generated Watershed

Step 8

Raster to Vector

If you desire your watershed in a polygon format, this step outlines the process of converting your raster to a polygon using the Polygonize tool.

Raster → Conversion → Polygonize (Raster to Vector)

Set your Input Layer to be your watershed layer (in our case ‘Upslope_Area’). Once you run the tool, it should generate something similar to the one below:

Polygonize (Raster to Vector) tool
Polygonized Watershed

Next, open the attribute table for your new polygonized watershed and isolate the record that holds the watershed by deleting all other records in the table. You should now only have the watershed in your layer as per the 2nd image of the slideshow:

Deleting records to isolate the watershed polygon

Done!

Excellent! You now should have your watershed. So what now? Well, some suggestions to move forward with are to play around with the symbology of your watershed (perhaps make your watershed polygon transparent to showcase the stream network), clip your polyline stream network to your watershed, and incorporate your filled DEM with different symbology as a background for your project. Below is a sample of what yours can look like. We hope this tutorial on how to delineate a watershed helped you, feel free to take a look at some of Equator’s other blogs and “How-to tutorials”!

Catchment Map - Equator

If you did this process with your own DEM file, try it out using Equator’s Data menu. See the quality of the data Equator provides while automatically exporting your file in the proper format.