Creating Elevation Cross-Section Profiles with QGIS

Jeff Oppong


GIS software can be used to understand how elevation changes across a landscape and look at topographic features. QGIS, an open source GIS software program, has interactive tools for making cross-sectional maps from elevation data. This method makes it possible to see and rate changes in elevation along defined paths or transects. It gives relevant information about the land’s features applicable in many cross-functional fields, like geography, geology, environmental science, and building planning.

To make cross-sectional profiles with QGIS, you need to use elevation data, usually in the form of Digital Elevation Models (DEMs) or terrain models, to get elevation values along defined paths or lines. These profiles show how the landscape changes in height, slope, and other features along the chosen path. QGIS users start this process by drawing a line or path of interest on the map. The elevation values along this line are used then by QGIS to make a detailed cross-sectional profile. In this profile, the changes in elevation are shown visually, giving a better idea of the shape and variations of the land.

The cross-sectional profiles derived are used in many different fields for different reasons. These profiles help people who study geography and geology figure out landscapes, geological formations, and the structure of the Earth’s surface below. These profiles are used by environmental scientists to look at slope characteristics, erosion trends, and how the landscape changes over time. Cross-sectional profiles are also used by urban planners and infrastructure developers to plan transportation routes, check if a site is good for building projects, and find any possible dangers or problems with the terrain.

Numerous benefits can be gained from using QGIS to make cross-sectional maps. Its easy-to-use interface and ability to work with different elevation datasets make it a tool that professionals and researchers can all use. Also, QGIS’s analyzing tools make it possible to get accurate elevation data, which helps people make better decisions when they are doing different kinds of spatial analysis and planning.

Free weekly newsletter

Fill out your e-mail address to receive our newsletter!

This tutorial explores the fundamental process of creating a cross-sectional profile from elevation data using the Profile tool and SRTM-downloader plugins in QGIS. Figure 1 shows the geospatial flow employed in this tutorial to import Open Street Map as a base layer, download elevation from NASA’s portal using the SRTM downloader plugin, and create cross-sectional profiles from the elevation data.

A black and white flow model showing the inputs for creating elevation cross sections in QGIS.
Figure 1: Summary of the geospatial methodology and tools used in creation cross section profiles with elevation data in QGIS.

Installing OpenStreetMap plugin in QGIS

To better visualize our datasets, OpenStreetMap will be used as a base layer for our analysis. To import OSM:

  1. Launch QGIS.
  2. From the Project tab on the menu bar, select New to create a new project. 
  3. From the Project tab on the menu bar, select Save as to save the project. 
Screenshot showing the menu option for creating a new project in QGIS.
Figure 2: Creating and saving a new project in QGIS.
  1. Select Plugins from the QGIS menu bar.
  2. Select Manage and install plugins. 
  3. From the search bar of the Plugins window, type and search QuickMap services. 
  4. Select Upgrade to download a new version of the plugin, where applicable. 
  5. Click install to install the QuickMap services plugin. 
Screenshot showing the QuickMap plugin screen in QGIS.
Figure 3: Upgrading and installing the QuickMap services plugin.
  1. From pool of tools on the menu bar, select web. 
  2. Toggle to QuickMap services and select OSM to import the OSM base map. 

Alternatively, OSM can be imported by using “XYZ tiles” tool;

  1. Right-click on any aspect of the menu bar.
  2. From the pool of toolbars, ensure that the Browser toolbar is checked. 
  3. From the Browser toolbox, right-click on XYZ tiles and select New connection. 
  4. Set Name to OpenStreetMap and set URL to{z}/{x}/{y}.png.
Screenshot showing the XYZ Connection interface in QGIS.
Figure 4: Adding the OSM tile.
  1. Click Ok to add the OSM tile to the XYZ tiles.
  2. Drag the OSM tile onto the Layers window to display the OSM as a base map. 

Downloading and installing the SRTM downloader plugin for use 

The elevation dataset (Digital Elevation Model) will be accessed from the NASA’s portal under the Shuttle Radar Topography Mission (SRTM). To install the STRM downloader for use in downloading DEM data;

  1. Select Plugins from the menu bar.
  2. Select Manage and install plugins. 
  3. From the search bar of the Plugins window, type and search STRM-downloader. 
  4. Select Upgrade to download a new version of the plugin, where applicable. 
  5. Click install to install the SRTM downloader plugin. 
Screenshot showing the SRTM-downloader plugin interface for QGIS.
Figure 5: Upgrading and installing the SRTM-downloader plugin.
  1. From the QGIS menu bar, select Plugin. 
  2. Select SRTM-downloader. 
  3. Toggle to your location of interest. 
  4. From the SRTM-downloader window, click set Canva extent. 
  5. Set Output path to your desired location folder where the SRTM is to be saved. 
  6. Click Download. 
  7. A window appears requesting for your Earthdata login. You will need to register for the NASA Earthdata portal’s Earthdata Login User Registration
  8. Key in the generated login details from Earthdata’s portal into QGIS login window.
  9. Click Ok to download the elevation data. 
Screenshot showing the SRTM downloader interface in QGIS.
Figure 6: Downloading SRTM (elevation) data using the SRTM-downloader plugin.

installing the profile tool plugin for creating elevation cross-sections in qgis

To download the Profile tool plugin for drawing cross-sectional profiles over the elevation data (SRTM);

  1. Select Plugins from the menu bar.
  2. Select Manage and install plugins. 
  3. From the search bar of the Plugins window, type and search Profile tool. 
  4. Select Upgrade to download a new version of the plugin, where applicable. 
  5. Click install to install the Profile tool plugin. 
  6. From the menu tabs, select Plugins.
  7. Select Profile tool.
  8. Select Terrain profile. 
Screenshot showing  the location of the Terrain cross-section tool in QGIS.
Figure 7: The location of the Terrain cross-section tool in QGIS.
  1. From the Terrain profile window, select Add layer. 
  2. Select the SRTM dataset from the list of your data layers.
Screenshot showing a grayscale digital elevation model with a red line.
Figure 8: The red line indicates where the elevation profile will be generated.
  1. Use the drawing tool within the Profile plugin to draw a line across the area where you want the elevation profile. Use the mouse pointer to specify a line on the map canvas over the SRTM data where you would want a cross-sectional profile to be drawn. Start at one location and then click at the end location – the resulting red line represents where data for the elevation cross-section will be collected from the SRTM data.
Screenshot showing a project in QGIS with a grayscale digital elevation model and an elevation profile.
Figure 9: Cross-sectional profile drawn around Paula in Kansas City, US. The red line on the map was created using the mouse pointer. The graph below also shows the cross-sectional profile drawn from elevation in the area.

After drawing the line, the Profile plugin will display a graph. This graph shows the elevation along the line you drew. The x-axis of the graph represents the distance along the line, and the y-axis shows the elevation.

The elevation profile can be analyzed directly within QGIS. You can hover over the graph to see specific elevation values at different points in the map view. The graph will display a tooltip with X and Y values with a corresponding red dot in the map view showing the location.

If needed, you can export the profile to various formats for further analysis or reporting. The Profile tool in QGIS can be used for analyzing cross-section profiles for all types of surface data, not just elevation.

Photo of author
About the author
Jeff Oppong
Jeff Oppong holds a BSc in Geomatic Engineering and currently a graduate student at Hohai University in China, where he's studying MSc. Harbor, Coastal, and Offshore Engineering. Jeff is a prolific researcher and a GIS/Remote sensing expert who aspires to be a change-agent and a renowned Engineer. Jeff Oppong can be contacted via email