From GRASS-Wiki
Jump to navigation Jump to search


The module r.basin has been designed to perform the delineation and the morphometric characterization of a given basin, on the basis of an elevation raster map and the coordinates of the outlet. Here a tutorial based on NC sample dataset is presented.


As a first step, we set the computational region to match the elevation raster map:

g.region rast=elevation@PERMANENT -ap
projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      nad83
ellipsoid:  a=6378137 es=0.006694380022900787
north:      228500
south:      215000
west:       630000
east:       645000
nsres:      10
ewres:      10
rows:       1350
cols:       1500
cells:      2025000

For the basin's delineation, a pair of coordinates is required. Usually coordinates belonging to the natural river network don't exactly match with the calculated stream network. What we should do is calculating the stream network first, and then find the coordinates on the calculated stream network closest to the coordinates belonging to the natural stream network.

# Calculate drainage map
r.watershed -a elevation=elevation@PERMANENT accumulation=accum

# Extract the stream network
r.stream.extract elevation=elevation@PERMANENT accumulation=accum@testing threshold=20 stream_rast=stream_network

We no longer need the accumulation map:

g.remove rast=accum

Now that we have the calculated stream network, we should choose a pair of coordinates for the outlet belonging to it. Let's choose:

easting=636654.791181 northing=218824.126649

We no longer need the stream network map:

g.remove rast=stream_network

Usage of r.basin

We can run r.basin:

r.basin map=elevation@PERMANENT prefix=out easting=636654.791181 northing=218824.126649 threshold=20

Prefix parameter is a string given by the user in order to distinguish all the maps produced by every run of the program, i.e. every set of outlet's coordinates. Prefix must start with a letter. Threshold is the same parameter given in r.watershed and r.stream.extract. Physically, it means the number of cells that determine "where do the river begins". (This is an open issue for the hydrological science and a wide literature has been produced on the topic).


  • Rodriguez-Iturbe I., Rinaldo A.; Fractal River Basins, Chance and Self-Organization. Cambridge Press (2001)
  • Di Leo M., Di Stefano M., Claps P., Sole A.; Caratterizzazione morfometrica del bacino idrografico in GRASS GIS (Morphometric characterization of the catchment in GRASS GIS environment), Geomatics Workbooks, n. 9 (2010) [1]