Skip to content

Python workflow to generate LCZ tiles for rendering in 3D in QGIS

License

Notifications You must be signed in to change notification settings

Urban-M4/cityblocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOI PyPI - Version Research Software Directory

Cityblocks

Python utility to:

  • Download global LCZ map from Demuzere et al..
  • Extract an area of interest
  • Generate a new dataset where each pixel is replaced by a 2D tile corresponding to the LCZ type

The generated file can be displayed in QGIS to create stunning visualizations in 3D.

How to use

# Install the tool
pip install cityblocks

# Download global LCZ data. 
cityblocks download

# Extract area of interest
cityblocks extract "4.724808,52.273620,5.182114,52.458729"

# Convert LCZ data to 2d tiles
cityblocks convert

Data is downloaded in folder where the command is executed.

QGIS styling

Then, import the dataset in QGIS and visualize it. We created a QGIS styling file cityblocks_LCZ.qml, which you can load as follows:

  1. Load layer in QGIS (we used 3.34.8 LTR) Load layer in QGIS

  2. Go to properties: Go to properties

  3. Load Style from cityblocks_LCZ.qml Load style

  4. You can modify the style as you like modify the style

  5. Create a 3D map view Create a 3D map view

  6. Browse through you Local Climate Zones Cityblocks! Go to properties

Note that you can add styled 2D layers in your QGIS environment to show them in your 3D render.

Example output

The file generated by the cityblocks command line utility looks like this when imported in QGIS.

2d version of LCZ tiles

By extruding the surface and applying a bit of styling, we can generate images like below:

3d version of LCZ tiles

The tiles can also be combined with other map layers:

3d tiles with background image

About

Python workflow to generate LCZ tiles for rendering in 3D in QGIS

Resources

License

Stars

Watchers

Forks

Packages

No packages published