Franz's blog

River profiles in QGIS

One of the most used geomorphic parameters (both directly or to derive other parameters) is the river profile. Sometimes the estimation of this parameter can be cumbersome to some users even with all the information available nowadays.

In this brief tutorial we will learn how to derive a river profile, based on a Digital Elevation Model and a free Profile Tool plugin (in QGIS you can install directly from: Plugins > Management and install plugins > Profile tool).

In the next figure you can see the location of a river over the DEM for a region in Europe. The altitudinal data was downloaded from the SRTM website at 30 m. resolution.


The blue line represents the main water course (derived from the same DEM) and in red the catchment limits.

The derivation linear profiles using the QGIS profile tool is quite straightforward. With the DEM selected (in the layers list) click on the Terrain profile plugin icon:

The plugin window will be displayed, and the selected DEM will be shown in plugin’s the layers list:

Terrain profile

As mentioned the use of the tool is quite easy, it has two modes of getting altitudinal information, the first one consists in directly drawing a polyline in the map view (Temporary polyline option, of course inside the areas with information) and the second one consists in the use of a predefined line like a shapefile with the line features of interest (Selected polyline) in this exercise we will use the second option. Previously I prepared a shapefile with the main water course in one single segment.

When you choose the first option, and directly draw a line in the map view (line in red) it will automatically create a profile for that line, and the breaks in the temporary line will be shown in the profile as vertical black lines (see next figure).

  Fundamentals of Remote Sensing Tutorial PDF

Terrain profile of line

It is quite easy but as mentioned the lines are temporary and will be deleted as soon as the plugin is closed or a new line is drawn.

For the second method as I said you require a linear feature (I will use a river) and here is the tricky part (at least for me it was), before obtaining the profile you must select the vector layer in the QGIS’ layers list. Then with the Selected polyline option active in the plugin, you can directly select the line of your interest and the profile will be automatically drawn as shown in the next figure.

River profile in QGIS

When a linear feature was successfully selected it turns yellow and the profile is shown in the plugin’s window.

One of the advantages of this plugin is the possibility to directly export the profile to pdf, svg, psd or png formats or even better directly to a useful electronic sheet (MS Excel, OpenOffice, etc) for further processing.

And that’s it! We now know how to easily derive a river profile (or other linear features) using a free plugin (do not forget to thanks the developers) and QGIS.

Recommendations and tips

  • Not only altitudinal information can be used, indeed you can get a profile using other raster files aside DEMs.
  • One disadvantage is that you cannot directly control the distance of sampling it works pretty will but sometimes this functionality would be useful.
  • Make sure that your linear feature is correctly processed in order to avoid problems in the profile.
  • Depending of the source of altitudinal information, noise can be present in the profile which can be corrected (if required) using an external application like Excel, or a Matlab script.

Written by: Marlon Calispa

One thought on “River profiles in QGIS”

  1. Josh says:

    Is there a way to do longitudinal profiles using the entire drainage-network draining into a point?
    Ideally I would like to have a “Distance upstream from common pour point” vs “Elevation” for each segment/branch of the stream. – There could be several hundred, so doing it manually would take too much time.

Comments are closed.