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