A journey rarely begins and ends at a bus stop.
A passenger might walk from home to a pickup point, take a matatu to a major interchange, board another vehicle, and walk the final distance to their destination. In another city, the same journey could involve a bus, a train, and a bicycle.
For the passenger, this is one journey. For a routing system, it is a sequence of different transport modes, networks, schedules, and constraints that must work together.
That distinction is where the engineering challenge begins.
1. A journey is more than a route
Traditional routing systems often focus on finding a path between two geographic coordinates. Given a starting point and a destination, a road-routing engine can calculate a path through a road network.
Public transport journey planning introduces another dimension: time.
A bus does not simply exist as a line on a map. It operates according to a service pattern, follows a sequence of stops, and may only run on particular days or during specific hours. A passenger must also reach the stop, board the correct service, and have enough time to transfer.
A useful journey planner therefore needs to reason about several things simultaneously:
Geography: Where are the passenger, stops, stations, and destination?
Transport networks: Which roads, walking paths, rail lines, and transit routes are available?
Schedules: Which services operate, and when?
Transfers: Can the passenger realistically move between connecting services?
Journey constraints: How much walking is acceptable? Are accessibility requirements involved? Is the passenger travelling now or at a future time?
The output should not simply be a line between two points. It should be an ordered itinerary that a passenger can actually follow.
2. The data problem: Different networks, different sources
A multimodal journey planner depends on multiple datasets. Two particularly important foundations are OpenStreetMap and GTFS.
OpenStreetMap (OSM) provides geographic information about the physical environment: roads, footpaths, buildings, and other mapped features. A routing engine can use this information to construct a network for walking and other supported modes.
General Transit Feed Specification (GTFS) describes public transport services in a structured format. A typical GTFS Schedule feed contains information about agencies, routes, trips, stops, stop times, and service calendars. GTFS Realtime can add trip updates, service alerts, and vehicle positions when those feeds are available. GTFS documentation.
These datasets describe different parts of the transport system. They also have different quality requirements and update cycles.
Consider a city where the road network is well mapped but public transport data is incomplete. The routing engine may know how to walk between two locations, yet have no reliable information about which vehicles operate between them.
The opposite can also happen. A transit feed may contain routes and schedules, but the surrounding pedestrian network may be incomplete. The system can identify a stop but struggle to calculate a reliable walking connection to it.
Having data is not the same as having usable data.
A production journey planner must account for missing stops, inaccurate coordinates, inconsistent identifiers, incomplete service calendars, outdated schedules, and gaps between mapped infrastructure and actual operations.
This is particularly important in transport environments where not every service follows a formally published timetable.
3. The routing problem: Connecting the pieces
Even when the underlying data is available, the system must determine how to combine it.
Imagine a passenger travelling from a residential area to a destination across the city. A possible itinerary could look like this:
Walk 600 metres to a pickup point.
Take a bus to a major interchange.
Transfer to another service.
Walk 350 metres to the destination.
Each segment has its own routing logic.
The walking segments depend on the pedestrian network. The bus segments depend on transit routes and service times. The transfer depends on the locations of the stops, the time required to move between them, and the departure time of the connecting service.
A valid itinerary must satisfy more than geographic connectivity.
For example, arriving at an interchange at 10:15 and finding a connecting service scheduled to depart at 10:16 does not automatically make the connection feasible. The passenger may need several minutes to reach the next boarding point.
The planner must therefore consider transfer rules, walking time, waiting time, service calendars, and the possibility of delays.
It must also compare alternatives. The fastest journey may involve more transfers, while a slightly slower option may be easier to understand or require less walking.
This is why multimodal routing is not simply a matter of combining several shortest-path calculations. It requires reasoning over a time-dependent transport network.
4. The real-world challenge: A model is not the city
A transport network represented in a database is still an abstraction of the real world.
Roads change. Services are suspended. Stops move. Traffic affects travel times. Vehicles may arrive late, and the information available to the routing engine may not reflect what is happening on the ground.
In cities such as Nairobi, where matatus play a major role in daily mobility, the challenge is especially visible. A useful planner must account for the structure of the available transport data without assuming that every service behaves like a formally scheduled railway.
This creates an important distinction between finding a theoretically valid itinerary and providing a journey recommendation that is useful in practice.
A routing engine can return a technically connected journey. But if its stop location is inaccurate, its schedule is outdated, or its transfer assumptions are unrealistic, the passenger may still fail to complete the journey as expected.
The quality of a journey planner is therefore determined by more than its routing algorithm. It depends on the quality, coverage, and freshness of its data, as well as the logic used to interpret that data.
5. Defining the engineering problem
Before selecting a routing engine or designing an architecture, it is important to define what the system must accomplish.
At a minimum, a multimodal journey planner should be able to:
Accept geographic origins and destinations.
Identify accessible walking connections.
Discover relevant public transport services.
Calculate journeys using service schedules.
Evaluate transfers and waiting times.
Return multiple viable itinerary options.
Communicate the transport mode, sequence, and timing of each journey segment.
Handle incomplete or unavailable transport information without presenting misleading results.
Additional capabilities, such as real-time vehicle tracking, service disruption handling, fare calculation, accessibility-aware routing, and support for multiple transport providers, can be introduced as the system evolves.
The central engineering question is no longer just:
How do we find the shortest route between two points?
It becomes:
How do we combine geographically distributed, time-dependent, and potentially incomplete transport networks into a reliable journey that a passenger can actually complete?
That is the problem this series will investigate.
What comes next?
Understanding the problem gives us the criteria for choosing the routing foundation.
Technical references
GTFS: Official specification and overview for the data model and real-time extensions.
OpenStreetMap for geographic network data.
OpenTripPlanner documentation for the routing engine we will examine in Part 2.
In Part 2: OpenTripPlanner, Building the Routing Foundation, we will examine how OpenTripPlanner uses OpenStreetMap and GTFS data to construct a multimodal routing graph. We will look at its architecture, graph-building process, API, and the practical considerations involved in deploying it for a real transport network.
The objective will be to move from the problem definition to a working routing foundation.





