Hi All,

In order to do routing with OSM data, we need to have routing nodes and graph data in osm database.
I study OSM data structure version 0.5 but I could not find any proper data structure to store routing information.

I would like to propose a new data structure for capturing and/or calculating routing information.
The proposal uses xml tags similar to node,way,relation.

I name the new data structure as <rtnode /> to distinguish with the current node <node /> (node in osm is not
a node, it is just a point only)

<rtnode id="757312" lat="51.3450785" lon="-0.4606170" timestamp="2006-04-17T08:57:53Z">
    <rtnode ref="251490798" distance="2km" traveltime="10minutes" maxspeed="60kmh" />
    <rtnode ref="251490797" distance="5km" traveltime="12minutes" maxspeed="55kmh" />
    <rtnode ref="251490799" distance="3km" traveltime="8minutes" maxspeed="40kmh" />
    <rtnode ref="251490800" distance="1km" traveltime="5minutes" maxspeed="30kmh" />
    <rtnode ref="251490801" distance="2.3km" traveltime="10minutes" maxspeed="80kmh" />
    <rtnode ref="251490802" distance="4.2km" traveltime="18minutes" maxspeed="90kmh" />
    <rtnode ref="251490803" distance="3.3km" traveltime="14minutes" maxspeed="70kmh" />
    <tag k="created_by" v="J2MEGPS" />
</rtnode>

Each routing node has an unique id. The lat/lon of a routing node will be used when we want to find the nearest
routing node to the point on the map. This lat/lon is also useful when we want to find a route within a bound -->
clip an area for routing.

<rtnode ref /> to capture a link from the current routing node to other routing node in the graph.
the tag distance is the length from current routing node to the link routing node id. distance will be used in A* algorithmn to
calculate the shortest path.
Traveltime is the time needed when travel from current routing node to the link node. Traveltime will be used in A* algorithm to
calculate the fastest path.
maxspeed is reversed for future use.

I also would like to modify the current structure of way to capture the routing information. Why I need to modify the current way?
It is because in order to capture routing node information, we need to have a relation among point (node), way and routing node.
 
Current way's data structure:
  <way id="23242863" timestamp="2008-03-10T13:15:20Z">
    <nd ref="251490798" />
    <nd ref="251490797" />
    <nd ref="251490799" />
    <nd ref="251490800" />
    <nd ref="251490801" />
    <nd ref="251490802" />
    <nd ref="251490803" />
    <nd ref="251490804" />
    <nd ref="251490805" />
    <nd ref="251490806" />
    <nd ref="251490807" />
    <tag k="highway" v="residential" />
    <tag k="created_by" v="Potlatch 0.7b" />
    <tag k="oneway" v="yes" />
  </way>

My propose modify way's data structure:
  <way id="23242863" timestamp="2008-03-10T13:15:20Z">
    <nd ref="251490798" rtnode id="757312" /> --> the first point of the way is linked to the routing node 757312
    <nd ref="251490797" />
    <nd ref="251490799" />
    <nd ref="251490800" />
    <nd ref="251490801" rtnode id="251490798" /> --> the 5th point of the way is linked to the routing node 251490798
    <nd ref="251490802" />
    <nd ref="251490803" />
    <nd ref="251490804" />
    <nd ref="251490805" />
    <nd ref="251490806" />
    <nd ref="251490807" rtnode id="271498" /> --> the 11th point of the way is linked to the routing node 271498
    <tag k="highway" v="residential" />
    <tag k="created_by" v="Potlatch 0.7b" />
    <tag k="oneway" v="yes" />
    <tag k="maxspeed" v="60kmh" />
  </way>

In the next email, I will explain how to capture and/or calculate routing node/graph information.

Regards,



Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
_______________________________________________
Routing mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/routing

Reply via email to