[Routing] generalized routing format
Marcus Wolschon
Marcus at Wolschon.biz
Thu Oct 16 07:23:41 BST 2008
On Wed, 15 Oct 2008 23:45:46 +0200, flo Detig <florian_detig at yahoo.de>
wrote:
> Marcus Wolschon wrote:
>> I think it would be better to discuss basic
>> storage and indexes first before going on
>> about special optimizations.
>>
> I agree with that.
> Is there some lowest common denominator for a generalized routing format?
We have the OSM-XML that definately contains all data but is unusable for
large maps and supports no indexed access.
We have a MySQL and a PostGIS -schema that need no on-disk -format.
Some kind of on-disk-format that supports:
* getWaybyID(), getNodebyID(), getRelationbyID()
* getWaysForNodeID()
* getAttributeofNodeID(AttribName)
* getAttributeofWayID(AttribName)
* getRelationsofWayID()
* getRelationsofNodeID()
and most important:
* getNodesbyBoundingBox(north,south,east,west)
would be nice.
If it where uncompressed, so it can be mmapped() that would
help in avoiding having to write your own caching-strategy.
optional:
* mutable format
to support updating parts of the map without having to
re-generate the complete map-file (potentially very, very large).
* getWaybyBoundingBoxAndAttribute(n,s,e,w, attribName,
allowedAttribValues[])
* keep wayIDs and nodeIDs as well as all nodes that originally belonged
to a way from OSM, so osm-xml-diff -files can be applied to update the
map.
The format need not consist of only a single file.
e.g. indexes can be in separate files and ways, nodes, relations and
attributes
each in their own file. This can make it easier to grow an index
and make the files for way,node,relation contain only records of a
fixed size.
You may also separate the (possibly normalized) data required for routing
from the
larger data-set required for realtime map-rendering with or without
doublicating information between the 2.
> Something everyone could use / need who works on routing osm data?
> There is a nice visual description by Michael Josenhans in the wiki
> http://wiki.openstreetmap.org/index.php/OSM_Routing_Data_Layer
> As a first step merge the intermediate nodes of degree two?
> Is this simple enough to fit everyone?
No. You need to have nodes of degree 2 somewhere in your
routing-application
because the application need not only do routing but also render the map
to show the route to the user.
(Giving a user only a list of [nodeID, wayID, nodeID]-tupels will serve no
one.)
Marcus
More information about the Routing
mailing list