[GraphHopper] Public Transport Support
Peter K
peathal at yahoo.de
Sat Jun 1 13:43:34 UTC 2013
Hi Thomas,
> So, I implemented a very rudimentary public transport support for
graphhopper.
nice! Did you already had a chance to test this on some real data? E.g.
in an adapted web view?
I saw you were using a specialized Location2ID index, but I think you
can use the more memory efficient Location2NodesNtree where you add all
the different nodes of the same location (in prepare()) and on retrieval
you iterate over those matching node ids and return the closest AND the
ones matching your startTime (or even a startTimeInterval). Later on it
will be relative easy to improve query times for bigger stations with
lots of departure/arrival times (via deeper nesting of the n-tree) but
for now not necessary I guess ;)
> I choose the time-expanded approach mostly because I didn't know how a
time-depended graph should be implemented.
Ok. For bigger areas a time dependent approach is probably the best in
terms of memory usage. (but not sure)
To do this a completely new GraphStorage has to be developed, probably
one needs to extend or adapt the Graph interface as well.
BTW: instead reader.debugPath(p1) I would probably use more unit tests.
So that it can be run automatically.
BTW2: when I have a route are the all gps coordinates in the GTFS file
(start station+end station+intermediate points without a station) or
would I need to fetch this information from another source like OSM?
Regards,
Peter.
> Hi,
>
> So, I implemented a very rudimentary public transport support for
> graphhopper.
>
> It works with a time-expanded graph like it is described in
> http://d-nb.info/1001586921/34. I choose the time-expanded approach
> mostly because I didn't know how a time-depended graph should be
> implemented.
> A unit test is added which show how the GTFSReader is used and how
> routing can be done.
>
> You can take a look at it at
> https://github.com/initdch/graphhopper/tree/feature/GTFS . I would
> appreciate your feedback.
>
> Regards,
> Thomas
More information about the GraphHopper
mailing list