[OSM-talk] About large streets
Simon Hewison
simon at zymurgy.org
Thu Feb 23 09:30:11 GMT 2006
Joerg Ostertag wrote:
> This way you'd have to add two tracks for all normal 2-way streets, but you
Thinking back to my dim and distant past, when I write a route planning
program on a Commodore 64, I modeled each node to have a number of links
to surrounding junctions (I didn't bother with intermediate points
curves, but stored the distance in the node). I did have to remember to
specify both directions for every link, but it did work, and it never
went the wrong way down a one-way street. However, it still couldn't
deal with no-right-turn and no-left-turn.
My algorithm then wasn't brilliant, it consisted of first of all heading
in the right direction, and finding any path it could (it had problems
with rivers, and ended up backing up and starting from the previous
node).. Once it had found a route, it proceeded to attempt to find
better routes between portions of the route it had found, in an
iterative manner. (It was a variant of Dijkstra's algorithm, but I
hadn't heard of Dijkstra at the time)
That was in the days of a 1MHz cpu, and relatively little RAM. These
days, most PC-based route planning software seems to do things
differently. I found a useful link.
http://ai-depot.com/BotNavigation/Path.html
So, when once of us (possibly me) starts a route-planning bit of
software using OSM data, it would first of all need to get a data
snapshot of an bounding box a little bigger than the start and end
points, and then build it's own data structure, knowing that if there's
a segment from A->B then unless there's tags otherwise, B->A is also
possible. Therefore the OSM database doesn't itself need to store
segments from A->B and B->A because that could be left to the route
planning engine's own data structure.
--
Simon Hewison
More information about the talk
mailing list