Modeling topography¶
Computing slope and aspect¶
Topographic slope and aspect map can be created by r.slope.aspect.

Fig. 39 Topographic slope map visualized in 3D with clipped contours.
Such map can be classified using r.recode into defined classes. Example:
0:2:1
2:5:2
5:8:3
8:15:4
15:30:5
30:*:6
Note
Categories can be labeled by r.category, result is shown on the figure bellow.
1:0-2 deg
2:2-5
3:5-8
4:8-15
5:15-30
6:30-*

Fig. 40 Reclassified slope map with legend.
Curvatures¶
Concavity/convexity of terrain can be explored with curvatures computed by r.param.scale. Example:
# profile curvature
r.param.scale input=dem37 output=profc37 method=profc size=11
# tangential curvature
r.param.scale input=dem37 output=crosc37 method=tangc size=11
Landform identification¶
Landforms (ridge, valley, …) can be obtained from curvatures
computed by r.param.scale (method=feature
). The
modern method based multiscale line-of-sight approach is implemented
by r.geomorphon addon.
Note
Addons are not part of GRASS distribution and can be installed from menu g.extension command.
, or byExample:
r.geomorphon elevation=dem37 forms=landforms37 search=16 skip=6

Fig. 41 Landsform visualization in 3D.
Solar radiation and shades¶
Based on slope and aspect maps can be computed solar irradiation (daily radiation sum in Wh/m2.day) for a given day using r.sun:
# day=1 -> 1.1.
r.sun elevation=dem37 slope=slope37 aspect=aspect37 beam_rad=beam37 step=1 day=1
r.colors -e map=beam37 color=grey
Note for advanced users
Computation can be very slow. Check for paralelization efforts.
Than we can also compute solar irradiance (W/m2) for a given day and hour (in local solar time) and extract the shades cast by topography:
r.sun elevation=dem37 slope=slope37 aspect=aspect37 beam_rad=beam37_8 day=1 time=12
r.colors -e map=beam37_12 color=grey

Fig. 42 Solar irradiance (W/m2) 1.1. 12 a.m.
Visibility analysis¶
Visibility analysis can be perform in GRASS by r.viewshed, see example on the figure below.

Fig. 43 Visibility analysis perform in GRASS GUI.
Cost surface and least cost path¶
In this example we perform least cost path analysis with slope as cost. Example:
r.cost -k input=slope37 output=cost37 outdir=outdir37 start_coordinates=533072,5626854
r.colors map=cost37 color=gyr
r.drain -d input=cost37 output=drain37 direction=outdir37 drain=drain37 start_coordinates=532046,5626889

Fig. 44 Least cost path example.