bluegreencity-ki

ALKIS Data Integration Guide

Data Source: LGLN (Landesamt für Geoinformation und Landesvermessung Niedersachsen) Purpose: More precise street name matching than OSM for salt criterion and street_type criterion

Overview

ALKIS (Amtliches Liegenschaftskatasterinformationssystem) provides official cadastral data from German land registry offices. For the BlueGreenCity-KI project, ALKIS data is used as a more precise alternative to OpenStreetMap for street name matching.

Why ALKIS over OSM?

Aspect OSM ALKIS
Source Crowdsourced Official land registry
Authority Community Government (LGLN)
Update frequency Variable Regular official updates
Street names User-contributed Official cadastral names
Geometries Simplified Precise cadastral polygons
Consistency Variable Standardized

The pipeline automatically loads and processes ALKIS data via load_alkis_roads() in bluegreencity_ki/adapters/osgeo_backend/vector.py. No manual import is required.

Since the 2026-04 road-loader refactor, ALKIS is no longer enriched by a second live OSM fetch inside the ALKIS loader. Instead, the pipeline first resolves OSM roads centrally and then passes that OSM hierarchy into load_alkis_roads().

1. ALKIS WFS NAS Service

URL: https://opendata.lgln.niedersachsen.de/doorman/noauth/alkis_wfs_nas?Service=WFS&Request=GetCapabilities

  1. Resolve OSM Roads Centrally – Uses the shared road loader with the fallback chain: fresh GeoPackage cache -> fresh PostGIS cache -> fresh OSM download
  2. Load ALKIS Landnutzung – Fetches AX_TatsaechlicheNutzung from WFS for the study area extent
  3. Load AX_Flurstueck – Fetches cadastral parcels from WFS, clipped to Landnutzung extent
  4. Filter Verkehrsflächen – Keeps only road parcels (funktion = 5110, 5112)
  5. Street Name Enrichment – Links parcels to street names via:
    • AX_LagebezeichnungohneHausnummer - Location without house number
    • AX_LagebezeichnungmitHausnummer - Location with house number
  6. OSM Highway Join – Spatially joins the already resolved OSM highway classifications onto ALKIS polygons via sjoin_nearest
  7. Caching – Result cached as GeoPackage (data/cache/alkis/alkis_roads_hannover.gpkg)

URL: https://strassennamen.s3.eu-de.cloud-object-storage.appdomain.cloud/nds_strassennamen.zip

The ALKIS data is cached locally to avoid repeated WFS calls. OSM hierarchy data is cached separately in data/cache/osm/ and reused by the ALKIS loader:

Data Model

Connection Logic

The ALKIS data model connects parcels (Flurstücke) to street names through location references:

┌─────────────────┐     zeigtAuf      ┌──────────────────────────────┐
│  AX_Flurstueck  │──────────────────>│ AX_LagebezeichnungohneHausNr │
│   (Geometry)    │                   │      (Location Reference)     │
└─────────────────┘     weistAuf      └──────────────────────────────┘
        │                                          │
        │                                          │ lagebez_schl
        v                                          v
┌─────────────────┐                   ┌──────────────────────────────┐
│ Traffic parcel  │                   │     Street Names CSV          │
│   geometries    │                   │      (Official names)         │
└─────────────────┘                   └──────────────────────────────┘

Location Key (lagebez_schl)

The location key is a 13-digit identifier composed of:

Component Digits Example Description
Land 2 03 Federal state (Niedersachsen)
Regierungsbezirk 1 2 Administrative district
Kreis 2 41 County
Gemeinde 3 001 Municipality
Lage 5 00001 Location ID

Example: 03241001 = Hannover Stadt

Automatic Pipeline Integration

The pipeline automatically loads and processes ALKIS data via load_alkis_roads() in bluegreencity_ki/adapters/osgeo_backend/vector.py. No manual import is required.

Since the 2026-04 road-loader refactor, ALKIS is no longer enriched by a second live OSM fetch inside the ALKIS loader. Instead, the pipeline first resolves OSM roads centrally and then passes that OSM hierarchy into load_alkis_roads().

