1v.net.timetable(1)          GRASS GIS User's Manual         v.net.timetable(1)
2
3
4

NAME

6       v.net.timetable  - Finds shortest path using timetables.
7

KEYWORDS

9       vector, network, shortest path
10

SYNOPSIS

12       v.net.timetable
13       v.net.timetable --help
14       v.net.timetable       input=name       [layer=string]       output=name
15       [arc_layer=string]       [node_layer=string]        [arc_column=string]
16       [arc_backward_column=string]                       [node_column=string]
17       [walk_layer=string]     route_id=name    stop_time=name    to_stop=name
18       walk_length=name    [--overwrite]    [--help]   [--verbose]   [--quiet]
19       [--ui]
20
21   Flags:
22       --overwrite
23           Allow output files to overwrite existing files
24
25       --help
26           Print usage summary
27
28       --verbose
29           Verbose module output
30
31       --quiet
32           Quiet module output
33
34       --ui
35           Force launching GUI dialog
36
37   Parameters:
38       input=name [required]
39           Name of input vector map
40           Or data source for direct OGR access
41
42       layer=string
43           Layer number or name
44           Vector features can have category values in different layers.  This
45           number  determines  which  layer  to use. When used with direct OGR
46           access this is the layer name.
47           Default: 1
48
49       output=name [required]
50           Name for output vector map
51
52       arc_layer=string
53           Arc layer
54           Vector features can have category values in different layers.  This
55           number  determines  which  layer  to use. When used with direct OGR
56           access this is the layer name.
57           Default: 1
58
59       node_layer=string
60           Node layer
61           Vector features can have category values in different layers.  This
62           number  determines  which  layer  to use. When used with direct OGR
63           access this is the layer name.
64           Default: 2
65
66       arc_column=string
67           Arc forward/both direction(s) cost column (number)
68
69       arc_backward_column=string
70           Arc backward direction cost column (number)
71
72       node_column=string
73           Node cost column (number)
74
75       walk_layer=string
76           Layer number or name with walking connections or -1
77           A single vector map can be connected to multiple  database  tables.
78           This  number  determines  which table to use. When used with direct
79           OGR access this is the layer name.
80           Default: -1
81
82       route_id=name [required]
83           Name of column with route ids
84           Default: route_id
85
86       stop_time=name [required]
87           Name of column with stop timestamps
88           Default: stop_time
89
90       to_stop=name [required]
91           Name of column with stop ids
92           Default: to_stop
93
94       walk_length=name [required]
95           Name of column with walk lengths
96           Default: length
97

DESCRIPTION

99       v.net.timetable finds  the  shortest  path  between  two  points  using
100       timetables.  v.net.timetable  reads input, one query per line, from the
101       standard input and writes output to the standard output as well  as  to
102       the  output  map  and to tables linked to layers 1 and 2.  Each line of
103       input must follow one of the following formats:
104       PATH_ID FROM_X FROM_Y TO_X TO_Y START_TIME MIN_CHANGE MAX_CHANGES WALK_CHANGE
105       PATH_ID FROM_STOP TO_STOP START_TIME MIN_CHANGE MAX_CHANGES WALK_CHANGE
106       where PATH_ID is the identificator of a query that is used in the  out‐
107       put  map to differentiate between queries. Search begins at START_TIME.
108       MIN_CHANGE gives the minimum number of time (inclusively) for a  change
109       from  one  route  to another. MAX_CHANGES denotes the maximum number of
110       changes allowed or -1 if infinity.  WALK_CHANGE is  1  or  0  depending
111       whether  walking  from a stop to another stop is considered a change or
112       not. Finally, the path is found from FROM_STOP  to  TO_STOP  in  latter
113       case  and  from the stop closest to (FROM_X, FROM_Y) coordinates to the
114       stop closest to (TO_X, TO_Y) coordinates in former case.
115       For each input query, module outputs a description of the shortest path
116       to  the standard output. For example, using the tables given below, for
117       the following input:
118       47 130 300 0 1 5 0
119       the following output is produced:
120       Route 15, from 130 leaving at 15 arriving to 250 at 22
121       Walk from 250 leaving at 22 arriving to 300 at 24
122       Moreover, the module writes the path to the output map and  stores  all
123       the  information necessary to reconstruct the path to the tables. Table
124       corresponding to stops/points is linked to layer 1 and looks, after the
125       query, as follows:
126       cat|path_id|stop_id|index|arr_time|dep_time
127       1|47|130|1|0|15
128       2|47|250|2|22|22
129       3|47|300|3|24|24
130       where  CAT  is  the category of a point in the map, PATH_ID is the path
131       identificator, STOP_ID is the identificator of the stop as used in  the
132       input  map, INDEX is the index of the stop on the path (i.e, index=1 is
133       the first stop visited, ...)  and  ARR_TIME  and  DEP_TIME  denote  the
134       arrival  time  and  departure  time  respectively. Arrival time for the
135       first stop on the path is always equal to START_TIME and departure time
136       for the last stop is always equal to the arrival time.
137       The  table  linked  to  the second layer corresponds to subroutes taken
138       between stops. The following table is obtainedd for the above query:
139       cat|path_id|from_id|to_id|route_id|index|from_time|to_time
140       1|47|130|250|15|1|15|22
141       2|47|250|300|-1|2|22|24
142       where CAT is the category of lines of subroute between stops FROM_ID to
143       TO_ID,  ROUTE_ID is the identificator of the route taken or -1 if walk‐
144       ing, INDEX and PATH_ID are as above and FROM_TIME  and  TO_TIME  denote
145       the times between which the route is taken.
146       The output map contains the points on the positions of used stops. If a
147       subroute is taken between two  stops  then  a  line  segment  is  added
148       between  two  corresponding  points.  Finally, instead of straight line
149       segment, the actual paths of routes can be given  in  paths  layer.  If
150       this  parameter  is  used  then each line in the input map must contain
151       identificators as category numbers of all routes  passing  through  the
152       line.  The module then finds the path between two stops and writes this
153       path instead. In case of walking from one  stop  to  another,  straight
154       line between the stops is used.
155

