Key Formulas & Process
1. Sink Detection
A sink is a cell whose elevation is lower than ALL 8 neighbours.
Check: if Z(cell) < min(8 neighbours) → it’s a sink.
Sinks trap water and disconnect river networks — they must be filled before hydrological analysis.
2. Sink Filling
Formula: Filled value = min(8 neighbours)
Raise the sink cell to match its lowest neighbour so water can flow out.
3. Flow Direction (D8)
Each cell flows to the neighbour with the steepest downhill slope.
For cardinal directions: slope = ΔZ / cell_size
For diagonal directions: slope = ΔZ / (cell_size × √2)
D8 Codes: E=1, SE=2, S=4, SW=8, W=16, NW=32, N=64, NE=128
4. Flow Accumulation
Count how many cells flow into each cell (upstream count).
Start from ridge cells (FA=0) and trace downstream, adding 1 for each contributing cell.
The cell with the highest FA is the outlet of the entire grid.
5. River Network
Formula: River threshold (cells) = Threshold area / cell area
Cell area = resolution × resolution (e.g., 30m × 30m = 900 m²)
All cells with FA ≥ threshold are river cells.
6. Watershed Area
Formula: Watershed area = Number of contributing cells × cell area
The watershed includes ALL cells that drain to the outlet point.
For the grid outlet: watershed area = total cells × cell area.
Standard Process (Exam Steps)
- Find sinks: Check each interior cell — is it lower than ALL 8 neighbours?
- Fill sinks: Raise to min(8 neighbours)
- Flow Direction: For each cell, find the neighbour with steepest drop
- Flow Accumulation: Count upstream cells flowing into each cell
- River Network: Convert threshold area to cells; mark FA ≥ threshold as river
- Watershed: Count all cells draining to the outlet; multiply by cell area
Q1. 6×6 DEM, 30m — Full Process VERIFIED
Question: Given a 6×6 DEM with 30m resolution and area threshold 4500 m²:
(a) Identify sinks and fill (b) Flow direction (c) Flow accumulation (d) River network (e) Watershed area
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | 130 | 128 | 102 | 101 | 124 | 138 |
| 2 | 135 | 118 | 97 | 88 | 114 | 121 |
| 3 | 110 | 98 | 84 | 68 | 92 | 103 |
| 4 | 115 | 86 | 81 | 78 | 76 | 87 |
| 5 | 112 | 102 | 84 | 73 | 96 | 105 |
| 6 | 129 | 118 | 103 | 85 | 119 | 105 |
(a) Sink Detection & Filling
(b) Flow Direction (D8)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ↘ | → | ↘ | ↓ | ↙ | ↓ |
| 2 | ↘ | ↘ | ↘ | ↓ | ↙ | ↙ |
| 3 | ↘ | → | → | ↘ | ↓ | ↙ |
| 4 | → | → | → | → | ✖ | ← |
| 5 | ↗ | → | → | → | ↑ | ↖ |
| 6 | ↗ | ↗ | ↑ | ↑ | ← | ↖ |
✖ = Outlet — E4 is the outlet (76)
(c) Flow Accumulation
(d) River Network & (e) Watershed
Q2. 6×6 DEM, 100m VERIFIED
Question: Given a 6×6 DEM with 100m resolution. Find sinks, fill, flow direction, flow accumulation, river network (threshold 40,000 m²), and watershed.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | 78 | 72 | 69 | 71 | 58 | 49 |
| 2 | 74 | 67 | 56 | 49 | 46 | 50 |
| 3 | 69 | 40 | 44 | 37 | 37 | 48 |
| 4 | 64 | 58 | 55 | 22 | 22 | 24 |
| 5 | 78 | 61 | 47 | 21 | 21 | 19 |
| 6 | 74 | 53 | 34 | 12 | 11 | 12 |
Flow Direction (D8)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ↘ | ↘ | ↘ | ↓ | ↓ | ↙ |
| 2 | ↘ | ↓ | ↘ | ↓ | ↓ | ↙ |
| 3 | → | → | ↘ | ↓ | ↓ | ↓ |
| 4 | ↗ | ↑ | → | ↓ | ↘ | ↓ |
| 5 | ↘ | ↘ | → | ↓ | ↓ | ↓ |
| 6 | → | → | → | → | ✖ | ← |
✖ = Outlet — E6 (11) is the outlet
Q3. 6×5 DEM, 100m — Threshold 6 NEW
Question: A 6×5 DEM with 100m resolution is given below. (a) Identify and fill any sinks. (b) Determine the flow direction (D8) and flow accumulation. (c) Delineate the river network using a flow-accumulation threshold of 6 cells. (d) Compute the watershed area at the outlet.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 510 | 500 | 490 | 480 | 470 |
| 2 | 505 | 495 | 490 | 475 | 480 |
| 3 | 500 | 485 | 455 | 470 | 475 |
| 4 | 495 | 490 | 480 | 465 | 470 |
| 5 | 490 | 485 | 475 | 455 | 450 |
| 6 | 500 | 490 | 480 | 460 | 445 |
Flow Direction (D8)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | ↘ | → | ↘ | → | ✖ |
| 2 | ↘ | ↘ | ↓ | ↙ | ↑ |
| 3 | → | → | ↘ | ↓ | ↙ |
| 4 | ↘ | ↗ | ↘ | ↘ | ↓ |
| 5 | → | → | → | ↘ | ↓ |
| 6 | ↗ | ↗ | → | → | ✖ |
✖ = Outlet — E6 (445) is the main outlet
Q4. 6×6 DEM — Flow Direction NEW
Question: A 6×6 DEM with 100m resolution is given below. (a) Detect and fill any sinks. (b) Compute the D8 flow direction and flow accumulation for every cell. (c) Identify the river network (FA ≥ 5 cells) and report the watershed area at the main outlet.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | 58 | 52 | 55 | 53 | 56 | 58 |
| 2 | 55 | 40 | 42 | 45 | 51 | 55 |
| 3 | 48 | 34 | 20 | 33 | 48 | 52 |
| 4 | 33 | 23 | 28 | 27 | 25 | 38 |
| 5 | 17 | 20 | 21 | 22 | 23 | 24 |
| 6 | 12 | 10 | 15 | 18 | 16 | 17 |
Flow Direction (D8)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ↘ | ↓ | ↓ | ↓ | ↙ | ↙ |
| 2 | → | ↘ | ↓ | ↙ | ↙ | ↙ |
| 3 | ↘ | ↓ | ↙ | ← | ↓ | ↙ |
| 4 | ↓ | ↙ | ↓ | ↓ | ↙ | ↓ |
| 5 | ↓ | ↓ | ↙ | ↙ | ↓ | ↓ |
| 6 | → | ✖ | ← | ← | ✖ | ← |
✖ = Outlet — B6 (10) is the main outlet
Q5. 6×6 DEM — Threshold 4 NEW
Question: Given the 6×6 DEM (30m resolution) shown below, (a) detect and fill all sinks, (b) determine the D8 flow direction, (c) compute the flow accumulation, (d) extract the river network using a threshold of 4 cells, and (e) calculate the catchment (watershed) area at the pour point D5.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | 109 | 106 | 104 | 103 | 114 | 115 |
| 2 | 107 | 105 | 102 | 100 | 112 | 113 |
| 3 | 105 | 103 | 100 | 95 | 110 | 112 |
| 4 | 106 | 105 | 99 | 90 | 108 | 110 |
| 5 | 107 | 110 | 98 | 94 | 110 | 111 |
| 6 | 108 | 111 | 96 | 95 | 112 | 115 |
Flow Direction (D8)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | → | ↘ | ↘ | ↓ | ← | ↙ |
| 2 | ↘ | ↘ | ↘ | ↓ | ↙ | ↙ |
| 3 | → | → | → | ↓ | ↙ | ↙ |
| 4 | ↗ | → | → | ↓ | ← | ← |
| 5 | ↑ | → | → | ✖ | ← | ↖ |
| 6 | ↑ | → | ↗ | ↑ | ← | ↑ |
✖ = Outlet — D5 is the outlet (pour point)
Q6. 6×5 DEM, 100m — Threshold 10 NEW
Question: The 6×5 DEM below has a 100m cell size. (a) Locate and fill any sinks. (b) Compute the D8 flow direction and flow accumulation. (c) Delineate the river network for a flow-accumulation threshold of 10 cells. (d) Determine the watershed area drained by the main outlet E6.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 480 | 500 | 490 | 480 | 485 |
| 2 | 505 | 495 | 490 | 475 | 480 |
| 3 | 500 | 485 | 455 | 470 | 475 |
| 4 | 495 | 490 | 480 | 465 | 470 |
| 5 | 490 | 485 | 475 | 455 | 450 |
| 6 | 500 | 490 | 480 | 460 | 445 |
Flow Direction (D8)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | ✖ | ← | ↘ | ↓ | ↙ |
| 2 | ↑ | ↘ | ↓ | ↙ | ↙ |
| 3 | → | → | ↘ | ↓ | ↙ |
| 4 | ↘ | ↗ | ↘ | ↓ | ↓ |
| 5 | → | → | → | ↘ | ↓ |
| 6 | ↗ | ↗ | → | → | ✖ |
✖ = Outlet — E6 (445) is the main outlet
Watershed at E6 (445) = 27 × 10,000 = 270,000 m² = 27 ha
Q7. 6×5 DEM, 30m — Pour Point NEW
Question: A 6×5 DEM with 30m resolution is provided. (a) Identify and fill the sink. (b) Determine the D8 flow direction and flow accumulation for each cell. (c) Extract the river network using a flow-accumulation threshold of 4 cells. (d) Compute the watershed area at the pour point E6.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 118 | 112 | 109 | 111 | 115 |
| 2 | 114 | 107 | 96 | 89 | 92 |
| 3 | 109 | 40 | 84 | 77 | 79 |
| 4 | 104 | 99 | 95 | 62 | 65 |
| 5 | 68 | 68 | 67 | 61 | 64 |
| 6 | 62 | 60 | 58 | 56 | 50 |
Flow Direction (D8)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | ↘ | ↘ | ↘ | ↓ | ↓ |
| 2 | ↘ | ↓ | ↘ | ↓ | ↓ |
| 3 | → | → | ↘ | ↓ | ↓ |
| 4 | ↓ | ↓ | → | ↓ | ↙ |
| 5 | ↓ | ↓ | ↓ | ↘ | ↓ |
| 6 | → | → | → | → | ✖ |
✖ = Outlet — E6 (50) is the outlet
Watershed = 30 cells × 900 = 27,000 m² = 2.7 ha
Q8. 5×5 DEM NEW
Question: A 5×5 DEM with 100m resolution is given. (a) Identify the sink and fill it. (b) Determine the D8 flow direction and flow accumulation. (c) Delineate the river network for a threshold of 5 cells, and (d) compute the total watershed area drained by the outlet C1.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 100 | 98 | 97 | 98 | 99 |
| 2 | 105 | 103 | 102 | 99 | 100 |
| 3 | 107 | 105 | 95 | 100 | 101 |
| 4 | 109 | 106 | 104 | 102 | 104 |
| 5 | 115 | 112 | 110 | 109 | 108 |
Flow Direction (D8)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | → | → | ✖ | ← | ← |
| 2 | ↑ | ↑ | ↑ | ↖ | ↖ |
| 3 | ↗ | → | ↗ | ← | ↖ |
| 4 | → | ↗ | ↑ | ↖ | ↑ |
| 5 | ↗ | ↑ | ↑ | ↑ | ↖ |
✖ = Outlet — C1 (97) is the outlet
Watershed = 25 cells × 10,000 = 250,000 m²
Q9. 4×4 DEM — Threshold 9 NEW
Question: The 4×4 DEM shown below has a 100m resolution. (a) Determine the D8 flow direction at every cell, showing the slope calculations for the steepest-descent path. (b) Compute the flow accumulation. (c) Identify the river network using a threshold of 9 cells and find the watershed area at the outlet D4.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | 156 | 144 | 138 | 142 |
| 2 | 148 | 134 | 112 | 98 |
| 3 | 138 | 106 | 88 | 74 |
| 4 | 128 | 116 | 110 | 44 |
Flow Direction (D8)
| A | B | C | D | |
|---|---|---|---|---|
| 1 | ↘ | ↘ | ↘ | ↓ |
| 2 | ↘ | ↘ | ↘ | ↓ |
| 3 | → | → | ↘ | ↓ |
| 4 | ↗ | ↗ | → | ✖ |
✖ = Outlet — D4 (44) = outlet
Note: This is a simple grid with no sinks — all water flows to the bottom-right corner D4 (44).
Q10. 5×5 DEM — Threshold 5 NEW
Question: Given the 5×5 DEM (100m resolution) below, (a) detect and fill any sinks, (b) compute the D8 flow direction and flow accumulation, (c) delineate the river network using a flow-accumulation threshold of 5 cells, and (d) calculate the watershed area drained by the outlet E5.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 93 | 90 | 89 | 90 | 89 |
| 2 | 91 | 88 | 82 | 79 | 78 |
| 3 | 89 | 71 | 72 | 73 | 74 |
| 4 | 86 | 83 | 82 | 70 | 69 |
| 5 | 86 | 84 | 82 | 75 | 68 |
Flow Direction (D8)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | ↘ | ↘ | ↘ | ↓ | ↓ |
| 2 | ↘ | ↓ | ↓ | ↓ | ↓ |
| 3 | → | → | ↘ | ↓ | ↓ |
| 4 | ↗ | ↑ | → | ↘ | ↓ |
| 5 | ↗ | → | ↗ | → | ✖ |
✖ = Outlet — E5 (68) is the outlet
Watershed = 25 cells × 10,000 = 250,000 m²
Q11. 6×6 LiDAR 10m DEM NEW
Question: A high-resolution LiDAR-derived DEM with 10m cell size is shown below. (a) Detect and fill any sinks. (b) Compute the D8 flow direction and flow accumulation. (c) Extract the river network using a contributing-area threshold of 1000 m². (d) Determine the watershed area drained by the outlet E6.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | 125 | 123 | 121 | 120 | 118 | 117 |
| 2 | 124 | 118 | 119 | 117 | 116 | 118 |
| 3 | 123 | 120 | 118 | 116 | 114 | 115 |
| 4 | 122 | 118 | 116 | 115 | 113 | 114 |
| 5 | 121 | 118 | 114 | 112 | 112 | 114 |
| 6 | 120 | 117 | 115 | 113 | 109 | 112 |
Flow Direction (D8)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ↘ | ↓ | ↘ | ↓ | ↓ | ↙ |
| 2 | → | ↘ | ↘ | ↘ | ↓ | ↙ |
| 3 | ↘ | ↘ | ↘ | ↘ | ↓ | ↙ |
| 4 | → | ↘ | ↘ | ↓ | ↓ | ↙ |
| 5 | → | → | → | ↘ | ↓ | ↙ |
| 6 | → | ↗ | ↗ | → | ✖ | ← |
✖ = Outlet — E6 (109) is the outlet
Note: This LiDAR DEM uses 10m resolution (cell area = 100 m²), so the threshold in cells is much higher than for coarser DEMs with the same area threshold.