Tutorial: Getting height maps from QGIS

QGIS is an application that can build and change maps. It is free open source software and can be downloaded from the QGIS website. It runs on Linux, MacOS X, and Windows. In this tutorial I will show you how to use it to export height maps. To follow along install QGIS, and download a heightmap of Christchurch. The tutorial is contained in the slides above.

This tutorial shows a simple method for extracting heightmaps, but it is limited to the resolution of your screen. QGIS's Print Composer can provide higher resolution heightmaps.

The reason for using QGIS is that it can open a variety of Data Elevation Model (DEM) file formats. In the modelling world DEMs are known as height maps. What makes these formats special is that they are arrays, with each cell containing a height. These heights can be just numbers, or represented in grayscale. These values can be from 0 to anything. QGIS can export using common graphic formats, like .png, .bmp, .jpg, tiff.

Some formats may only have 256 colours in each channel. This maybe inherent in the source artwork, or maybe limited by your hardware. QGIS can help you make the most of these limited DEMs. If you had a mountain that was 2560m high, each shade of grey would equal 10m. If that mountain was on a plataeu, that was itself 2560m high, it'd be 5120m. Then each shade would be 20m. QGIS can fix this. QGIS will do it automatically if you choose Layer > Properties > Current Extent. This will find the lowest and highest point visible on screen and adjust the Custom min / max values. This will produce a more accurate height map.

Current extent - QGIS

Or you can manually choose a custom minimum and maximum height. In this case you would set the Min to 2560 and Max to 5120.

These exported heightmaps can then be used to create 3d models. You can do this with any good 3d modelling software. I do this using, the free software, Blender. You can see how I do it in my tutorial Make mountains in Blender 2.5 from height maps.

John, your QGIS tutorials are very helpful, thank you. Cheers, Matt

You're welcome.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
a
B
1
f
N
W
Enter the code without spaces and pay attention to upper/lower case.
Syndicate content