-
Notifications
You must be signed in to change notification settings - Fork 8
/
configuration.py
89 lines (84 loc) · 1.97 KB
/
configuration.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
class Configuration:
accepted_highways = {}
accepted_highways["pedestrian"] = {
"primary",
"secondary",
"tertiary",
"unclassified",
"residential",
"service",
"primary_link",
"secondary_link",
"tertiary_link",
"living_street",
"pedestrian",
"track",
"road",
"footway",
"steps",
"path",
}
accepted_highways["bicycle"] = {
"primary",
"secondary",
"tertiary",
"unclassified",
"residential",
"service",
"primary_link",
"secondary_link",
"tertiary_link",
"living_street",
"track",
"road",
"path",
"cycleway",
}
accepted_highways["car"] = {
"motorway",
"trunk",
"primary",
"secondary",
"tertiary",
"unclassified",
"residential",
"service",
"motorway_link",
"trunk_link",
"primary_link",
"secondary_link",
"tertiary_link",
"living_street",
}
speed_limits = {
"motorway": 120,
"trunk": 120,
"primary": 100,
"secondary": 100,
"tertiary": 70,
"motorway_link": 60,
"trunk_link": 60,
"primary_link": 60,
"secondary_link": 60,
"unclassified": 50,
"tertiary_link": 35,
"residential": 30,
"service": 10,
"living_street": 5,
"pedestrian": 5,
"track": 5,
"road": 5,
"footway": 5,
"steps": 5,
"path": 5,
"cycleway": 5,
"pedestrian_indoor": 5,
}
walking_speed = 5
max_highway_speed = 120
extension = {"pedestrian": "pypgr", "car": "pycgr", "bicycle": "pybgr"}
network_type = None
def __init__(self, network_type="pedestrian"):
self.network_type = network_type
def get_file_extension(self):
return self.extension[self.network_type]