bluegreencity-ki

Field Capacity Criterion (field_capacity)

Overview

Evaluates tree drought risk based on the usable field capacity of the effective root zone (NFKWE) — the amount of plant-available water the soil can hold. Trees in low-capacity soils face higher drought stress.

Data source: Bodenkarte von Niedersachsen 1:50 000 (BK50) from the Landesamt für Bergbau, Energie und Geologie (LBEG), accessed via WFS.

Implementation Details

WFS BBOX and Axis Order

The BBOX for the WFS request is configured manually in bbox_wgs84 (Hannover city area with ~500 m buffer). The code swaps the axis order before sending to the WFS: WFS 2.0.0 with srsName=EPSG:4326 requires lat,lon order (not lon,lat).

New Planting Logic (Issue #95)

Trees with pflanzjahr > 2015 are assumed to grow in engineered tree substrate (Hannover Typ 2). Based on the substrate data sheet:

This fixed score overrides both the soil-map interpolation and the missing-data penalty.

Missing Data (Inner City)

Trees without a BK50 polygon match receive missing_score (default 0.9, high risk). The BK50 has no coverage in heavily sealed urban areas (inner city), where natural field capacity is very low. New plantings in the same area are exempt from this penalty because they grow in dedicated Typ 2 substrate.

Scoring Logic

Continuous Interpolation (breakpoints)

Instead of mapping discrete LBEG classes (Stufe 1–5) to fixed scores, the criterion uses the raw NFKWE value (mm) and linearly interpolates the risk score from configurable breakpoints. This was introduced because the old discrete 5-class mapping put 71 % of Hannover’s trees into a single class (Stufe 3, score 0.5) with no differentiation.

Default breakpoints:

NFKWE (mm) Risk Score Approx. LBEG class
0 1.0 —
50 0.9 sehr gering (1)
90 0.7 gering (2)
120 0.5 mittel (3)
160 0.3 hoch (4)
250 0.1 sehr hoch (5)

Values between breakpoints are linearly interpolated. Values below 0 or above 250 mm are clamped.

Special cases

Condition Score Label
New planting (pflanzjahr > 2015) 0.3 Neupflanzung (Typ 2 Substrat)
Missing data (no BK50 match) 0.9 (configurable) keine Zuordnung möglich (Innenstadtlage)

Configuration

inputs:
  nfk_wfs:
    url: "https://nibis.lbeg.de/net3/public/ogc.ashx?NodeId=1019&Service=WFS"
    typename: "cls:L839"
    version: "2.0.0"
    srs_name: "EPSG:4326"
    bbox_wgs84: [9.60, 52.30, 9.92, 52.46]  # Hannover city area (minlon, minlat, maxlon, maxlat)
    nfk_value_field: "NFKWE"
    nfk_class_field: "NFKWE_STUFE"
    cache_path: "./data/derived/soil/nfk_bk50.gpkg"
    refresh_days: 365

criteria:
  - name: "field_capacity"
    weight: 0.5  # example; current calibrated weight in config/config.yaml
    params:
      new_planting_year_threshold: 2015
      new_planting_year_score: 0.3
      new_planting_nfkwe_value: 170
      missing_score: 0.9
      breakpoints:
        0: 1.0
        50: 0.9
        90: 0.7
        120: 0.5
        160: 0.3
        250: 0.1

breakpoints is required. A missing breakpoints entry raises a RuntimeError at runtime. missing_score defaults to 0.9 if omitted.

Data Requirements

Output Metadata

Extras (per-tree columns)

Column Type Description
field_capacity_value float NFKWE in mm (170 for new plantings, NaN for missing)
field_capacity_label string e.g. “102 mm”, “Neupflanzung (Typ 2 Substrat)”, or “keine Zuordnung möglich (Innenstadtlage)”
field_capacity_source string “new_planting”, “soil_map”, or “missing”

Meta (summary dict)

Key Description
n_trees Total number of trees
n_new_planting Trees scored via substrate assumption
n_soil_map Trees scored via BK50 spatial join
n_missing Trees without NFK data (high risk)
new_planting_year_threshold Configured threshold year
new_planting_year_score Configured score for new plantings
new_planting_nfkwe_value Configured NFKWE value (mm)
missing_score Configured score for trees without BK50 data

Known Limitations

References

Changelog