Skip to contents

Introduction

The LCZ4r General Functions are designed to facilitate the retrieval, analysis, and visualization of Local Climate Zones (LCZ) when LCZ-related data is not readily available. These functions enable users to:

  • Download LCZ maps from global datasets
  • Compute LCZ classes and areas
  • Extract urban canopy parameters (UCPs) such as:
    • Sky View Factor (SVF)
    • Impervious Surface Fraction (ISF)
    • Roughness Element Height (HRE)
    • And many more!

Lifecycle: experimental

What are General Functions?

The General Functions serve as the foundation of LCZ4r, providing essential tools for: - Data acquisition: Download LCZ maps for any city worldwide - Data processing: Calculate areas, extract parameters - Data visualization: Create publication-ready LCZ maps

📺 Tutorial Video

Watch this detailed tutorial on LCZ4r General Functions in QGIS:

📋 Overview of General Functions

The following functions are available in the LCZ4r General Functions section of your QGIS Processing Toolbox:

📥 Download LCZ Map

Download LCZ maps from global datasets (World, Europe, USA) or the LCZ Generator Platform

✂️ Clip LCZ Map

Clip LCZ maps to your city or custom Region of Interest (ROI)

🗺️ Plot LCZ Map

Visualize LCZ maps with customizable colors and labels

📐 Calculate LCZ Area

Compute area statistics for each LCZ class in your study area

📊 Get LCZ Parameters

Extract urban canopy parameters (SVF, ISF, HRE, etc.) for each LCZ

🎨 Plot LCZ Parameters

Visualize parameter maps (e.g., Sky View Factor, Roughness Length)

🚀 Getting Started

Prerequisites

Before using the General Functions, ensure you have:

  1. LCZ4r installed in QGIS (see installation guide)
  2. Processing R Provider plugin installed and configured
  3. Internet connection for downloading LCZ maps (first-time use)

Available Data Sources

Source Coverage Function
Global LCZ Map Worldwide lcz_get_map()
European LCZ Map Europe lcz_get_map_euro()
USA LCZ Map Continental US lcz_get_map_usa()
LCZ Generator Custom cities lcz_get_map_generator()

🗺️ Step-by-Step Tutorial

Step 1: Download an LCZ Map

1 Download LCZ Map for Your City

  1. In the Processing Toolbox, navigate to RLCZ4r General Functions
  2. Double-click Download LCZ map
  3. Enter your city name (e.g., “São Paulo”, “Paris”, “Tokyo”)
  4. Choose the dataset (Global, Europe, or USA)
  5. Click Run

Output: A raster layer with LCZ classification for your city will be added to your QGIS canvas.

LCZ map of São Paulo

Example: LCZ map of São Paulo, Brazil

Step 2: Visualize Your LCZ Map

2 Customize and Visualize

  1. Double-click Plot LCZ map
  2. Select your downloaded LCZ map layer
  3. Customize colors and labels (optional)
  4. Click Run

Output: A publication-ready LCZ map with proper legend and color scheme.

Step 3: Calculate LCZ Areas

3 Compute Area Statistics

  1. Double-click Calculate LCZ area
  2. Select your LCZ map layer
  3. Click Run

Output: A table showing area (km²) and percentage for each LCZ class:

LCZ Class Area (km²) Percentage
Compact mid-rise 45.2 12.3%
Open low-rise 78.5 21.4%
Dense trees 32.1 8.7%

Step 4: Extract Urban Canopy Parameters

4 Retrieve LCZ Parameters

  1. Double-click Get LCZ parameters
  2. Select your LCZ map layer
  3. Choose parameters of interest (e.g., SVFmean, BSFmax, HREmean)
  4. Click Run

Output: A raster stack containing selected parameters for each grid cell.

Available Parameters:

Code Parameter Unit
SVFmean Sky View Factor [0-1]
BSFmean Building Surface Fraction [%]
ISFmean Impervious Surface Fraction [%]
HREmean Height Roughness Elements [m]
z0 Roughness Length [m]

Step 5: Visualize Parameter Maps

5 Plot LCZ Parameters

  1. Double-click Plot LCZ parameters
  2. Select your parameter raster (from Step 4)
  3. Choose the parameter to visualize (e.g., SVFmean)
  4. Click Run
Sky View Factor map

Example: Sky View Factor map showing areas with restricted sky visibility (low SVF in compact urban areas)

💡 Advanced Tips

Working with LCZ Generator Maps

For cities not covered in global datasets:

  1. Visit the LCZ Generator Platform
  2. Search for your city or upload your own training area
  3. Copy the submission ID
  4. Use Download LCZ map from Generator with the ID

Custom Regions of Interest (ROI)

To analyze a specific area:

  1. Create a polygon layer in QGIS (your area of interest)
  2. Use Clip LCZ map with your ROI layer
  3. The map will be clipped to your exact study area

Saving Your Results

All functions output: - Raster layers: Automatically added to QGIS canvas - Tables: Displayed in the Results Viewer (can be exported as CSV) - Plots: Shown in the QGIS interface

📊 Example Workflow

Here’s a complete example workflow for a typical urban climate study:

# 1. Download LCZ map for Berlin
lcz_map <- lcz_get_map(city = "Berlin")

# 2. Calculate area distribution
lcz_areas <- lcz_cal_area(lcz_map)

# 3. Extract parameters
lcz_params <- lcz_get_parameters(lcz_map)

# 4. Visualize Sky View Factor
lcz_plot_parameters(lcz_params, iselect = "SVFmean")

🔧 Troubleshooting

Issue Solution
Map not downloading Check internet connection; try alternative dataset
Missing LCZ classes Ensure city is within dataset coverage
Slow processing Reduce spatial resolution or study area size
Parameter extraction fails Verify LCZ map has valid values (1-17)

📬 Have feedback or suggestions?

We welcome your feedback and suggestions! If you have ideas for improvements or spot any issues, please let us know. Click the button below to submit a new issue on our GitHub repository.

Open GitHub issue