Python workflow to generate LCZ tiles for rendering in 3D in QGIS
Project description
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 git+https://github.com/Urban-M4/cityblocks.git
# 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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cityblocks-0.0.2.tar.gz
.
File metadata
- Download URL: cityblocks-0.0.2.tar.gz
- Upload date:
- Size: 69.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0b3b2a50b14530622591bb6204f897121c2352481616df18b0b0f88fc7645ae |
|
MD5 | 5ec5e43024dd7cb11a648eebd6f1abca |
|
BLAKE2b-256 | 61328955cff9a478f9e867ba1092fff263ca8f5402e743d842c0c06097cc3cbb |
Provenance
The following attestation bundles were made for cityblocks-0.0.2.tar.gz
:
Publisher:
pypi.yml
on Urban-M4/cityblocks
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
cityblocks-0.0.2.tar.gz
- Subject digest:
b0b3b2a50b14530622591bb6204f897121c2352481616df18b0b0f88fc7645ae
- Sigstore transparency entry: 153272025
- Sigstore integration time:
- Permalink:
Urban-M4/cityblocks@3484149c25cc1dba1d2fe473fe00bb9899ef3c96
- Branch / Tag:
refs/tags/v0.0.2
- Owner: https://github.com/Urban-M4
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
pypi.yml@3484149c25cc1dba1d2fe473fe00bb9899ef3c96
- Trigger Event:
release
- Statement type:
File details
Details for the file cityblocks-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: cityblocks-0.0.2-py3-none-any.whl
- Upload date:
- Size: 71.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3ed2c065e6e961c237d927d02673d902b41e83547563a03ca4083c573de6851 |
|
MD5 | 095fc65aa94d956662cf838fdf39de31 |
|
BLAKE2b-256 | 9e165865f2cabcf0a22278b1001cea541e6f95f0521139d2f22c8b969b61d476 |
Provenance
The following attestation bundles were made for cityblocks-0.0.2-py3-none-any.whl
:
Publisher:
pypi.yml
on Urban-M4/cityblocks
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
cityblocks-0.0.2-py3-none-any.whl
- Subject digest:
a3ed2c065e6e961c237d927d02673d902b41e83547563a03ca4083c573de6851
- Sigstore transparency entry: 153272027
- Sigstore integration time:
- Permalink:
Urban-M4/cityblocks@3484149c25cc1dba1d2fe473fe00bb9899ef3c96
- Branch / Tag:
refs/tags/v0.0.2
- Owner: https://github.com/Urban-M4
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
pypi.yml@3484149c25cc1dba1d2fe473fe00bb9899ef3c96
- Trigger Event:
release
- Statement type: