---
Created: 2026/06/30 08:16
---
## Introduction

**Watershed:**
**DEM:**
**Fill:** To pass water, it much reach upto the elevation of next obstacle; fill does that

**Flow direction:** 

- Eight direct pour point -> among the neighboring 8 cells (3x3 grid), directs to the cell with largest slope; calculates slope with farthest points.
- Coding -> `2` indicates bottom-right, `128` indicates top-right; for a cell, the system calculates largest slope that assigns the constant values to indicate direction

**Flow accumulation:**

- For a particular cell, from how many cells (cumulatively) water is coming from

**Stream link:** Assigns unique number to each link.
**Stream order:**

## Procedure

- Ensure checkbox under "Geoprocessing" > "Geoprocessing Options" > "Background Processing" is enabled

### 1. Fill

- Toolbox > Spatial Analyst > Hydrology > Fill
- Z limit: to keep certain structures below given elevation. E.g., to keep a lake (10m) from filling, enter 6m
- Continue with default values

### 2. Flow direction

- Toolbox > Spatial Analyst > Hydrology > Flow Direction
- Use filled raster as input
- Use D8 method

### 3. Flow accumulation

- Toolbox > Spatial Analyst > Hydrology > Flow Accumulation
- Use output data type integer

### 4. Build raster attribute table

- Toolbox > Data Management > Raster > Raster Properties > Build Raster Attribute Table
- Use the flow accumulation raster to get its integer values

### 5. Stream creation

- Check cell size: `cedar_dem` > Properties > Source > Cell size (30 x 30)
- Threshold area: 25 km^2 (area discharging)
- Cell number: $\frac{25\times 10^6}{30\times 30} = 27,778$

#### 5.1 Set null

- Toolbox > Spatial Analyst > Conditional > Set Null
- Use Flow accumulation raster as input
- Use expression `Value <27778`
- Use false raster to `1`
- Specify more sensible name to output raster (e.g., `Stream`)

### 6. Stream link

- Toolbox > Spatial Analyst > Hydrology > Stream Link
- Use Stream as input
- FlowDir_Fill1 as direction raster
- More sensible name `StreamLink`

### 7 Stream basin

- Toolbox > Spatial Analyst > Hydrology > Basin
- FlowDir_Fill1 as direction raster

### 8. Raster to polygon

- Toolbox > Conversion Tools > From Raster > Raster to Polygon
- Use basin as input

### 9. Stream order

- Toolbox > Spatial Analyst > Hydrology > Stream Order
- Use Stream as input
- FlowDir_Fill1 as direction raster

### 10. To feature file

- Toolbox > Spatial Analyst > Hydrology > Stream to Feature
- Use Stream as input
- Use FlowDir_Fill1 as direction raster
- Use more sensible name: StreamPolygon

### 11. Flow length

- Toolbox > Spatial Analyst > Hydrology > Flow Length
- Use FlowDir_Fill1 as direction raster

### 12. Create watershed

- Import the provided "Points" shapefile
- Use the points attribute table has unique IDs (no duplicate)

#### 12.1 Ensure points are onto stream line

- Toolbox > Spatial Analyst > Hydrology > Snap Pour Point
- Use Points as pour point data
- Use Id as pour field
- Use FlowAcc_Flow1 as accumulation raster
- Use given snap distance (e.g., 200, meaning search within 200m)

#### 12.2 Watershed

- Toolbox > Spatial Analyst > Hydrology > Watershed
- Use input params as directed

### 13 Subwatershed

- Add more points to Points
- Ensure unique IDs are assigned
- Use snap pour if required
- Create watershed