[Routing] get osm-data strategy for routing
Stefan Pflumm
stefan.pflumm at web.de
Fri Jun 26 19:08:06 BST 2009
hello,
Has anybody experince what's the best strategy to get osm data for
routing from a osm postgresql database?
I have to 2 thoughs:
A: Install the rails-port so the osm api 0.6 could be accessed locally.
Then for every node the routing algorithm wants to "expand":
1. get bounding-box of node
2. if bounding-box already loaded do nothing
3. if bounding-box not loaded get it from the api and add the data to
the osm data in memory
pro: because of the bounding-box there will be loaded nearby osm data,
so it's not neccessary to connect to the database for every node.
contra: too much data in memory could cause an out of memory
B: Just setting up an postgresql db without the api and get the osm data
directly with sql statements.
pro: If a node is required, it will always fresh loaded from the db, so
no osm data have to be in memory.
contra: I don't know how fast this is. Especially for a node it's
necessary to know it's neighbours, so to create neighbour dependencies
additionally there must selected all ways in the db the node is refered.
What do you think? Or have you other ideas? Could it help to expand the
current database schema with node-neighbour informations?
thanks
stefan
More information about the Routing
mailing list