This criterion evaluates the drought tolerance of tree species from the Citree enrichment already attached to the tree layer during input loading. The risk assessment is performed on a scale from 0 to 1, where higher values indicate higher risk.
The current implementation reads citree_trockenheitstoleranz by default and requires the drought-tolerance mapping to be configured explicitly in config.yaml. Unknown or unmatched species fall back to the project’s neutral score (default 0.5).
Drought tolerance is converted into risk values as follows:
| Tolerance Level (config key) | Risk Value |
|---|---|
| sehr tolerant | 0.1 |
| trockentolerant | 0.3 |
| mittel | 0.5 |
| empfindlich | 0.8 |
| vertraegt keine trockenheit | 0.8 |
| unbekannt | 0.5 |
| (leer / “”) | 0.5 |
Key spelling matters: the mapping lookup lowercases and strips the incoming value but does not convert umlauts. The Citree label uses the ASCII spelling
vertraegt keine trockenheit; a key with „verträgt” would never match and silently score 0.5 (neutral) instead of 0.8.
unbekannt is a catalog value with an explicit mapping key (0.5) in the live
config; species not covered by any key surface as the raw value unknown and
receive the neutral score.
The criterion is configured in the config.yaml file as follows
(mapping is STRICT — no fallback to defaults):
- name: "drought_tolerance"
weight: 0.004708 # calibrated value; see config/config.yaml
params:
source_column: "citree_trockenheitstoleranz"
mapping:
sehr tolerant: 0.1
trockentolerant: 0.3
mittel: 0.5
empfindlich: 0.8
vertraegt keine trockenheit: 0.8
unbekannt: 0.5
"": 0.5 # Empty/missing values
mapping is mandatory. If it is missing, the criterion raises a RuntimeError instead of silently using defaults.
If needed, source_column can be pointed at a different enrichment field. In the normal pipeline this should stay on the Citree enrichment column.
The criterion reads the value from the tree layer after enrichment:
citree_trockenheitstoleranz: Citree drought tolerance attached by the species-profile enrichment in docs/data_maintenance/enrichment.mdThis avoids maintaining a second manual species table for the same information.
A tree with the species “Acer platanoides” has a drought tolerance of “trockentolerant”, which corresponds to a risk value of 0.3.
The implementation is located in bluegreencity_ki/criteria/drought_tolerance.py.
load_data(): Legacy helper for direct CSV-based lookups outside the runtime pipeline.calculate_risk_score(species_name): Legacy helper for direct species lookups.__call__(tree_data): Legacy helper for direct single-tree evaluation.compute(ctx): Reads the enriched Citree field from the tree layer and returns raw tolerance labels in the extra output field drought_tolerance_value.Tests for this criterion are located in tests/test_drought_tolerance.py.
__call__ method of the drought tolerance criterion.This criterion is integrated into the risk assessment process and contributes with its calibrated weight (current: 0.004708, see config/config.yaml) to the overall evaluation.
unknown.