[Marble-devel] Public Transport Routing

Dennis Nienhüser earthwings at gentoo.org
Wed Dec 14 14:59:40 UTC 2011

Hi Florian,

On 14.12.2011 15:33, Florian Eßer wrote:
> Hi,
> are there any plans for some kind of public transport routing yet?

I had some thoughts of it, but no concrete plans yet. Help is 
appreciated, it will be very useful.

> I guess it should be possible to somehow hook up a Marble routing
> request with the PublicTransport engine [1]. Like having routing
> profiles for car, bicycle, pedestrian etc., there would be a public
> transport profile.
> This would be especially interesting for Marble Touch.

My feeling is that the public transport engine doesn't help too much. 
But what about hooking it into an existing routing algorithm? Especially 
monav should be interesting, because it has a) awesome performance and 
b) readable code.
To implement public transport routing in monav, I'd try the following:
- Make its OSMImporter read public transport ways and nodes (unless it 
already does). I'm thinking of one train/bus line as a way.
- Define a speed profile for it: Train like speeds for trains, bus like 
for buses, etc. Possibly also include pedestrian ways for not directly 
connected public transport nodes. Speeds for motorcar and bike ways 
should be 0.
- Let monav do the rest, should work pretty much unchanged
- Driving instructions need slightly adjusted wording, but with a 
train/bus line being represented by a way, should be mostly unchanged. 
Changing the train is then changing a way, i.e. generates an instruction.

> Given a user's route request from A to B, possible steps of
> implementation would be:
> * just return a very simple route from $nearest_station_to_A to
> $nearest_station_to_B via $transfer_station (simple straight lines) and
> output the stations and transfers as "turn by turn" instructions.
> * if that is working: refine the route by adding coordinates of all
> stop-overs, getting a more polygon-like route. (If you know the map view
> at reiseauskunft.bahn.de, you probably get what I mean...)
> Fetch station coordinates from OSM.
> * Pedestrian routing from A to $nearest_station_to_A, same for B
> * Extract actual bus/train driving route from OSM relations?
> (like ÖPNV-Karte / openbusmap.org)
> (Long-term dream usecase:
> I'm in a city at point A and want to get to point B. A quick routing
> request tells me that I can either:
> a) wait 12 minutes for the next bus, or
> b) walk all the way with my average walking speed, taking 10 minutes
> longer, but without having to stand around and wait, or
> c) run a short distance to reach another station still in time to catch
> a delayed tram ;-) )

Yes, multi-modal routing will be interesting for the future just as 
calculating the route that needs least energy (e.g. for motorcar routing 
taking curves, slopes, expected traffic density into account).

> If there is no one working at such a feature yet, I would like to invest
> some time into it...

Sure, much appreciated!


> Cheers
> Florian
> [1] https://projects.kde.org/projects/playground/base/publictransport
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel

More information about the Marble-devel mailing list