I am pleased to announce another package in my suite of applications for civil engineers, LineTerra. LineTerra is a Wolfram Language geotechnics package designed for 3D road and route design, interactive terrain modeling, and earthworks analysis. You can find more details, documentation, and installation instructions on the LineTerra paclet repository page. See last section for all related packages in this suite.
LineTerra is a single-file Wolfram Language package (LineTerra.wl) for designing and quantifying earthworks. Its core method is to thread a cross-section template along an alignment and calculate its intersection with the existing ground. The template can be as complicated as wished, and any number of templates can be assigned along the route. Output includes plans, longitudinal and cross sections, quantities and charts – including a mass-haul diagram – and 3D views. The program is highly graphical and interactive: horizontal alignment (intersection points with circular or Bezier curves) and vertical profiles (grade points with parabolic K-value curves).
Once the section templates have been assigned, movement of the alignment in plan, or longitudinal section, immediately updates the plan, showing embankments and cuttings and the volumes; mass haul diagram etc. So a design can be fine-tuned quickly to minimise earthworks and cost. moves are reflected immediately in the charts, so a design can be fine-tuned quickly to minimise earthworks and cost.
In the early stages of a project, high-quality survey data is often not yet available, so, to stay useful throughout the design process, LineTerra accepts terrain from many sources. Work can be carried out in latitude/longitude or in national grid coordinates, and the grids of most countries are included.
After installation and loading the package with a simple Needs statement, it is called with LineTerra[“name”] statement. Like this.
In[]:=
LineTerra["name"]
Out[]=
Terrain is loaded from a GeoTiff file, a LAZ/LAS file, a surveyed xyz file or direct from Wolframs Geographic data by using Latitude and Longitudinal coordinates. Whilst the chosen file may only include elevation data Wolframs Geographics can be used to drape streetmap or satellite data as background to the terrain plan.
The Plan/Profile window is the main design surface. T
• Click anywhere on the plan to add a new Intersection Point (IP) .
• Drag an existing IP to move it–the profile, templates, sections and earthwork all recompute automatically .
• Each IP carries a radius and curve type, so the alignment rounds smoothly through it with a circular arc or Bezier curve instead of kinking .
• Drag an existing IP to move it–the profile, templates, sections and earthwork all recompute automatically .
• Each IP carries a radius and curve type, so the alignment rounds smoothly through it with a circular arc or Bezier curve instead of kinking .
The vertical profile along the centreline can then be abstracted and vertical intersection points added to provide a design level for the road.
A template of the proposed cross section is then designed. This can be any shape. Here is one showing a simple motorway cross section with different slopes depending whether it is in fill or cut.
The section type is assigned to a chainage range. Here we will have a bridge over the valley.
Then the cross sections are computed. One can be shown at any chainage
Clicking on earthworks and then compute will draw the plan of the road and its side slopes onto the plan. With Auto clicked, moving the plans ips or profile vips will instantaneously update the quantities and plan together. Making the economic design of the road’s earthworks simple and very quick.
At any time the background can be changed eg. to an aerial photograph. This would be normally be from the Wolframs Geographics library and is obtained automatically but could be from the an imported aerial photograph if required,
The road can be baked into the terrain to form a new terrain so that additional roads or platforms can be inserted.
In addition to roads, any convex polygon can be specified and quantities calculated.
Full export options are available of alignment, profile, earthworks plans and sections as csv, files, pdf files or dxf files as appropriate.
Although the above illustrate LineTerras by designing a road, the same procedure applies to a much wider range of earthworks tasks: obtaining a suite of cross - sections for slope - stability design, designing dams and calculating the volume of water they impound, laying out drainage networks, and pad design for building platforms.
Although the above illustrate LineTerras by designing a road, the same procedure applies to a much wider range of earthworks tasks: obtaining a suite of cross - sections for slope - stability design, designing dams and calculating the volume of water they impound, laying out drainage networks, and pad design for building platforms.
Related packages in this suite
Related packages in this suite
LineTerra[] is freely available as a function in the Wolfram function repository as an installable .paclet . At https://resources.wolframcloud.com/PacletRepository/resources/MalcolmWoodruff/LineTerra
If you like this programme or find it useful then you may find my other contributions of interest, they are all free to use, but I would recommend that you satisfy yourself as to their accuracy and suitability for your needs.
An Introduction to Mathematica for Civil Engineers :
https://www.notebookarchive.org/an-introduction-to-mathematica-for-civil-engineers--2025-03-cx2tujb/
https://www.notebookarchive.org/an-introduction-to-mathematica-for-civil-engineers--2025-03-cx2tujb/
Using finite elements to analyse structures in Mathematica:
https://www.notebookarchive.org/using-finite-elements-to-analyse-structures--2026-01-dtiqavj/
https://www.notebookarchive.org/using-finite-elements-to-analyse-structures--2026-01-dtiqavj/
Framica:- 3D space frame analysis
https://resources.wolframcloud.com/PacletRepository/resources/MalcolmWoodruff/Framica/
https://resources.wolframcloud.com/PacletRepository/resources/MalcolmWoodruff/Framica/
LineTerra:- Terrain data, earthworks, section design and quantification toolkit https://resources.wolframcloud.com/PacletRepository/resources/MalcolmWoodruff/LineTerra
TerraPercolatio:- Groundwater seepage analysis
https://resources.wolframcloud.com/PacletRepository/resources/MalcolmWoodruff/TerraPercolatio/
https://resources.wolframcloud.com/PacletRepository/resources/MalcolmWoodruff/TerraPercolatio/
TerraLapsus:- Limit equilibrium slope stability analysis
https://resources.wolframcloud.com/PacletRepository/resources/MalcolmWoodruff/TerraLapsus/
https://resources.wolframcloud.com/PacletRepository/resources/MalcolmWoodruff/TerraLapsus/
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
LineTerra geotechnics package: 3D road and route design, terrain modeling and earthworks
by Malcolm Woodruff
Wolfram Community, STAFF PICKS, October 9, 2026
https://community.wolfram.com/t/28263
by Malcolm Woodruff
Wolfram Community, STAFF PICKS, October 9, 2026
https://community.wolfram.com/t/28263