3D Tiles in QGIS

NOVEMBER 16, 2023 3d cesium qgis

Earlier this year, in collaboration with North Road we were awarded a grant from Cesium to introduce 3D tiles support in QGIS. The feature was developed successfully and shipped with QGIS 3.34.

In this blog post, you can read more about how to work with this feature, where to get data and how to display your maps in 2D and 3D. For a video demo of this feature, you can watch Nyall Dawson’s presentation on Youtube.

What are 3D tiles?

3D tiles are a specification for streaming and rendering large-scale 3D geospatial datasets. They use a hierarchical structure to efficiently manage and display 3D content, optimising performance by dynamically loading appropriate levels of detail. This technology is widely used in urban planning, architecture, simulation, gaming, and virtual reality, providing a standardised and interoperable solution for visualising complex geographical data.

Examples of 3D tiles:

3D tiles of Zurich from Swisstopo

Data from Swisstopo (https://map.geo.admin.ch/)

Washington - 3D Surface Model (Vricon, Cesium)

Washington - 3D Surface Model (Vricon, Cesium)

3D tiles in QGIS

To be able to use 3D tiles in QGIS, you need to have QGIS 3.34 or later. You can add a new connection to a 3D tile service from within the Data Source Manager under Scene:

Adding a new 3D tile service from Data Source Manager in QGIS

Adding a new 3D tile service from Data Source Manager in QGIS

Alternatively, you can add the service from your Browser Panel:

3D tiles data provider in the Browser panel

3D tiles data provider in the Browser panel

To test the feature, you can use the following 3D tiles service:


Name: 3D Tiles example
URL: https://pelican-public.s3.amazonaws.com/3dtiles/agi-hq/tileset.json

Creating a new connection to a 3D tiles service

Creating a new connection to a 3D tiles service

You can then add the map from the newly generated connection to QGIS:

Adding a new 3D tiles to QGIS

Adding a new 3D tiles to QGIS

By default, the layer is styled using texture, but you can change it to see the wireframe mesh behind the scene:

3D tiles’ mesh wireframe

3D tiles’ mesh wireframe

You can change the mesh fill and line symbols similar to the vector polygons. Alternatively, you can use texture colors. This will render each mesh element with the average value of the full texture. This is ideal when dealing with a large dataset and want to get a quick overview of the data:

3D tiles with texture color for meshes

3D tiles with texture color for meshes

To view the data in 3D, you can open a new 3D map. Similar to 2D map, by zooming in/out, finer resolution tiles will be fetched and displayed:

Using data from Cesium ion

Cesium ion is a cloud-based platform for managing and streaming 3D geospatial data. It simplifies data management, visualisation, and sharing.

To add 3D tiles from Cesium ion, you need to first sign up to their service here: https://ion.cesium.com/tokens

Under Asset Depot, you will see a catalogue of publicly available datasets. You can also upload your own 3D models (such as OBJ or PLY), georeference them and get them converted to 3D tiles.

You can also add one of the existing tile service under https://ion.cesium.com/assetdepot and select the tile service and then click on Add to my assets:

Adding an existing dataset to your Cesium ion assets

Adding an existing dataset to your Cesium ion assets

You can use the excellent Cesium ion plugin by North Road from the QGIS repository to add the data to QGIS:

Adding Cesium ion assets to QGIS

Adding Cesium ion assets to QGIS

Working with Google 3D data

In addition to accessing Google Photorealistic 3D tiles from Cesium ion, you can also add the tiles directly in QGIS. First you will need to follow the instructions below and obtain API keys for 3D tiles: https://developers.google.com/maps/documentation/tile/cloud-setup

During the registration process, you will be asked to add your credit card details. Currently (November 2023), they do not charge you for using the service.

Once you have obtained the API key, you can add Google tiles using the following connection details:

Adding Google 3D tiles in QGIS

Adding Google Photorealistic tiles in QGIS

Notes and remarks

  • Adjusting map extents for large scenes

When dealing with large scenes, map extents should be set to a smaller area to be able to view it in 3D. This is the current limitation of QGIS 3D maps as it cannot handle scenes larger than 500 x 500 km.

To change the map extent, you can open Project Properties and under View Settings change the extent. In the example below, the map extent has been limited only to a part of London, so we can view Google Photorealistic tiles in the 3D map without rendering issues.

Limiting project extent in QGIS

Limiting project extent in QGIS

3D tiles from Google in QGIS

3D tiles from Google in QGIS
  • Network cache size

If you are handling a large dataset, it is recommended to increase network cache size to 1 GB or more. The default value in QGIS is much lower and it results in slower rendering of the data.

Increasing Cache size in QGIS for faster rendering

Increasing Cache size in QGIS for faster rendering
  • Overlaying other 3D data

When you try to overlay other data sets on top of a global 3D tiles, the vertical datum might not match and hence you will see the data in the wrong place in a 3D map. To fix the issue, you may need to use elevation offsetting to shift the data along the Z axis under Layer Properties:

Offsetting elevation of a layer in QGIS

Offsetting elevation of a layer in QGIS

Future works

This is the first implementation of the 3D tiles in QGIS. For the future, we would like to add more features for handling and creation of the 3D tiles. Our wishlist in no particular order is:

  • Globe view: QGIS 3D cannot handle large scenes or unprojected views.
  • More advanced styling of meshes: as an example, users will be able to create their own style.
  • 3D In-door navigation: as an example users will be able to navigate inside buildings and potentially it will bring BIM data closer to QGIS
  • Generation of 3D tiles inside QGIS: adding a processing tool in QGIS to generate 3D Tiles from your map data.

Styling of 3D tiles

Styling of 3D tiles (image from https://cesium.com/learn/ion/stories-styling/)

If you would like to see those features in QGIS and want to fund the efforts, do not hesitate to contact us.


Posted by Martin Dobias, Saber Razmjooei