This function generates an output vector file containing elevation levels (contour lines) from an input raster (see section for more information). To create contours from a DEM:

  1. Go to Raster.
  2. Select Extraction.
  3. Choose Contour.
  4. Specify the input DEM and the output vector file.
  5. Choose an appropriate interval between the different contours (e.g. 50 meters).
  6. Activate the first checkbox to store the elevation information within an attribute and specify a field name (Fig. 105).
  7. Click OK.
  8. Load the resulting vector layer into QGIS. 

To achieve better results for visualisation, a smoothing algorithm could be performed on the line feature, e.g. with the tool Simplify geometries (Vector > Geometry Tools > Simplify geometries) or the Generalizer plugin (Plugins > Generalizer > Generalizer).

Contour lines can also be created by the Contour plugin that provides some more options (e.g. minimal and maximal height). After the installation (see section 7.1.3.) it can be started in the menu Plugins > Contour > Contour.

Fig. 105. Compute elevation levels (isolines) based on a digital elevation model using the Contour function.