Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Annotation of /trunk/doc/USAGE.txt
Parent Directory
|
Revision Log
Revision 191 -
(hide annotations)
(download)
Fri Jun 12 18:36:40 2009 UTC (15 years, 9 months ago) by amb
File MIME type: text/plain
File size: 15082 byte(s)
Fri Jun 12 18:36:40 2009 UTC (15 years, 9 months ago) by amb
File MIME type: text/plain
File size: 15082 byte(s)
Update the documentation.
1 | amb | 152 | Program Usage |
2 | ============= | ||
3 | |||
4 | amb | 155 | Program Usage |
5 | amb | 152 | |
6 | amb | 191 | There are three programs that make up this software. The first one |
7 | takes the planet.osm datafile from OpenStreetMap (or other source of | ||
8 | data using the same formats) and converts it into a local database. The | ||
9 | second program uses the database to determine an optimum route between | ||
10 | two points. The third program allows visualisation of the data and | ||
11 | statistics to be extracted. | ||
12 | amb | 152 | |
13 | planetsplitter | ||
14 | |||
15 | Usage: planetsplitter | ||
16 | [--help] | ||
17 | [--dir=<name>] [--prefix=<name>] | ||
18 | [--max-iterations=<number>] | ||
19 | [--transport=<transport>] | ||
20 | [--not-highway=<highway> ...] | ||
21 | |||
22 | --help | ||
23 | Prints out the help information. | ||
24 | |||
25 | --dir=<name> | ||
26 | Sets the directory name in which to save the results. Defaults | ||
27 | to the current directory. | ||
28 | |||
29 | --prefix=<name> | ||
30 | Sets the filename prefix for the files that are created. | ||
31 | Defaults to no prefix. | ||
32 | |||
33 | --max-iterations=<number> | ||
34 | The maximum number of iterations to use when generating | ||
35 | super-nodes and super-segments. Defaults to 10 which is normally | ||
36 | enough. | ||
37 | |||
38 | --transport=<transport> | ||
39 | Allows selection of only the routes that are possible for a | ||
40 | particular type of transport. Defaults to all transport types | ||
41 | amb | 191 | allowed (see the router for the list of possible transport |
42 | types). | ||
43 | amb | 152 | |
44 | --not-highway=<highway> | ||
45 | amb | 191 | Allows particular types of highways to be ignored, <highway> can |
46 | be selected from: | ||
47 | + motorway = Motorway | ||
48 | + trunk = Trunk | ||
49 | + primary = Primary | ||
50 | + secondary = Secondary | ||
51 | + tertiary = Tertiary | ||
52 | + unclassified = Unclassified | ||
53 | + residential = Residential | ||
54 | + service = Service | ||
55 | + track = Track | ||
56 | + path = Path | ||
57 | + bridleway = Bridleway | ||
58 | + cycleway = Cycleway | ||
59 | + footway = Footway | ||
60 | Defaults to all highway types allowed. This option may be | ||
61 | repeated. | ||
62 | amb | 152 | |
63 | Example usage: | ||
64 | amb | 180 | |
65 | amb | 152 | bunzip2 -c great_britain.osm.bz2 | ./planetsplitter --dir=data --prefix=gb |
66 | |||
67 | This will generate the output files 'data/gb-nodes.mem', | ||
68 | 'data/gb-segments.mem' and 'data/gb-ways.mem'. | ||
69 | |||
70 | router | ||
71 | |||
72 | amb | 180 | Usage: router [--lon1=]<longitude> [--lat1=]<latitude> |
73 | [--lon2=]<longitude> [--lon2=]<latitude> | ||
74 | [ ... [--lon9=]<longitude> [--lon9=]<latitude> ] | ||
75 | amb | 152 | [--help | --help-profile | --help-profile-js | --help-profile-pl] |
76 | [--dir=<name>] [--prefix=<name>] | ||
77 | [--shortest | --quickest] | ||
78 | [--all | --super] | ||
79 | [--no-output] [--quiet] | ||
80 | [--transport=<transport>] | ||
81 | amb | 180 | [--highway-<highway>=<preference> ...] |
82 | amb | 152 | [--speed-<highway>=<speed> ...] |
83 | [--oneway=[0|1]] | ||
84 | [--weight=<weight>] | ||
85 | [--height=<height>] [--width=<width>] [--length=<length>] | ||
86 | |||
87 | amb | 180 | --lon1=<longitude>, --lat1=<latitude> |
88 | --lon2=<longitude>, --lat2=<latitude> | ||
89 | ... | ||
90 | --lon9=<longitude>, --lat9=<latitude> | ||
91 | The location of the points that make up the start, middle and | ||
92 | end points of the route. Up to 9 points can be specified and the | ||
93 | amb | 191 | route will pass through each of the specified ones in sequence. |
94 | amb | 152 | |
95 | --help | ||
96 | Prints out the help information. | ||
97 | |||
98 | --help-profile | ||
99 | Prints out the selected transport profile (type, speed limits, | ||
100 | highway preferences etc.) | ||
101 | |||
102 | --help-profile-js | ||
103 | Prints out all the compiled-in profiles as a set of Javascript | ||
104 | arrays for use in the interactive webpage. | ||
105 | |||
106 | --help-profile-pl | ||
107 | Prints out all the compiled-in profiles as a set of Perl arrays | ||
108 | for use in the router CGI. | ||
109 | |||
110 | --dir=<name> | ||
111 | amb | 191 | Sets the directory name in which to read the local database. |
112 | Defaults to the current directory. | ||
113 | amb | 152 | |
114 | --prefix=<name> | ||
115 | amb | 191 | Sets the filename prefix for the files in the local database. |
116 | amb | 152 | Defaults to no prefix. |
117 | |||
118 | --shortest | ||
119 | Find the shortest route. | ||
120 | |||
121 | --quickest | ||
122 | Find the quickest route. | ||
123 | |||
124 | --all | ||
125 | Find the route using all nodes and segments, not using | ||
126 | super-nodes and super-segments (useful for debugging only). | ||
127 | |||
128 | --super | ||
129 | Find the route using only super-nodes and super-segments, not | ||
130 | using normal nodes and segments (useful for debugging only). | ||
131 | |||
132 | --no-output | ||
133 | Don't generate any output files (useful for debugging). | ||
134 | |||
135 | --quiet | ||
136 | Don't generate any screen output while running (useful for | ||
137 | running in a script). | ||
138 | |||
139 | --transport=<transport> | ||
140 | amb | 191 | Select the type of transport to use, <transport> can be set to: |
141 | + foot = Foot | ||
142 | + bicycle = Bicycle | ||
143 | + horse = Horse | ||
144 | + motorbike = Motorbike | ||
145 | + motorcar = Motorcar | ||
146 | + goods = Goods (Small lorry, van) | ||
147 | + hgv = HGV (Heavy Goods Vehicle - large lorry) | ||
148 | + psv = PSV (Public Service Vehicle - bus, coach) | ||
149 | Defaults to 'Motorcar', this option also selects the default | ||
150 | profile information. | ||
151 | amb | 152 | |
152 | amb | 180 | --highway-<highway>=<preference> |
153 | Selects the percentage preference for using each particular type | ||
154 | amb | 191 | of highway (see the planetsplitter for the list of highway |
155 | types). Default value depends on the profile selected by the | ||
156 | amb | 152 | --transport option. |
157 | |||
158 | --speed-<highway>=<speed> | ||
159 | amb | 191 | Selects the speed limit in km/hour for each type of highway. |
160 | Default value depends on the profile selected by the --transport | ||
161 | option. | ||
162 | amb | 152 | |
163 | --oneway=[0|1] | ||
164 | Selects if the direction of oneway streets are to be obeyed | ||
165 | (useful to not obey them when walking). Default value depends on | ||
166 | the profile selected by the --transport option. | ||
167 | |||
168 | --weight=<weight> | ||
169 | amb | 191 | Specifies the weight of the mode of transport in tonnes, ensures |
170 | that the weight limit on the highway is not exceeded. Default | ||
171 | value depends on the profile selected by the --transport option. | ||
172 | amb | 152 | |
173 | --height=<height> | ||
174 | amb | 191 | Specifies the height of the mode of transport in metres, ensures |
175 | that the height limit on the highway is not exceeded. Default | ||
176 | value depends on the profile selected by the --transport option. | ||
177 | amb | 152 | |
178 | --width=<width> | ||
179 | amb | 191 | Specifies the width of the mode of transport in metres, ensures |
180 | that the width limit on the highway is not exceeded. Default | ||
181 | value depends on the profile selected by the --transport option. | ||
182 | amb | 152 | |
183 | --length=<length> | ||
184 | amb | 191 | Specifies the length of the mode of transport in metres, ensures |
185 | that the length limit on the highway is not exceeded. Default | ||
186 | value depends on the profile selected by the --transport option. | ||
187 | amb | 152 | |
188 | Example usage (motorbike journey, scenic route, not very fast): | ||
189 | amb | 180 | |
190 | amb | 152 | ./router --dir=data --prefix=gb --transport=motorbike --highway-motorway=0 \ |
191 | --highway-trunk=0 --speed-primary=80 --speed-secondary=80 --quickest | ||
192 | |||
193 | This will use the files 'data/gb-nodes.mem', 'data/gb-segments.mem' and | ||
194 | 'data/gb-ways.mem' to find the quickest route by motorbike not using | ||
195 | motorways or trunk roads and not exceeding 80 km/hr. | ||
196 | |||
197 | amb | 180 | If there is a file in the specified directory with the specified prefix |
198 | and a basename of "copyright.txt" (i.e. 'data/gb-copyright.txt' in the | ||
199 | example) this file will be read in and the contents used in the | ||
200 | generated files. The file is read in and the two lines starting with | ||
201 | 'Source:' and 'License:' are extracted and used in the output files. | ||
202 | |||
203 | An appropriate file for use with data derived from OpenStreetMap data | ||
204 | would be the following: | ||
205 | |||
206 | Source: Based on OpenStreetMap data from http://www.openstreetmap.org/ | ||
207 | License: http://creativecommons.org/licenses/by-sa/2.0/ | ||
208 | |||
209 | amb | 191 | filedumper |
210 | amb | 152 | |
211 | amb | 191 | Usage: filedumper |
212 | [--help] | ||
213 | [--dir=<name>] [--prefix=<name>] | ||
214 | [--statistics] | ||
215 | [--visualiser --latmin=<latmin> --latmax=<latmax> | ||
216 | --lonmin=<lonmin> --lonmax=<lonmax> | ||
217 | --data=<data-type>] | ||
218 | amb | 152 | |
219 | amb | 191 | --help |
220 | Prints out the help information. | ||
221 | amb | 152 | |
222 | amb | 191 | --dir=<name> |
223 | Sets the directory name in which to read the local database. | ||
224 | Defaults to the current directory. | ||
225 | amb | 152 | |
226 | amb | 191 | --prefix=<name> |
227 | Sets the filename prefix for the files in the local database. | ||
228 | amb | 180 | |
229 | amb | 191 | --statistics |
230 | Prints out statistics about the database files. | ||
231 | amb | 152 | |
232 | amb | 191 | --visualiser |
233 | Selects a data visualiser mode which will output a set of data | ||
234 | according to the other parameters below. | ||
235 | amb | 152 | |
236 | amb | 191 | --latmin=<latmin> --latmax=<latmax> |
237 | The range of latitudes to print the data for. | ||
238 | amb | 152 | |
239 | amb | 191 | --lonmin=<lonmin> --lonmax=<lonmax> |
240 | The range of longitudes to print the data for. | ||
241 | amb | 155 | |
242 | amb | 191 | --data=<data-type> |
243 | The type of data to output, <data-type> can be selected | ||
244 | from: | ||
245 | o junctions = segment count at each junction. | ||
246 | o super = super-node and super-segments. | ||
247 | o oneway = oneway segments. | ||
248 | o speed = speed limits. | ||
249 | o weight = weight limits. | ||
250 | o height = height limits. | ||
251 | o width = width limits. | ||
252 | o length = length limits. | ||
253 | amb | 155 | |
254 | amb | 191 | |
255 | Router Output | ||
256 | |||
257 | There are two different formats of output from the router, plain text | ||
258 | and GPX (GPS eXchange) XML format. There are a total of four possible | ||
259 | outputs from the router program: a GPX track file, a GPX route file | ||
260 | with waypoints at junctions, a text description with the junctions and | ||
261 | a text file with every node. | ||
262 | |||
263 | amb | 155 | The output files are written to the current directory and are named |
264 | depending on the selection of shortest or quickest route. For the | ||
265 | amb | 158 | shortest route the file names are "shortest-track.gpx", |
266 | "shortest-route.gpx", "shortest.txt" and "shortest-all.txt", for the | ||
267 | quickest route the names are "quickest-track.gpx", | ||
268 | "quickest-route.gpx", "quickest.txt" and "quickest-all.txt". | ||
269 | amb | 155 | |
270 | amb | 158 | GPX Track File |
271 | amb | 155 | |
272 | amb | 158 | The GPX track file contains a track with all of the individual nodes |
273 | that the route passes through. | ||
274 | amb | 155 | |
275 | amb | 158 | An example GPX track file output is below: |
276 | amb | 155 | |
277 | <?xml version="1.0" encoding="UTF-8"?> | ||
278 | amb | 180 | <gpx version="1.1" creator="Routino" |
279 | amb | 155 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
280 | amb | 180 | xmlns="http://www.topografix.com/GPX/1/1" |
281 | xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"> | ||
282 | <metadata> | ||
283 | <desc><![CDATA[Shortest route between 'start' and 'finish' waypoints]]></desc> | ||
284 | <copyright author="Based on OpenStreetMap data from http://www.openstreetmap.org/"> | ||
285 | <license>http://creativecommons.org/licenses/by-sa/2.0/</license> | ||
286 | </copyright> | ||
287 | </metadata> | ||
288 | amb | 155 | <trk> |
289 | <trkseg> | ||
290 | <trkpt lat="51.524676" lon="-0.127896"/> | ||
291 | <trkpt lat="51.523829" lon="-0.126993"/> | ||
292 | ... | ||
293 | <trkpt lat="51.478354" lon="-0.103561"/> | ||
294 | <trkpt lat="51.478244" lon="-0.103652"/> | ||
295 | </trkseg> | ||
296 | </trk> | ||
297 | </gpx> | ||
298 | |||
299 | amb | 158 | GPX Route File |
300 | amb | 155 | |
301 | amb | 158 | The GPX route file contains a route (ordered set of waypoints) with all |
302 | of the junctions that the route passes through. | ||
303 | |||
304 | An example GPX route file output is below: | ||
305 | |||
306 | <?xml version="1.0" encoding="UTF-8"?> | ||
307 | amb | 180 | <gpx version="1.1" creator="Routino" |
308 | amb | 158 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
309 | amb | 180 | xmlns="http://www.topografix.com/GPX/1/1" |
310 | xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"> | ||
311 | <metadata> | ||
312 | <desc><![CDATA[Shortest route between 'start' and 'finish' waypoints]]></desc> | ||
313 | <copyright author="Based on OpenStreetMap data from http://www.openstreetmap.org/"> | ||
314 | <license>http://creativecommons.org/licenses/by-sa/2.0/</license> | ||
315 | </copyright> | ||
316 | </metadata> | ||
317 | amb | 158 | <rte> |
318 | <name>Shortest route</name> | ||
319 | <rtept lat="51.524676" lon="-0.127896"><name>START</name></rtept> | ||
320 | <rtept lat="51.523829" lon="-0.126993"><name>TRIP001</name></rtept> | ||
321 | ... | ||
322 | <rtept lat="51.480314" lon="-0.108381"><name>TRIP015</name></rtept> | ||
323 | <rtept lat="51.478244" lon="-0.103652"><name>FINISH</name></rtept> | ||
324 | </rte> | ||
325 | </gpx> | ||
326 | |||
327 | amb | 155 | Text File |
328 | |||
329 | The text file format contains one entry for all of the junctions in the | ||
330 | route and is intended to be easy to interpret. | ||
331 | |||
332 | An example Text file output is below: | ||
333 | |||
334 | amb | 180 | # Source: Based on OpenStreetMap data from http://www.openstreetmap.org/ |
335 | # License: http://creativecommons.org/licenses/by-sa/2.0/ | ||
336 | # | ||
337 | amb | 158 | #Latitude Longitude Segment Segment Total Total Highway |
338 | # Distance Duration Distance Durat'n | ||
339 | 51.524676 -0.127896 0.000 km 0.0 min 0.0 km 0 min | ||
340 | 51.523829 -0.126993 0.113 km 0.1 min 0.1 km 0 min Woburn Place | ||
341 | ... | ||
342 | 51.480314 -0.108381 0.200 km 0.1 min 5.9 km 5 min Camberwell New Road (A202) | ||
343 | 51.478244 -0.103652 0.411 km 0.3 min 6.3 km 5 min Vassall Road | ||
344 | amb | 155 | |
345 | The text file output contains a header (indicated by the lines starting | ||
346 | amb | 158 | with '#') and then one line for each junction. Each line contains the |
347 | information for the route up to that point. For each of the lines the | ||
348 | amb | 155 | latitude and longitude are the first two items. The length of the |
349 | segment in km and the journey duration for the segment in minutes are | ||
350 | the next two items. The cumulative journey distance and duration are | ||
351 | the 6th and 7th items and the final item is the name of the highway. | ||
352 | The individual items are separated by tabs but some of the items | ||
353 | contain spaces as well. | ||
354 | |||
355 | All Nodes Text File | ||
356 | |||
357 | amb | 158 | The all nodes text file format contains one entry for each of the nodes |
358 | amb | 155 | on the route. |
359 | |||
360 | An example all nodes text file output is below: | ||
361 | |||
362 | amb | 180 | # Source: Based on OpenStreetMap data from http://www.openstreetmap.org/ |
363 | # License: http://creativecommons.org/licenses/by-sa/2.0/ | ||
364 | # | ||
365 | amb | 158 | #Latitude Longitude Node Segment Segment Total Total Speed Highway |
366 | # Dist Durat'n Dist Durat'n | ||
367 | amb | 155 | |
368 | amb | 158 | 51.524676 -0.127896 4830582* 0.000 0.00 0.00 0.0 |
369 | 51.523829 -0.126993 4830562* 0.113 0.14 0.11 0.1 96 Woburn Place | ||
370 | ... | ||
371 | 51.478354 -0.103561 4904816* 0.104 0.07 6.30 5.1 96 Camberwell New Road (A202) | ||
372 | 51.478244 -0.103652 4908481 0.013 0.01 6.31 5.1 64 Vassall Road | ||
373 | amb | 155 | |
374 | amb | 158 | The all nodes text file output is similar to the text file output |
375 | except that a line is printed for each of the nodes rather than just | ||
376 | the junctions. The additional information on each line is the node | ||
377 | number (not the OpenStreetMap node number but an internal value) as | ||
378 | well as an indicator for the super-nodes and the speed for the segment. | ||
379 | amb | 155 | |
380 | amb | 158 | |
381 | amb | 152 | -------- |
382 | |||
383 | Copyright 2008,2009 Andrew M. Bishop. |
Properties
Name | Value |
---|---|
cvs:description | Description of program usage. |