The OGD-OSM Bridge
Verknüpfung von Behörden-Daten und Citizen-Science-Daten von OpenStreetMap
Results
Bedarf/Problem und Zielgruppe
Die Geodaten von OpenStreetMap (OSM) könnten die Open Government Data (OGD) in vielerlei Hinsicht ergänzen (vgl. dazu http://dx.doi.org/10.48350/159438#). Die OSM-Community hatte jedoch bisher keinen Anlass, selbst einen persistenten Identifikator anzubieten. Nun schlagen wir eine „OSM Persistent IDs Specification” (OSMPID) vor, die neu (als Draft) entwickelt wurde. Während staatliche Register wie das GWR dauerhafte IDs nutzen, sind OSM-IDs volatil und ändern sich häufig. Es fehlt eine stabile Verbindung zwischen amtlichen Geodaten und OpenStreetMap.
Zielgruppe sind Bundes- und Kantonsverwaltungen, die OSM-Zusatzdaten mit permanenten IDs für ihre Aufgaben nutzen möchten. Auch der Tourismus, Wikidata und Weitere können davon profitieren.
(Nicht) verfügbare Daten
Das Gebäude- und Wohnungsregisters (GWR) ist verfügbar. Weitere Verwaltungsdaten können auch am Hackathon noch dazu kommen.
Erwarteter Nutzen
Die bessere Verknüpfung von OGD und OSM schafft ein Ökosystem, in dem aufwändige Datenabgleiche zwischen Verwaltung und Community überflüssig werden. Von dem einmaligen Verknüpfen von Informationen profitieren Behörden, der Tourismus und weitere Akteure, da diese trotz Bearbeitungen in OSM stabil bleiben.
Ziel für den Hackathon
Das Ziel ist die Entwicklung eines funktionalen Prototyps, der eine Brücke zwischen den stabilen amtlichen Identifikatoren und einem neuen System stabilisierter OSM-Persistent-IDs schlägt. Dazu gehört ein API, ein Matching, und ggf. eine Webseite (dank AI-Coder Tools und Vibe Coding).
Lösungsansätze
Es gibt die „OSM Persistent IDs Specification” (OSMPID), Python Libraries, etc. und eine Menge Erfahrungen der Teilnehmer vom Challenge-Einreichenden (am Geometa LAb der FH OST), die dabei sein werden.
Einschränkungen
Gesucht sind Teilnehmende mit Know-how in Geoinformatik und Datenmodellierung sowie Erfahrung im Umgang mit OpenStreetMap-Strukturen. Der Tech-Stack setzt auf zukunftsweisende Technologien wie DuckDB für die Datenverarbeitung und GeoParquet für den effizienten Austausch der Verknüpfungstabellen, ergänzt durch Python oder Go für die API-Entwicklung.
Nachhaltigkeit
Alles ist Open Source und Open Data (v.a. Open Data Commons Open Database License, ODbL, v1.0). Repostitory. Webapp als Showcase.
OGD-OSM Bridge
A persistent-identifier service and Python library for OpenStreetMap objects. Implements the OSM Persistent ID (OSMPID) specification: a small grammar plus validation/generation logic that lets downstream systems hold stable references to OSM elements and detect when the underlying object has semantically changed.
Built during the Govtech Hackathon 2026 — Hacking-Challenge #44.
Team
Timon Erhart - IFS Geometalab @ OST
Lars Hermann - IFS Geometalab @ OST
Kevin Löffler - IFS Geometalab @ OST
Abinas Kuganathan - IFS Geometalab @ OST
Jan Leutwyler - RUAG AG
David Funke - RUAG AG
Layout
ogd-osm-bridge/
├── osmpid-core/ Pure-Python library: parser, model, validator, generator, OSM clients.
├── osmpid-service/ FastAPI HTTP wrapper exposing /validate, /generate, /healthz.
├── osmpid-ui/ SvelteKit + TypeScript web UI.
├── contracts/ Frozen OpenAPI + EBNF grammar (single source of truth).
├── docs/ SPECS + this README.
└── docker-compose.yml Local stack: service + UI.
Each package has its own README.md and AGENTS.md with package-specific conventions.
Quickstart
Prerequisites: Docker (Compose v2), uv, pnpm.
git clone <repo-url> ogd-osm-bridge
cd ogd-osm-bridge
docker compose up --build
When healthy:
- service: http://localhost:8000 (OpenAPI: http://localhost:8000/docs)
- UI: http://localhost:5173
Per-package dev (run from repo root):
uv sync # Python workspace
uv run --package osmpid-service uvicorn osmpid_service.app:create_app --factory --port 8000
pnpm --filter osmpid-ui dev # UI on :5173
API at a glance
Authoritative contract: contracts/openapi.yaml. Semantics: OSMPID_SPECIFICATION §6.
# /validate — does this OSMPID still match current OSM state?
curl --get --data-urlencode 'id=node/2641352539@7;2026-03-12T10:15:00Z?amenity' \
http://localhost:8000/validate
# /generate — build a fresh OSMPID from an OSM element
curl --get --data-urlencode 'element_type=node' --data-urlencode 'element_id=2641352539' \
--data-urlencode 'tags=amenity' http://localhost:8000/generate
# /healthz, /readyz — liveness / readiness probes
curl http://localhost:8000/healthz
Status outcomes: unchanged | changed | deleted | unknown → 200; malformed → 422. Successful /validate responses carry Last-Modified.
Encoding: the grammar uses /, @, ;, ?, &, = as separators. Always URL-encode them in query strings (curl --data-urlencode handles this).
Architecture
User ──► UI ──► API Service ──► Core Logic ──► Data Query Services ──► OSM
(parser, validator, generator) (Overpass / OSM API)
| Layer | Responsibility | Tech |
|---|---|---|
| UI | Validate/generate forms, shareable links | SvelteKit |
| API Service | HTTP surface per contracts/openapi.yaml, DI, caching, observability |
FastAPI + Pydantic |
| Core | Parse/serialize, version+child+tag comparison, validation, generation | Pure Python (no I/O) |
| Data Query | Fetch OSM elements + recursive children, pluggable via Protocol | Overpass primary, OSM API fallback |
Core is hexagonal: OsmClient Protocol is the only seam to the outside world. Service injects the concrete client via DI; tests inject a FakeOsmClient driven by fixtures in tests/fixtures/osm/.
Contributing
tbd
Links Collection
Specification groundwork (outdated): https://md.coredump.ch/s/LdBTzJ6a2 Blog: Simon Poole Persisting your ids: https://www.openstreetmap.org/user/SimonPoole/diary/408332 Wo sind meine Ways geblieben? fossgis Talk https://pretalx.com/fossgis2026/talk/VXXABP
Previous
GovTech Hackathon 2026
Next project