Using the 2.5D renderer
The 2.5D renderer is a powerful new visualization for QGIS, which allows you to present buildings as three-dimensional shapes from a single angle. The locked viewpoint is why the developers named it 2.5D or 2 ½ D instead of full 3D. In this recipe, we'll render a small set of building footprints in 2.5D, with height values set as a shapefile attribute in the sample footprints.
Getting ready
Download the zipped building footprints shapefile from the following URL:
https://github.com/GeospatialPython/Learn/raw/master/buildings.zip
Extract it into a directory called hancock
in your qgis_data
directory.
How to do it...
We will create the vector layer, assign it the special renderer, configure the renderer, and finally add it to the map to see the result. We will be using a special set of properties that is normally reserved for labelling settings in QGIS:
- First, create the layer from the building footprints shapefile:
lyr = QgsVectorLayer("/qgis_data...