Status: Implemented ✅
Module:bluegreencity_ki/criteria/salt.py
Related Criterion: street_type
Data Sources:
The salt criterion evaluates salt exposure risk for urban trees based on official winter road service (Winterdienst) priority data. The City of Hannover (via aha) maintains a tiered priority system for winter road maintenance (gritting, salting), which directly correlates with salt exposure for roadside trees.
This criterion complements the existing street_type criterion by providing more precise, locally validated data about actual winter maintenance activities rather than relying solely on OSM highway classifications.
bluegreencity_ki/criteria/salt.pytests/test_salt.pyThe criterion uses a multi-stage fallback chain:
load_alkis_roads()sjoin_nearest between trees and ALKIS road polygons (max_distance: 50m)Winter road maintenance directly impacts tree health through:
Trees along priority winter service routes receive more frequent and intensive salting, leading to higher cumulative salt exposure throughout the winter season.
| Factor | street_type (OSM) | salt (aha/ALKIS) |
|---|---|---|
| Data Source | Crowdsourced, global | Official, local authority |
| Update Frequency | Variable | Annually maintained |
| Salt Correlation | Indirect (traffic volume) | Direct (maintenance priority) |
| Local Accuracy | Variable | High (Hannover-specific) |
| Bus Routes | Not included | Included in priorities |
| Cycle Paths | Partially | Explicitly prioritized |
The aha Region Hannover provides a publicly accessible list of winter service priorities:
URL: https://www.aha-region.de/stadtreinigung/winterdienst
The system uses three priority classes (Winterdienstklassen) for winter road maintenance:
| Class | German Name | Description | Salt Intensity | Risk Score |
|---|---|---|---|---|
| W1 | Höchste Priorität | Main arterial roads, bus routes | Very High | 1.0 |
| W2 | Nachrangige Priorität | Connector roads, secondary streets | Medium | 0.5 |
| W0 | Kein Winterdienst | No winter service | None | 0.0 |
For more precise street name matching, ALKIS (Amtliches Liegenschaftskatasterinformationssystem) data from LGLN can be used:
Data Sources:
Tables Used:
AX_Flurstueck - Cadastral parcels (Flurstücke)AX_LagebezeichnungohneHausnummer - Location without house number (for traffic areas)AX_LagebezeichnungmitHausnummer - Location with house numberConnection Logic:
AX_Flurstueck.zeigtAuf → AX_LagebezeichnungohneHausnummerAX_Flurstueck.weistAuf → AX_LagebezeichnungmitHausnummerlagebez_schl key composed of:
land (2 digits) + regierungsbezirk (1 digit) + kreis (2 digits) + gemeinde (3 digits) + lage (5 digits)Note: For traffic areas (Verkehrsflächen), mainly AX_LagebezeichnungohneHausnummer is used. Individual parcels can have multiple location references.
Import Script: scripts/import_alkis_streets.py
Example from aha PDF table:
Str.-Nr. | Straßenname | Zusatz | RKL | WD
---------|--------------------|------------------------------------|-----|----
03340 | Windausstraße | von Großer Kolonnenweg bis ... | R5 | W2
03057 | Windmühlenstraße | von Zufahrt Parkgarage bis Georg.. | R1 | W1
03750 | Windröschenweg | von Höltjebaumstraße bis Wendep... | R6 | W0
Note: The Reinigungsklasse (RKL) column should be ignored - only the WD (Winterdienst) column is relevant.
W1 (Höchste Priorität) → Risk Score = 1.00 (highest salt exposure)
W2 (Nachrangige Priorität) → Risk Score = 0.50 (moderate salt exposure)
W0 (Kein Winterdienst) → Risk Score = 0.00 (no salt exposure)
Missing data → Risk Score = 0.00 (no salt risk)
Output Fields:
salt_risk: Normalized risk score (0-1) based on winter service classsalt_value: Human-readable salt class with meaning, e.g. W1-highest salt exposuredist_salt_m: Distance in meters from the tree to the nearest matched salt route; only present when spatial join was usedLegacy join helper columns such as winterdienst, winterdienst_left, and winterdienst_right are treated as internal source fields and are not written into the final pipeline output.
criteria:
- name: "salt"
weight: 0.5 # example; current calibrated weight in config/config.yaml
params:
mapping:
"W1": 1.0 # Höchste Priorität
"W2": 0.5 # Nachrangige Priorität
"W0": 0.0 # Kein Winterdienst
inputs:
salt:
winterdienst_csv: "./data/derived/salt/winterdienst_strassenverzeichnis_2026.csv"
winterdienst_name_field: "strassenname"
winterdienst_class_field: "winterdienst"
priority_field: "winterdienst"
salt_join:
max_distance: 50.0 # Max distance to match street (meters)
inputs:
salt:
type: "postgis"
schema: "bgcki"
table: "context_salt_routes"
postgis_table: "context_salt_routes"
postgis_schema: "bgcki"
priority_field: "winterdienst"
salt_join:
max_distance: 50.0
The primary approach uses ALKIS road polygons + aha Winterdienst CSV:
python scripts/parse_winterdienst_pdf.py
This creates data/derived/salt/winterdienst_strassenverzeichnis_2026.csv with 3,187 street entries (semicolon-delimited, UTF-8).
ALKIS road polygons are loaded automatically by the pipeline via load_alkis_roads(), which:
AX_Flurstueck cadastral parcels (Verkehrsflächen, funktion 5110/5112) from WFSzeigtAuf → AX_LagebezeichnungOhneHausnummer → lagebez_schl → CSVFor pre-geocoded salt routes:
bgcki.context_salt_routesThe OSM highways table (bgcki.context_osm_highways) includes:
| Column | Description | Example |
|---|---|---|
name |
Street name | “Windmühlenstraße” |
ref |
Route reference | “A2”, “B3” |
official_name |
Official name (if different) | - |
alt_name |
Alternative name | - |
old_name |
Historical name | - |
See: https://wiki.openstreetmap.org/wiki/Key:name
The ALKIS street names table (bgcki.context_alkis_street_names) includes:
| Column | Description |
|---|---|
lagebez_schl |
Location key (13 digits) |
strasse |
Official street name |
gemeinde |
Municipality code |
CREATE TABLE bgcki.context_salt_routes (
id SERIAL PRIMARY KEY,
strasse VARCHAR(255), -- Street name
winterdienst VARCHAR(2), -- Winter service class: W0, W1, W2
str_nr VARCHAR(10), -- Street number from aha data
zusatz TEXT, -- Additional location info
geom GEOMETRY(LineString, 25832) -- Street geometry
);
CREATE INDEX ON bgcki.context_salt_routes USING GIST (geom);
The salt criterion integrates with:
Compare salt classes with OSM highway classifications:
# Expected correlations (approximate)
W1 ↔ motorway, trunk, primary (major roads)
W2 ↔ secondary, tertiary (connector roads)
W0 ↔ residential, service (local roads)
Discrepancies may indicate:
For selected sample locations:
salt_value for these trees is
therefore a lower bound. Planned fix: dedicated class for ALKIS
highway in (motorway, trunk, primary) plus a salt_source provenance flag.salt; Added ALKIS data supportCreated: 2026-02-03
Last Updated: 2026-10-06
Status: Implemented ✅