Venetis Charalampidis's Diary

Recent diary entries

A quick update on where things stand after the first half of the coding period.

In my first post I mentioned three goals for the summer. The first one, adding a Valhalla-powered routing endpoint that genuinely avoids closed roads, is now done.

What I built

The platform already had road closure data in the database. What it was missing was any connection between that data and actual routing. The frontend was calling valhalla1.openstreetmap.de directly, with no awareness of the closures sitting in our own database.

I set up a self-hosted Valhalla instance (3.5.1) running in the project’s Docker stack, loaded with Switzerland OSM data. Then I built a backend endpoint, POST /api/v1/routing/closure-aware, that sits in front of Valhalla and does the work the frontend couldn’t do on its own:

  1. Fetches currently-active closures from the database that affect the requested transport mode (car, bicycle, or pedestrian)
  2. Buffers each closure geometry into an avoidance polygon. LineStrings get a 10m buffer, Points get 15m, Polygons are used as-is. The buffering uses per-centroid UTM reprojection so the radii are true metres anywhere
  3. Sends those polygons to Valhalla as exclude_polygons so the route detours around them
  4. Returns the trip along with a count of how many closures were excluded

The frontend routing page now calls this endpoint instead of Valhalla directly, so closure avoidance happens server-side automatically.

Coverage

The self-hosted Valhalla currently covers Switzerland only. For routes outside Switzerland the frontend falls back to the public Valhalla instance without closure avoidance, which is fine for now since the platform is Swiss-focused.

Next up is the sidecar service that feeds active closures into Valhalla’s traffic tile system, the second item from my original list. More on that soon.

The code is on GitHub if you want to follow along.

Location: Πολίχνη, Polichni Municipal Unit, Pavlos Melas Municipality, Thessaloniki Regional Unit, Central Macedonia, Macedonia and Thrace, 565 33, Greece

A quick update on where things stand after the first half of the coding period.

In my first post I mentioned three goals for the summer. The first one, adding a Valhalla-powered routing endpoint that genuinely avoids closed roads, is now done.

What I built

The platform already had road closure data in the database. What it was missing was any connection between that data and actual routing. The frontend was calling valhalla1.openstreetmap.de directly, with no awareness of the closures sitting in our own database.

I set up a self-hosted Valhalla instance (3.5.1) running in the project’s Docker stack, loaded with Switzerland OSM data. Then I built a backend endpoint, POST /api/v1/routing/closure-aware, that sits in front of Valhalla and does the work the frontend couldn’t do on its own:

  1. Fetches currently-active closures from the database that affect the requested transport mode (car, bicycle, or pedestrian)
  2. Buffers each closure geometry into an avoidance polygon. LineStrings get a 10m buffer, Points get 15m, Polygons are used as-is. The buffering uses per-centroid UTM reprojection so the radii are true metres anywhere
  3. Sends those polygons to Valhalla as exclude_polygons so the route detours around them
  4. Returns the trip along with a count of how many closures were excluded

The frontend routing page now calls this endpoint instead of Valhalla directly, so closure avoidance happens server-side automatically.

Coverage

The self-hosted Valhalla currently covers Switzerland only. For routes outside Switzerland the frontend falls back to the public Valhalla instance without closure avoidance, which is fine for now since the platform is Swiss-focused.

Tests

308 tests passing, including integration tests for all three transport modes and a version contract test that checks the Valhalla image is pinned to 3.5.1.

See full entry

Location: Kamara, 1st District of Thessaloniki, Thessaloniki Municipal Unit, Municipality of Thessaloniki, Thessaloniki Regional Unit, Central Macedonia, Macedonia and Thrace, Greece

Hi, I am Venetis, a computer science student from Thessaloniki. This summer I’ll be working on closures.osm.ch as part of Google Summer of Code 2026, mentored by Simon Poole and David Haberthür.

closures.osm.ch is a platform where road authorities submit temporary road closures so that routers can avoid them. The data is there, but right now it doesn’t actually affect routing. That’s what I’m fixing.

My work this summer comes down to three things:

  • Adding a Valhalla-powered routing endpoint that genuinely avoids closed roads
  • Building a sidecar service that feeds active closures into Valhalla’s traffic tile system
  • Improving the DATEX II/CIFS importer that brings closure data in from external sources

I’ll be posting updates here at each milestone. The code is on GitHub if you want to follow along.

Coding starts May 25. Looking forward to it.

Location: 1st District of Thessaloniki, Thessaloniki Municipal Unit, Municipality of Thessaloniki, Thessaloniki Regional Unit, Central Macedonia, Macedonia and Thrace, Greece