An add-on tool for computational terrain modeling in GRASS. This is the repository for development version. The stable release is in the GRASS Addons Repository. To learn more see the paper, documentation, and tutorials.
Install the stable release:
g.extension extension=r.earthworksInstall the development version:
g.extension extension=r.earthworks url=https://github.com/baharmon/r.earthworksTo grade a road crossing over a valley in the North Carolina sample dataset, run:
g.region n=217700 s=216200 w=639200 e=640700 res=10
r.earthworks elevation=elevation earthworks=earthworks lines=roadsmajor z=95 function=linear linear=0.25 operation=fill flat=25
r.contour input=earthworks output=contours step=2| Elevation | Earthworks |
|---|---|
![]() |
![]() |
Learn how model terrain with r.earthworks. With this tool you can generate new terrain or modify existing terrain using cut and fill operations inspired by earthworking. The first tutorial on the basics of terrain modeling introduces key concepts such as cut and fill operations. The subsequent tutorials introduce more advanced concepts such as relative operations and growth and decay functions. These tutorials demonstrate how to generate terrain, model natural landforms, and model anthropogenic landforms - i.e. earthworks - such as roads, dams, and levees. Read our paper to learn more.
Learn the basics of terrain modeling with r.earthworks.
Model gullies using relative cut operations.
Model coastal infrastructure projects including levees and restored alluvial ridges.
Synthesize terrain by applying landforms from one landscape to another.






