User Tools

Site Tools


qgis_contours

This is an old revision of the document!


Contours

Basic Processing

There are various contour extraction algorithms in QGIS, for example:

  • GDAL : Raster Extraction : Contour (same as Raster → Extraction → Contour…)

Below is an example of contours created without and with sink removal. The contours on the right have been derived from a DEM where the sinks (in yellow on the left) have been filled.

Simplifying

Vectors can be compressed by using something like:

  • Vector geometry : Simplify

A tolerance of 1(m) seems reasonable for 1:25000 mapping. Smaller tolerances may be appropriate for larger scale maps (eg 1:10000, 1:5000).

For more options in compression, look at:

V.generalize can also be used to smooth contours - possibly best done prior to simplificiation

Cleaning

Once simplified, it is worth removing small closed loops, such as those in the image below.

Here is one approach, which involves adding a length attribute to each contour, and removing those that fall below a certain length. It may cause issues if you have short sections of contour near the edge of the map that you need.

  • Open Attribute Table (F6)
  • Open field calculator (Ctrl+I)
  • Add new attribute length, calculated as $length

  • Select all features and filter on length < 25 (or whatever length is appropriate for your scale)

Contour Labelling

See separate page on QGIS Contour Labelling

qgis_contours.1613513573.txt.gz · Last modified: 2021/02/17 09:12 by bushwalking

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki