For well over a decade, our team has been transferring research to our ecosystems of mobility tools. These services are stable and maintained. Developing a dedicated public transit routing engine has long been a major milestone on our roadmap. Now that public transit data has become more open and available, it is the time to extend our free API ecosystem with a new public transport routing service.
Our new Public Transit Router (PTR) is a standalone service designed to scale with the growing number of available public transit data. The aim was to keep it simple but effective. That’s why PTR does only one thing, and that is public transit calculations.
Data is managed through our new and innovative approach, leveraging DuckDB as a central framework. We use Spring Boot and Kotlin for a modern and maintainable code base. Reinventing the wheel was not our aim, that’s why we integrated the excellent RAPTOR library of OpenTripPlanner for the algorithmic calculations and openrouteservice for street routing. Coupling the OTP library and openrouteservice with our innovative and database driven DuckDB approach allows us to provide the best of all worlds. We are looking forward supporting more routing engines into our application for street routing in the future.
At our early stage, the service relies on the GTFS.de dataset, which covers national transit information across Germany. Because preparing transit data for RAPTOR requires significant computation, our pipeline preprocesses this nationwide dataset into a DuckDB and loads only the relevant network components. This ensures low latency query responses, fast startup times and scalability. For this early phase, the data is refreshed on a weekly basis across all active instances.
Try it out here: Swagger UI
To get an API key, sign up at HeiGIT Account. If you already have an account, you are already good to go.
Core features and configurable routing
We have implemented the foundational routing capabilities of the engine, which centers around two primary modalities:
- Stop-to-stop routing enables direct transit calculations between distinct stations.
- Location-to-location routing offers door-to-door planning. This feature integrates the first and last mile of a journey, allowing users to combine trains and buses with walking or cycling paths.
Both routing types support multiple configurable parameters to give full control over the query behavior. Users can define their travel time based on either departure or arrival preferences. By default, the system searches for Pareto-optimal connections that minimize travel time and the number of transfers.
The engine also supports a search for multiple journeys departing or arriving within a specific time window. Users can also customize their itineraries by setting the maximum number of transfers, adding an extra transfer buffer time to avoid missed connections, and naming transit vehicles types to avoid.
The service also includes a stop search API that locates stations via text queries, unique identifiers, bounding boxes, or center coordinates combined with a maximum walking duration.
Outlook
We have many plans for PTR and are excited about the coming year(s).
However, we are already working on the integration of PTR Isochrones for accessibility mapping, expanding our datasets to a larger spatial extent, and generating geographic shapes for routes. We also plan to integrate the heat-resilient mobility options based on shaded.openrouteservice.org to allow for heat-avoidance on the first and last mile of pedestrian navigation.
The entire source code for this project is hosted on GitLab.



