Chapter 6 Data Processing Part-1: Processing Elevation Data

We will process the elevation data as mentioned in the following steps:

  1. Create watershed basins and river network for the region.
  2. Select an outlet point and create a watershed for that outlet point.
  3. The newly created watershed area will be our new region for susceptibility analysis.
  4. Create terrain variables for the region.

6.1 Hydrological analysis

Elevation data is enough to create watershed boundaries and river network. In this tutorial, we will not talk about theory behind it but just create them.

6.2 Create basins and stream networks

Following steps explain how to create watershed boundaries in Grass.

  1. Click Menu Raster -> Hydrologic Modeling -> Watershed Analysis as shown in the next figure. Alternatively you can write a command r.watershed in the console and press enter key.
  2. In the next dialog, select Inputs tab and set dem_rect as elevation data. Keep other fields empty.
  3. In the Outputs tab enter only the required output maps as shown in the figure.
  4. Alternatively, you can write the following code in the console and press enter to run.

r.watershed threshold=15000 accumulation=floacc drainage=flodir basin=basin stream=stream

Create Watersheds

Figure 6.1: Create Watersheds

Create Watersheds

Figure 6.2: Create Watersheds

Value of threshold decides the minimum size of basins to be created. Now we can create the stream raster and vector using the following code.

r.stream.extract threshold=5000 stream_raster=stream_2 stream_vector=river direction=flodir --overwrite

To check the meaning of each input and output, write r.stream.extract in the console and press enter. Corresponding dialog has a tab named Manual which explains the working of the tool and the meaning of parameters in detail.

We can show or hide a layer in the map using Layer Manager interface. The image of elevation with stream looks as in the following figure.

Image of Stream Network

Figure 6.3: Image of Stream Network

We can draw a tentative boundary of Roshi river watershed by visual inspection. Let us select a point near the center of the image to reduce the size of study area. Zoom the map around the center of the area.

6.3 Create new region (Using an outlet point)

  1. Click Query Raster/Vector map(s) tool in the Map window.
  2. Click a junction of river.
  3. A dialog box will show the coordinates of clicked coordinates. Copy the coordinates with a right-click. In the next step we will create the watershed boundary at the selected outlet point.
Select the Outlet Coordinates

Figure 6.4: Select the Outlet Coordinates

Write the following code and run in the console.

r.water.outlet output=ws_new coordinates=361590.58053870144, 3044833.5258070175

Above code uses flow direction map as input and outputs new watershed as raster. The coordinates of output are copied from the last step. The raster output ws_new is our new region. To set a new region, we need to:

  1. Convert the output to vector map using r.to.vect output=basin type=area
  2. Crop the region to the extent of basin.
Convert Watershed Raster to Vector Polygon

Figure 6.5: Convert Watershed Raster to Vector Polygon

Enter following codes and run each in sequence.

  • r.mask vector=basin
  • r.mapcalc “dem_clip = dem_rect” (Note: there should be space before and after = in the second code)

First code will create a mask which will be used to set region for the subsequent calculation. Second code will create a copy of the original DEM (elevation map), however only to the extent of mask.

Clip the Elevation Data to Watershed Boundary

Figure 6.6: Clip the Elevation Data to Watershed Boundary

6.4 Create slope, aspect, plan and profile curvature

There are various ways to run various tools in Grass GIS. To create slope, aspect maps, we can do either of the following two methods:

  1. At the bottom of layer manager select console tab and write r.slope.aspect and Enter key. You may have to press Enter key two times. Or
  2. Click Menu Raster -> Terrain Analysis -> Slope and aspect as shown in the next figure.
Create Terrain Variables

Figure 6.7: Create Terrain Variables

We can create various terrain variables using this tool. We need to enter the input elevation map and output terrain variables.

  1. In the screen, select Required tab and select input as dem_clip from the drop down menu.
  2. Write the names of output map by selecting Outputs tab as shown in the next figure.
  3. Click Run button at the bottom of interface.

Alternatively, you can directly run following code from console:

r.slope.aspect slope=slope aspect=aspect pcurvature=profcurv tcurvature=tancurv

Create Slope Aspect from Console

Figure 6.8: Create Slope Aspect from Console

6.5 River distance Map

Distance to river can be output as raster map using following code.

r.grow.distance input=stream_2 distance=riverdist

It will create a raster, each cell of which represents the distance from nearest stream.

River Distance Raster

Figure 6.9: River Distance Raster