Pipeline Steps

  1. Resolve OSM Roads Centrally – Uses the shared road loader with the fallback chain: fresh GeoPackage cache -> fresh PostGIS cache -> fresh OSM download
  2. Load ALKIS Landnutzung – Fetches the ALKIS road-surface layer for the study area extent
  3. Load AX_Flurstueck – Fetches cadastral parcels from WFS
  4. Filter Verkehrsflächen – Keeps only road parcels (funktion = 5110, 5112)
  5. Street Name Enrichment – Links parcels to street names via:
    • zeigtAuf -> AX_LagebezeichnungOhneHausnummer (WFS)
    • lagebez_schl -> Street Names CSV (official names)
  6. OSM Highway Join – Spatially joins the already resolved OSM highway classifications onto ALKIS polygons via sjoin_nearest
  7. Caching – Stores the enriched ALKIS roads in data/cache/alkis/alkis_roads_hannover.gpkg

Cache

The ALKIS data is cached locally to avoid repeated WFS calls. OSM hierarchy data is cached separately in data/cache/osm/ and reused by the ALKIS loader:

data/cache/alkis/alkis_roads_hannover.gpkg

Delete this file to force a fresh download on the next pipeline run.

Usage

Import ALKIS Street Names (standalone)

# Download and import ALKIS street names to PostGIS
python scripts/import_alkis_streets.py

# Filter for Hannover only
python scripts/import_alkis_streets.py --gemeinde "03241001"

Parse Winterdienst PDF

# Parse aha Winterdienst PDF to CSV
python scripts/parse_winterdienst_pdf.py
# Output: data/derived/salt/winterdienst_strassenverzeichnis_2026.csv

Integration with Criteria

Salt Criterion

The salt criterion uses ALKIS road polygons + aha Winterdienst CSV for street-name-based matching:

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

How it works:

  1. load_alkis_roads() provides road polygons with street_name column
  2. Winterdienst CSV is loaded and matched to ALKIS road polygons by street name
  3. Unmatched roads default to W0 (no winter service)
  4. Trees are joined to nearest ALKIS road polygon via sjoin_nearest

See: Salt Criterion

Street Type Criterion

The street_type criterion uses ALKIS road polygons with OSM highway classification (Strategy 0, preferred):

inputs:
  roads:
    source: "osm"
    allowed: ["motorway", "trunk", "primary", "secondary", "tertiary", "residential"]
  osm_join:
    max_distance: 10.0

How it works:

  1. The central OSM loader resolves fresh road hierarchy from file cache, PostGIS cache, or a new OSM fetch
  2. load_alkis_roads() provides road polygons with highway column from that resolved OSM hierarchy
  3. Trees are joined to nearest ALKIS road polygon via sjoin_nearest
  4. Highway type is mapped to risk score (motorway=1.0 … residential=0.17)

See: Street Type Criterion

Joining aha Winterdienst Data

The aha Winterdienst PDF is automatically parsed by scripts/parse_winterdienst_pdf.py to produce a CSV:

data/derived/salt/winterdienst_strassenverzeichnis_2026.csv

Format: Semicolon-delimited, UTF-8, 3,187 street entries

str_nr;strassenname;zusatz;rkl;winterdienst
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

The salt criterion handles the joining automatically:

  1. Builds a lookup dict: street name → WD class (W0/W1/W2)
  2. Duplicate streets resolved by keeping highest WD class (W1 > W2 > W0)
  3. Joined onto ALKIS road polygons by street name
  4. Unmatched roads default to W0

Known Limitations

  1. Coverage: Only covers Lower Saxony (Niedersachsen)
  2. WFS performance: Large WFS queries can be slow (initial load ~5-10 min for Hannover)
  3. Geometry type: Flurstücke are polygons, not lines (used directly for spatial join)
  4. Updates: CSV may not reflect very recent street name changes
  5. Street name matching: Not all ALKIS parcels have street names (17.4% match rate for Hannover)
  6. Funktion filter: Only road parcels with funktion 5110 (Straßenverkehr) and 5112 (Straße) are included

References


Created: 2026-03-06 Last Updated: 2026-04-02 Status: Implemented ✅