How to create and export cross section data in QGIS
For engineers working on transportation, civil, or environmental projects, extracting accurate terrain profiles is essential for design, calculations, and planning. In this tutorial, you’ll learn how to use the QGIS’s free cross section tool to generate precise elevation profiles from digital elevation models (DEMs) or contour lines. Unlike manual methods or expensive proprietary software, QGIS offers a free, open-source solution for creating georeferenced cross sections that can be exported for use in hydraulic modeling, road design, or slope stability analysis.
- Load DEM or Contour Data
- Adjust project properties
- Draw the profile line
- Export data

Step 1
Load DEM or Contour Data
Data you’ll need for this analysis:
High-Resolution DEM: You will need a high-quality Digital Elevation Model (DEM). For accurate aspect calculations, especially in developed or complex terrain, we recommend using a high resolution source. You can download LiDAR derived DEMs from public repositories or use Equator’s data menu to access curated, ready to use DEMs for your site.
Contour Data: Contour lines can also provide the elevation data required. The accuracy of the elevation profile depends on the interval of the contour lines. Equator offers high quality and easy to customize contour data.
Drag and drop the .TIF or .GPKG files into QGIS’s main workspace to begin.

2m resolution DEM of Death Valley, California
Step 2
Adjust Project Properties
To ensure that your project is correctly obtaining data from DEM:
Project → Properties → Elevation → Terrain → Change the type from Flat terrain to DEM
Once changed, hit apply and close the tab.

Change Terrain type to DEM
Step 3
Draw the profile line
The elevation profile is plotted in a window where the vertical line that shows height information and horizontal line that shows the distance from the beginning of the elevation profile line.
When you hover over a point the profile, a black dot on the main line also moves. Make sure you save or export the data, anything that you created is not automatically saved and will be removed once you close the elevation profile view.

Example of profile line with elevation data
If you do not have a pre-existing reference line layer:
Use capture curve tool in the new Elevation Profile toolbar to draw your line onto your DEM layer by left clicking 2 or more points. Then, right click to complete.

If you have a reference vector line layer loaded:
Use capture curve from feature tool in the new Elevation Profile toolbar and click on the reference line. It will automatically create a profile line from the existing feature line.

Step 4
Export the Data
In the Elevation Profile window, the export button provides three export options:
- 3D Features – Exports the profile line as 3D cross-sections.
- 2D Profile – Exports the profile as a chart/image.
- Distance/Elevation Table – Supports many formats such as CSV, DXF and KML that can be used in programs such as Excel. It exports the sampled distance vs elevation values as a table which could be used for further analysis.

Export options








