Skip to content
043D rail network & route planner

Neo Tokyo Transit

A rail map has to answer two different questions — what the network is, and how to get across it — and flat diagrams usually only answer the first.

Stations
269
Rail lines
22
Scene scale
55 m / unit
Languages
EN / 日本語

Context

Neo Tokyo Transit is a fully explorable 3D map of Tokyo's rail and subway network that doubles as a working journey planner. It covers JR, Tokyo Metro, Toei, Yurikamome and Rinkai — every Metro and Toei line complete to its true termini, including the Marunouchi Honancho and Oedo Hikarigaoka branches.

The dataset is hand-curated rather than pulled from a live feed, which is what makes the termini and the transfer detail complete enough to route on.

How it works

01Real coordinates, real depths

269 stations carry authentic WGS 84 coordinates and bilingual names, projected into the scene at 55 metres per world unit. The network is layered vertically the way the real one is: elevated JR and Yurikamome viaducts sit above the ground grid, and each subway line sits at its own stacked depth, with the Oedo line deepest — as it is in life. Neon data pillars rise through interchanges to connect the underground and surface layers.

02Routing over a station-by-line graph

Pathfinding runs Dijkstra over a graph whose nodes are (station × line) pairs rather than stations. That is the decision the whole route planner rests on: modelling a transfer as an edge between two nodes at the same station makes a change of line an explicit, weightable event, so transfer penalties and designated out-of-station walking transfers — Otemachi to Tokyo, Hibiya to Yurakucho, Hamamatsucho to Daimon — fall out of the graph instead of being special-cased afterwards.

03Wayfinding, not just a line list

Every transfer surfaces the optimal passage or exit, including cross-platform interchanges like Omotesando G⇄Z and Akasaka-Mitsuke G⇄M. Walking transfers give exit-to-exit street directions and destinations list their notable exits. Results show total time, transfer count, per-leg line badges and a stop-by-stop breakdown, and the 3D scene dims to the route with energy-flow tubes and pulsing origin and destination markers.

04Finding a station in two languages

Search matches romaji or Japanese with fuzzy tolerance and full keyboard navigation, so the map is usable whether you know a station as 秋葉原 or Akihabara.

Architecture

lib/data
The curated network: stations and lines.
lib/geo.ts
WGS 84 → scene projection, 55 m per unit.
lib/graph.ts
Routing graph and Dijkstra with penalties.
lib/search.ts
Bilingual fuzzy station search.
components/scene
Network tubes, trains, route highlight, post-processing.

Decisions

The choices worth defending, and what they cost.

Nodes are (station × line), not station

A transfer becomes an edge you can price. Modelling stations as single nodes would make every interchange free and every route wrong.

A curated dataset rather than a live API

No upstream dependency to break, and the branches and termini a live feed tends to truncate are complete. The tradeoff is that the data is a snapshot, which is the right trade for a map of infrastructure that changes on a scale of years.

Static export

The whole thing is a client-side scene over a fixed dataset — there is no server left to justify.

Verification

Vitest covers the three things that break silently when data drifts: dataset integrity, the geographic projection, and routing invariants. A wrong coordinate or a mislabelled interchange shows up as a failing test rather than a subtly bad route.

  • TypeScript
  • Next.js 15
  • React 19
  • Three.js
  • R3F
  • Zustand
  • Vitest

Next case study

Tokyo Move-in Cost Calculator

Bilingual lease cost simulator