cityblocks
Python workflow to generate LCZ tiles for rendering in 3D in QGIS
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.9%) to scientific vocabulary
Repository
Python workflow to generate LCZ tiles for rendering in 3D in QGIS
Basic Info
Statistics
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
- Releases: 2
Metadata Files
README.md
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.
See our blog post and article in the IAUC newletter for the broarder context in which this was developed.
How to use
```sh
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:
Load layer in QGIS (we used 3.34.8 LTR)

Go to properties:

Load Style from cityblocks_LCZ.qml
You can modify the style as you like

Create a 3D map view

Browse through you Local Climate Zones Cityblocks!

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.

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

The tiles can also be combined with other map layers:

Owner
- Name: Urban-M4
- Login: Urban-M4
- Kind: organization
- Repositories: 1
- Profile: https://github.com/Urban-M4
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: cityblocks
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Peter
family-names: Kalverla
email: p.kalverla@esciencecenter.nl
affiliation: Netherlands eScience Center
orcid: "https://orcid.org/0000-0002-5025-7862"
- given-names: Maurice
family-names: Kleijn
name-particle: de
email: mtm.de.kleijn@gmail.com
affiliation: Netherlands eScience Center
orcid: "https://orcid.org/0000-0003-2379-191X"
- given-names: Tim
family-names: Tensen
email: timtensen@hotmail.com
affiliation: Independent
repository-code: "https://github.com/Urban-M4/cityblocks"
abstract: >-
Python utility to:
- Download global LCZ map from [Demuzere et
al.](https://zenodo.org/records/7670653).
- 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.
license: Apache-2.0
GitHub Events
Total
- Create event: 5
- Release event: 2
- Issues event: 7
- Watch event: 3
- Delete event: 2
- Issue comment event: 7
- Member event: 1
- Push event: 17
- Pull request review event: 2
- Pull request event: 7
Last Year
- Create event: 5
- Release event: 2
- Issues event: 7
- Watch event: 3
- Delete event: 2
- Issue comment event: 7
- Member event: 1
- Push event: 17
- Pull request review event: 2
- Pull request event: 7
Packages
- Total packages: 1
-
Total downloads:
- pypi 11 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: cityblocks
Python workflow to generate LCZ tiles for rendering in 3D in QGIS
- Documentation: https://cityblocks.readthedocs.io/
- License: apache-2.0
-
Latest release: 0.0.2
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- click *
- geopandas *
- numpy *
- rasterio *
- shapely *