graphhopper/graphhopper — pull request #115 by karussell (2013-10-31 21:05:54+00:00)
Title: Issue 27

This pull request fixes #27 - not yet, as there are still some bugs if queries on the same edge, but I would like to invite you to try it out and report problems and API design.

There are several possibilities to get a GPS-exact routing working.

At the beginning I pre-calculated the possible start and end junctions (tower nodes), followed by an unchanged routing algorithm where a final post processing step would be required - like adding the required points to the path at the beginning and at the end. This would have been relative clean API, no performance overhead and more importantly: stateless, but the post processing was very complex especially if there would have been more than two points involved. See here: https://github.com/graphhopper/graphhopper/commit/ade2e9ef4dd1c4a26564079bd360af98878a6d79

The final approach which I'll take is the normal virtual/phantom node - approach. Every query point turns into a junction (tower node). To make this thread safe I introduce a QueryGraph which is created per request and can take multiple points. There is still an API glitch where one needs to call algorithm.setGraph and locationIndex.findClosest(graph<-, lat, lon) but I think I can fix this as well in the next days.