Skip to main content

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:

  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

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)

Source distribution for cityblocks 0.0.2
File Size Uploaded
cityblocks-0.0.2.tar.gz 69.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cityblocks 0.0.2
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page