Implementing bus routes in Android application

Hello guys and dear developers!

I am using graphHopper 0.6 in my android application for car&foot routing.
Now I’ve got a realy serious question:
Is it possible to implement offline bus routes in my app?
If yes, how to make it? I’m realy stuck with this.
Should I make special .pbf file wich consist of bus roads only(edges), for exaple, and bus stops like instersections(nodes)?
Or I’m just out of my mind? :slight_smile:
Do you have any idea how to realize bus routes?

You can create a special FlagEncoder and allowing just buses but the routes won’t be time dependent.

So, it means, that I need to get all ways from relations with:

tag k=“route” v="bus"
tag k=“type” v=“route”

Extending CarFlagEncoder class will not help me in this case…

So, it means, that I need to get all ways from relations

Sure, you can mark them as accessible like we do priority stuff in the case of bike or foot routes.

What do you think about implementing bus routing in graphHopper?

Sure, would be great - or what do you mean :slight_smile: ?

I mean that would be great to implement this feature :smile:
I’ll try to do this, but I don’t know OSM files… so, this would be very hard work for me.

If I just need relation.hasTag(“route”, “bus”), should I extend CarFlagEncoder and override handleRelationTags method?
Or I have to create my own FlagEncoder extends AbstractFlagEncoder and override all abstract methods?
I think I’m stuck