5 A router relies on data to be able to find a route.
11 The data that is collected by the OpenStreetMap project consists of
12 nodes, ways and relations.
15 A node is a point that has a latitude and longitude and
16 attributes that describe what type of point it is (part of a way
17 or a place of interest for example).
20 A way is a collection of nodes that when joined together define
21 something (for example a road, a ralway, a boundary, a building,
22 a lake etc). The ways also have attributes that define them
23 (speed limits, type of road and restrictions for example).
26 A relation is a collection of items (usually ways) that are
27 related to each other for some reason (highways that make up a
30 The OpenStreetMap Wiki explains the data much better than I can.
36 The information that is needed by a routing algorithm is only a subset
37 of the information that is collected by the OpenStreetMap project. For
38 routing what is required is information about the location of roads (or
39 other highways), the connections between the highways and the
40 properties of those highways.
42 Location of highways (nodes)
43 The locations of things is provided by the nodes from the
44 OpenStreetMap data. The nodes are the only things that have
45 coordinates in OpenStreetMap and everything else is made up by
46 reference to them. Not all of the nodes are useful, only the
47 ones that are part of highways. The location of the nodes is
48 stored but none of the other attributes are currently used by
51 Location of highways (ways)
52 The location of the highways is defined in the OpenStreetMap
53 data by the ways. Only the highway ways are useful and the other
54 ways are discarded. What remains is lists of nodes that join
55 together to form a section of highway. This is further split
56 into segments which are individual parts of a way connected by
59 Properties of highways (tags)
60 The ways that belong to highways are extracted from the data in
61 the previous step and for each way the useful information for
62 routing is stored. For the router the useful information is the
63 type of highway, the speed limit, the allowed types of transport
64 and other restrictions (one-way, min height, max weight etc).
66 Connections between highways
67 The connections between highways are defined in the
68 OpenStreetMap data by ways that share nodes. Since the ways may
69 join in the middle and not just the ends it is the segments
70 defined above that are not part of the OpenStreetMap data that
73 The information that is extracted from the OpenStreetMap data is stored
74 in an optimised way that allows the routing to be performed quickly.
77 Interpreting Data Tags
78 ----------------------
80 The tags are the information that is attached to the nodes and ways in
81 OpenStreetMap. The router needs to interpret these tags and use them
82 when deciding what type of traffic can use a highway (for example).
84 There are no well defined rules in OpenStreetMap about tagging, but
85 there is guidance on the OpenStreetMap Wiki "Map_Features" page. This
86 describes a set of recommended tags but these are not universally used
87 so it is up to each application how to interpret them.
89 The tagging rules that the router uses are very important in
90 controlling how the router works. With Routino the data tags can be
91 modified when the data is imported to allow customisation of the
92 information used for routing.
95 Problems With OpenStreetMap Data
96 --------------------------------
98 The route that can be found is only as good as the data that is
99 available. This is not intended as a criticism of the OpenStreetMap
100 data; it is generally good.
102 There are some problems that are well known and which affect the
103 router. For example highways might be missing because nobody has mapped
104 them. A highway may be wrongly tagged with incorrect properties, or a
105 highway might be missing important tags for routing (e.g. speed
106 limits). There can also be problems with highways that should join but
107 don't because they do not share nodes.
109 A lot of these problems can be found using the interactive data
110 visualiser that uses the same Routino rouing database.
115 Copyright 2008-2010 Andrew M. Bishop.