cityblocks

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

https://github.com/urban-m4/cityblocks

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
Last synced: 10 months ago · JSON representation ·

Repository

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

Basic Info
  • Host: GitHub
  • Owner: Urban-M4
  • License: apache-2.0
  • Language: QML
  • Default Branch: main
  • Homepage:
  • Size: 24.1 MB
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • Open Issues: 2
  • Releases: 2
Created over 1 year ago · Last pushed 12 months ago
Metadata Files
Readme License Citation

README.md

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.

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:

  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

Owner

  • Name: Urban-M4
  • Login: Urban-M4
  • Kind: organization

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

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 11 Last month
Rankings
Dependent packages count: 9.9%
Average: 32.9%
Dependent repos count: 55.9%
Maintainers (1)
Last synced: 11 months ago

Dependencies

pyproject.toml pypi
  • click *
  • geopandas *
  • numpy *
  • rasterio *
  • shapely *