Creating 3D map in QGIS

Update: If you‘re interested in a guide to 3D visualisation in new QGIS 3.0, check this text.

If you’re looking for information specifically about displaying 3D buildings in QGIS, follow this link.

Some time ago I found a text with a tutorial how to use QGIS plugin, Qgis2threejs. The QGIS tool allowing to view 3D objects in a web browser interested me enough that I decided to try it out. To create a 3D map with this plugin, you need only terrain data. Optionally, the 3D surface can be overlaid with map image or vector data. In this text, I want to share my workflow and results I got. When creating my own 3D maps, I chose to focus on two areas, California region and Rome.

Image for post
Image for post

Obtaining the data

With Qgis2threejs plugin, it is possible to include in your 3D map points, lines and polygons. If you need e.g. roads or land use shapefiles, check free OpenStreetMap data. I chose to overlay elevation data also with some old printed maps. Again, NLS service provides very useful data. From this website, you can download old basic and topographic maps for free. Other great sites worth checking are David Rumsey Map Collection and Mapster.

California 3D topography

Image for post
Image for post

Next, from Web menu, I opened Qgis2threejs plugin. In DEM settings, I set Dem layer to virtual raster I built and enabled clipping DEM with polygon layer that marked the extent of the area. For Display type, I left default Map canvas image. In World settings, I tested different values for Vertical exaggeration and finally set it to 5.

Since the plugin allows to add vector data to 3D map as well, I downloaded OpenStreetMap dataset for my region. I decided to add major roads and city locations to my map. In Point and Line settings of Qgis2threejs plugin, I selected appropriate layers. After trying different styles for vector data and adding labels with city names, my 3D map was finally ready.

Image for post
Image for post

Rome old topographic map in 3D

Georeferencing a map

Image for post
Image for post
QGIS Georeferencer

Georeferencing in QGIS is done with Georeferencer plugin. This tool will generate world file for the raster map you want to use. In David Rumsey Map Collection I found a topographic map of Rome from 1870 and decided to use it for this tutorial. I also had to georeference my map before creating a 3D map. First, I added OpenStreetMap basemap to QGIS project. Then, in Georeferencer, I opened Rome map and just clicked in a specific point. When a dialog box appeared, I selected From map canvas option. Next, I clicked on the same point on OSM map in main QGIS window and choose Ok. When georeferencing a map, I suggest to use at least 4 reference points and choose only points that are easily detectable on both maps and which location haven’t changed throughout the years.

When I had a georeferenced map, I opened Qgis2threejs plugin and selected appropriate DEM layer. I left default Map canvas image option selected and chose 400% resolution. Again, I clipped DEM with map extent polygon. This time I set Vertical exaggeration to 2 and clicked Run. Below you can find the result I got.

Image for post
Image for post

What to read next

  • For information on how to create 3D models with your smartphone check this text
  • If you’re interested in indoor navigation, check the text about SLAM

Test Pointscene today

The Pointscene Diaries

A place where you’ll find information and advice on modern…

The Pointscene Diaries

Written by

The Pointscene Diaries

A place where you’ll find information and advice on modern mapping data. Through my work at Pointscene, in a series of articles I’ll address issues related to sharing and managing point clouds, 360 photos and vector data. Learn more at www.pointscene.com

The Pointscene Diaries

Written by

The Pointscene Diaries

A place where you’ll find information and advice on modern mapping data. Through my work at Pointscene, in a series of articles I’ll address issues related to sharing and managing point clouds, 360 photos and vector data. Learn more at www.pointscene.com

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store