NOTES

157       Timetables are stored in a table linked to the given layer of the input
158       map. Timetable consists of routes and each route is just a sequence  of
159       stops  with  specified  arrival times. If two sequences of stops differ
160       only in times then they still correspond to two routes. For example, if
161       there is a bus line that leaves every 20 minutes and follow exactly the
162       same path every time then there still needs to be a separate route  for
163       every  time.  For each stop (given by the category number of the point)
164       the table storing information about the routes must contain the list of
165       all routes stopping at the stop(given by route identificators) together
166       with arrival times. That is, the table must contain three columns: stop
167       -  which  is  the  key  of the table, route_id and stop_time where each
168       triple corresponds to a route arriving to a stop and  a  certain  time.
169       For example, a valid table might look as follows:
170       cat|route_id|stop_time
171       100|5|0
172       130|5|10
173       150|5|20
174       250|5|30
175       300|5|40
176       260|15|5
177       130|15|15
178       250|15|22
179       150|35|17
180       250|35|27
181       300|35|37
182       100|35|50
183       Note  that  stop_time  is  an  integer and so you can use any units and
184       offest to specify arrival times.
185       Also, walking connections between stops can be given by a table  linked
186       to walking layer of the input map. If this parameter is -1 then walking
187       between stops is not allowed. The table  must  contain  three  columns:
188       stop  -  which is the key of the table, to_stop and length. A record in
189       the table says that it takes length
190        units of time to walk from stop to to_stop. The following is  a  valid
191       table:
192       cat|length|to_stop
193       250|2|300
194       Beware  that  this only means that it is possible to walk from stop 250
195       to stop 300 but not the other way round.
196

EXAMPLES

198       To find a path from stop with identificator 130 to stop  with  category
199       300,  starting  at  time 0, with one time unit for change, maximum of 5
200       changes and with walking not considered a change of route, we  use  the
201       following command:
202       echo "47 130 300 0 1 5 0" | v.net.timetable \
203            input=buses output=path layer=5 walking=6 path=7
204       If,  on  the other hand, we know the coordinates of the places then the
205       following command might be used:
206       echo "47 10.31 54.31 90.21 28.21 0 1 5 0" | v.net.timetable \
207            input=buses output=path layer=5 walking=6 path=7
208

SEE ALSO

210        v.net, v.net.path, v.net.distance
211

AUTHORS

213       Daniel Bundala, Google Summer of Code 2009, Student
214       Wolf Bergenheim, Mentor
215

SOURCE CODE

217       Available at: v.net.timetable source code (history)
218
219       Main index | Vector index | Topics index | Keywords index  |  Graphical
220       index | Full index
221
222       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
223
224
225
226GRASS 7.8.5                                                 v.net.timetable(1)
Impressum