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:
Metadata
Release files for cityblocks 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cityblocks-0.0.2.tar.gz | 69.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cityblocks-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 141.0 kB
Release files / cityblocks-0.0.2.tar.gz
| Download URL | cityblocks-0.0.2.tar.gz |
|---|---|
| Size | 69.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0b3b2a50b14530622591bb6204f897121c2352481616df18b0b0f88fc7645ae
|
|
BLAKE2b-256 checksum How to use checksums |
61328955cff9a478f9e867ba1092fff263ca8f5402e743d842c0c06097cc3cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2024.
Transparency logRelease files / cityblocks-0.0.2-py3-none-any.whl
| Download URL | cityblocks-0.0.2-py3-none-any.whl |
|---|---|
| Size | 71.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3ed2c065e6e961c237d927d02673d902b41e83547563a03ca4083c573de6851
|
|
BLAKE2b-256 checksum How to use checksums |
9e165865f2cabcf0a22278b1001cea541e6f95f0521139d2f22c8b969b61d476
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2024.
Transparency log