Create smooth contour lines in QGIS

Create smooth contour lines in QGIS

Step by Step Guide

October 12, 20232 min read

In the realm of GIS (Geographic Information Systems), contour lines are graphical representations connecting points of the same elevation on a topographic map. These lines portray the shape and elevation of terrain, making them crucial for land-use planning, environmental assessment, and navigation. Contour lines provide a clear visualization of a region's topography, helping professionals and researchers understand geographic features and make informed decisions.

Well-designed maps are more likely to capture the viewer's attention and leave a lasting impression, making the information they convey more accessible and memorable.

A Gaussian filter in GIS is a smoothing technique that reduces noise and sharpens data by applying a weighted average, emphasizing central values while diminishing outliers, improving data quality.

Here is step by step guide on how to create smooth contour lines.

HAPPY MAPPING!!!

DATA USED: SRTM DEM

Let first see how contour lines from original DEM look like.

STEP 1: Add DEM data to QGIS (This DEM data I added here is that of Mount Everest).

1. Add DEM data
1. Add DEM data
STEP 2: Create contour using Contour tool. To locate the contour tool, follow this step;

Raster tab >>Extraction>>Contour

2. Locate contour
2. Locate contour
Then, Set up the contour ; input the DEM and set the interval between contour lines. I used 20 as interval. You can use any value you want but have it in mind that "the higher the value, the less the contour lines, the lower the value, the more the contour lines.

Hit the Run button

3. Contour settings
3. Contour settings
4. Result
4. Result
The result is not satisfying. If you zoom in to see the contour lines, They have some kind of sharp edges. We need perfectly curve contour lines(no sharp edges), so we are going to smooth the DEM first. Using Gaussian Filter tool

STEP 3: To access the Gaussian Filter tool, we need to firstly activate the SAGA GIS plugin via

Plugins tab >>Manage and Install Plugins>> All >> SAGA GIS provider

5. Activate SAGA plugin
5. Activate SAGA plugin
After activating, Locate SAGA on Processing Toolbox and navigate to Gaussian Filter as seen in the image below or you can simply search for Gaussian Filter using the Processing Toolbox search box
6. Gaussian Filter
6. Gaussian Filter
STEP 4: Set up the Gaussian Filter for the DEM and hit the Run button
7. Gaussian Filter setting
7. Gaussian Filter setting
8. Result
8. Result
STEP 5: Let create Contour from our new filtered DEM. Follow STEP 2 to locate the contour tool. Input the filtered DEM as layer, set interval between lines to 20(read STEP 2).Hit the Run button
9. Contour settings
9. Contour settings
10. Result
10. Result

If you find this article helpful, you can hit the like button.

You want to ask me some questions? You can reach me via this Link

contourDEMmodern mapQGISTopographic

Join the community!

We're a place where geospatial professionals showcase their works and discover opportunities.

More from Balogun Temitope

Explore More Articles