Updated 2020/03/03. Removed 4. Application then added 4. The way forward. You can go to the next step from this tutorial to delineate a watershed of your outlet point.

As of 2020/03/03, the function does not work on QGIS3.10.3 or 3.12.0.

Watershed of Guadalcanal island in Solomon islands

Objective

This tutorial is to learn how to calculate watershed based on SRTMs using QGIS.

Procedure

  1. Preparation
  2. Download and Mosaic SRTMs
  3. Calculate Watershed
  4. The way forward

1 Preparation

Install QGIS

This tutorial uses QGIS 3.10.2. Please download latest QGIS from https://www.qgis.org/en/site/ then install it. I think the higher version of QGIS can be used.

Add Google Satellite Layer to QGIS as a reference image.

Google Satellite Layer is really useful to interpret the watershed. Size of watershed, vegetation in a watershed etc..

  1. Click
  2. Select Browser
  3. Right-click on “XYZ Tiles” in the folder list > New Connection….
  4. Type “Google” in the Name box
  5. Copy https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z} to URL
  6. Click OK.
  7. You can Drug and drop “Google” to Layers to add google satellite.
Add new connection(Step 1-3)
Add Google Satellite Layer(Step4-6)

2 Download and Mosaic SRTMs

Download SRTMs

1. Open https://dwtkns.com/srtm30m/

To download SRTM which is produced by NASA, You need to register earth data; https://urs.earthdata.nasa.gov/. Please search Earth data.

2. Click on your target site then click “Download DEM”

Downloading one of the SRTM tiles.

3. Only the first time, you need to sign in NASA earth data.

If you don’t have the account, plase visit https://urs.earthdata.nasa.gov/
After the login, the SRTM tile will be downloaded. > Save into your PC.

4. Unzip the downloaded SRTM tiles. You will get .hgt files.

Mosaic SRTMs

1. Open QGIS then Add unziped SRTMs(e.g.S10E159.hgt, S10E160.hgt)

2. Merge(Raster > Miscellaneous > Merge)

Follow the settings below > Click Run.
Merged: output location(please select output location).
Name: Please name the output (In the tutorial used “guad_srtm_wgs84.tif”)

Name of the result will be added in QGIS automatically. Please remove the original files(Right click on the original files then remove the layers)

3. Calculate Watershed

1. Workflow

Watershed can be generated from DEM. Fill sink is the preprocessing of DEM to remove holes and walls(Noise). Filled DEM is used to generate Flow direction which identify water flows. Flow accumulation shows how much water come into the grid. Large number shows big streams. Flow direction and Flow accumulation are used to generate a stream network and a watershed.

2. Fill Sink

1. Add Processing Toolbox  

 2. SAGA > Terrain Analysis – Hydrology > Fill Sink(Wang & Liu)

Follow below settings > Run
・Uncheck Flow Directions and Watershed Basins
・Filled DEM: Output location: (please select output location)
・Filled DEM: Please name the output(guad_filled_srtm_wgs84.sdat)

There are flow direction and accumulation functions. However, we don’t used them in this time. Just we just fill sink in our DEM.

3. Check the output then remove the input(guad_srtm_wgs84.sdat)

There is no big difference in the result. But holes and walls has been removed.

3. Mask Filled DEM by island polygon

1. Add guad_island_wgs84.shp from 2_Watershed folder.

you can download this country polygon from Diva GIS. http://www.diva-gis.org/gdata.

2. Raster > Extraction > Clip Raster by mask….

Follow the settings(Right fig) > Click Run.

  • Input layer
    Filled DEM in the previous step. E.g. guad_clipped_filled_srtm_wgs84.sdat)
  • Mask layer : guad_island_wgs84
  • Source and Target CRS
    The CRS of the filled dem is WGS84. Then we are going to change it to UTM57S.
    • Source CRS: select WGS84
    • Target CRS: select WGS84 / UTM57S
  • Clipped : output location: please select output location.
    Name: Please name the output(guad_clipped_Filled_srtm_u57s.tif)
The output. Filled DEM was clipped by the island polygon.

4. Restart QGIS and open new QGIS

Once close and restart QGIS with GRASS. Then, Open filled and clippled dem(guad_clipped_Filled_srtm_u57s.tif). This step is to reset the CRS(WGS84).

 5. Calculate Watershed

1. Processing Toolbox  >  GRASS > Raster(r.*) > r.watershed

Search the tool.

Follow settings > Click Run.
Elevation : guad_clipped_Filled srtm_u57s.tif
Minimum size:
  1750(157.5ha) You can change it!
Check: Enable Single Flow Direction(D8) flow
Check: positive flow accumulation
・There many other settings but leave them.

You can calculate minimum size of watershed based on the pixel size and number of pixels. please download the excel file below.

Please modify the yellow cells.

The function generates many output. However, those outputs are temporal layers in the memory. If they are needed for your analysis, please save them to your hard drive.

Right click on the layer below > Export  > Save as

The outputs

2. Check the watershed.

You can see “Unique label for each watershed basin”. This is the result of watershed.

3. Save Outputs(watershed, half watershed, stream, Drainage directionetc..)

Right click on

>  export > save as > Change settings like below.
・location: please select output location
 e.g.2_Watershed
Filename: guad_watershed1750_30_u57s.tif
CRS: UTM zone 57S (EPSG:32757)
Resolution: 30 * 30 m

To save half watershed
Right click on

This is the watersheds but divided based on the main stream in the watershed.

>  export > save as
location: please select output location
     e.g. 2_Watershed
Name: guad_half_watershed1750_30_u57s.tif
CRS: UTM zone 57S (EPSG:32757)
Resolution: 30 * 30 m

To save Drainage direction
Right click on

This is the flow direction

>  export > save as
location: please select output location
     e.g. 2_Watershed
Name: guad_drainage_direction1750_30_u57s.tif
CRS: UTM zone 57S (EPSG:32757)
Resolution: 30 * 30 m

Save other layers in the same way.

4. Vectorize the output(If necessary)

Raster > Conversion > Polygonize (Raster to Vector)

Settings are like below.
Input layer
    e.g. guad_watershed1750_30_u57s
Vectorized: Ouput location and filename
Please select output location    e.g. 2_Watershed
Please name the output(guad_watershed1750_30_u57s.shp)

4. The way forward

How do you use the watershed? The watershed proposes the boundary of landscape. It will be useful for the planning of the land. For example, understanding the deforestation rate then reflecting it to reforestation plan, water resource management plan etc.

A deforestation rate by the watersheds. Hansen loss was used.

Related topic

How to delineate watersheds of the specific outlet point

1. Introduction This tutorial is the next step of previous post “How to delineate watersheds”. Before starting this tutorial, please finish the previous step. 2. Overview of this process This process uses a stream line which is the result of previous step(see above), and outlet points. Then, as the figure shows, you can delineate the…