Actually add the examples

This commit is contained in:
Pieter Vander Vennet 2021-01-27 16:14:10 +01:00
parent 142e192ff9
commit c98b434370
27 changed files with 1928 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{
"name": "clean_permission_score",
"description": "Gives 0 on private roads, 0.1 on destination-only roads, and 0.9 on permissive roads; gives 1 by default. This helps to select roads with no access retrictions on them",
"$default": 0,
"value": {
"access": {
"private": -50,
"destination": -3,
"permissive": -1
}
}
}

View file

@ -0,0 +1,5 @@
expected,access
0,yes
-1,permissive
-50,private
0,qmsldkfjqsmldkfj
1 expected access
2 0 yes
3 -1 permissive
4 -50 private
5 0 qmsldkfjqsmldkfj

View file

@ -0,0 +1,46 @@
{
"name": "ferry_speed",
"description": "Gives the expected speed for a ferry. This includes the time needed to board and the expected waiting time (if duration is present). This uses the tag '_length', which is expected to be added by the preprocessing-step.",
"unit": "km/h",
"value": {
"$ifDotted": {
"route": {
"ferry": "yes"
}
},
"then": {
"#": "(length (m) / (duration (minutes) + 5 minutes slack)) * 0.06 minutes/kilometer",
"$multiply": [
{
"#": "The default value is chosen so that it defaults to 1km/h",
"$default": 83.33333333333333,
"value": {
"_length": "$parse"
}
},
{
"$inv": {
"$sum": [
{
"duration": "$parse"
},
{
"$multiply": [
{
"#": "Time needed to get on. We assume a continous ferry (pull it your self) which takes a few minutes to be free. If an interval is specified, we take a quarter of the interval as we assume that people will take into account the schedule",
"$default": 20,
"value": {
"interval": "$parse"
}
},
0.2
]
}
]
}
},
0.06
]
}
}
}

View file

@ -0,0 +1,9 @@
expected,route,duration,interval,_length,comment
1.25,ferry,,,
2,ferry,26,,1000,26 minutes duration + 4 minutes to get on is 30 minutes total for one kilometer -> 2 km/h
4,ferry,11,,1000,10 minutes duration + 4 minutes to get on is 15 minutes total for one kilometer -> 4km/h
null,,,,Ferry is not set
21.465,ferry,00:16,,7155,Waterbus SintAnna-Zwijndrecht - osm.org/way/632117702
19.513636363636365,ferry,00:16,00:30,7155,Waterbus SintAnna-Zwijndrecht - osm.org/way/632117702
10.7325,ferry,00:16,2:00,7155,Non-regular waterbus which goes every two hours. Expected time ppl will wait: 24minutes + 16minutes faring duration = 40minutes for 7km = ~9km/h
30,ferry,0:,0:1,100,
1 expected,route,duration,interval,_length,comment
2 1.25,ferry,,,
3 2,ferry,26,,1000,26 minutes duration + 4 minutes to get on is 30 minutes total for one kilometer -> 2 km/h
4 4,ferry,11,,1000,10 minutes duration + 4 minutes to get on is 15 minutes total for one kilometer -> 4km/h
5 null,,,,Ferry is not set
6 21.465,ferry,00:16,,7155,Waterbus SintAnna-Zwijndrecht - osm.org/way/632117702
7 19.513636363636365,ferry,00:16,00:30,7155,Waterbus SintAnna-Zwijndrecht - osm.org/way/632117702
8 10.7325,ferry,00:16,2:00,7155,Non-regular waterbus which goes every two hours. Expected time ppl will wait: 24minutes + 16minutes faring duration = 40minutes for 7km = ~9km/h
9 30,ferry,0:,0:1,100,

View file

@ -0,0 +1,42 @@
{
"name": "legal_maxspeed_be",
"description": "Gives, for each type of highway, which the default legal maxspeed is in Belgium. This file is intended to be reused for in all vehicles, from pedestrian to car. In some cases, a legal maxspeed is not really defined (e.g. on footways). In that case, a socially acceptable speed should be taken (e.g.: a bicycle on a pedestrian path will go say around 12km/h)",
"unit": "km/h",
"$default": 30,
"value": {
"$firstMatchOf": [
"maxspeed",
"designation",
"highway"
],
"value": {
"maxspeed": "$parse",
"highway": {
"cycleway": 30,
"footway": 20,
"crossing": 20,
"pedestrian": 15,
"path": 15,
"corridor": 5,
"residential": 30,
"living_street": 20,
"service": 30,
"services": 30,
"track": 50,
"unclassified": 50,
"road": 50,
"motorway": 120,
"motorway_link": 120,
"primary": 90,
"primary_link": 90,
"secondary": 50,
"secondary_link": 50,
"tertiary": 50,
"tertiary_link": 50
},
"designation": {
"towpath": 30
}
}
}
}

View file

@ -0,0 +1,5 @@
expected,highway,maxspeed
30,,
30,residential,
50,secondary,
70,secondary,70
1 expected highway maxspeed
2 30
3 30 residential
4 50 secondary
5 70 secondary 70