How we turned a 1925 railway map into live data

“Palestine & Hedjaz Railways - PR & HR route map (1925)” by Historical Railway Images — © All rights reserved. Original map courtesy of the Israel Railways Museum, Haifa.
Our database saw another huge spike in new data today, and it came from an unusual place: a single, century-old map we found online — the Palestine Railways “Diagram of Routes,” 1925. Here’s how one image became dozens of new, fully-sourced stations and routes — and why we can now do it again and again.
The setup
We work with Claude Code, Anthropic’s agentic coding tool, as a kind of tireless senior data engineer. It can read images, write code, query our database, and draft the exact changes needed — always with a human reviewing before anything is saved. Our data lives in a Postgres database (Supabase), and the map is a React app on top of it.
From picture to structured data
The pipeline runs roughly like this:
Read the map. The 1925 sheet lists every station with its cumulative distance along each line. We transcribe all of it into a clean, structured table — line, station, kilometre marking, gauge.
Reconcile against what we already have. Each station is matched against our live database: is this new, or one we already know under a different spelling? The map earned its keep here — it revealed that our coastal main line was drawn along the wrong route, and confirmed the modern identity of a station we’d only known by its 1925 name.
Geolocate, honestly. New stations are placed using coordinates pulled from Wikidata and OpenStreetMap, each with a cited source. Where a remote desert halt simply can’t be found, we mark it “approximate” rather than invent a location.
Review, then apply. Every change is generated as a reviewable database migration, checked by a human, and only then run.
Re-trace the tracks. Finally we re-match each line against OpenStreetMap so the corridors follow the real, surviving alignment.
Old data, checking new data
The 1925 distances doubled as a built-in fact-checker: the spacing between stations on the map has to roughly agree with the distances between our coordinates. Where they didn’t, we knew a coordinate needed a second look — century-old mileposts quietly validating a modern map.
The real prize: it’s repeatable
This one map produced 42 new stations and 7 new or corrected routes, every record sourced. But the bigger win is that this is now a pipeline, not a one-off. There are many more historic maps out there, and we can point the same process at each of them.