Refactoring, more work

This commit is contained in:
Pieter Vander Vennet 2020-05-11 13:40:14 +02:00
parent e9e41e170c
commit a8f2dae1fc
40 changed files with 1099 additions and 140 deletions

View file

@ -0,0 +1,5 @@
access,oneway,speed,priority,highway,_relation:bicycle.network_by_operator
no,both,0,0,,
yes,both,15,1.9,residential,
yes,both,15,6.9,residential,yes
dismount,both,2.25,0.0195,footway,
1 access oneway speed priority highway _relation:bicycle.network_by_operator
2 no both 0 0
3 yes both 15 1.9 residential
4 yes both 15 6.9 residential yes
5 dismount both 2.25 0.0195 footway

View file

@ -0,0 +1,61 @@
{
"name": "bicycle.comfort",
"description": "Gives a comfort factor for a road, purely based on physical aspects of the road, which is a bit subjective; this takes a bit of scnery into account with a preference for `railway=abandoned` and `towpath=yes`",
"unit": "[0, 2]",
"$default": 1,
"value": {
"$multiply": {
"highway": {
"cycleway": 1.2,
"primary": 0.3,
"secondary": 0.4,
"tertiary": 0.5,
"unclassified": 0.8,
"track": 0.95,
"residential": 1.0,
"living_street": 1.1,
"footway": 0.95,
"path": 0.5
},
"railway": {
"abandoned": 2
},
"towpath": {
"yes": 2
},
"cycleway": {
"track": 1.2
},
"cyclestreet": {
"yes": 1.1
},
"access": {
"designated": 1.2,
"dismount": 0.01
},
"surface": {
"#": "The surface mapping heavily resembles the one in speed_factor, but it is not entirely the same",
"paved": 0.99,
"concrete:lanes": 0.8,
"concrete:plates": 1.0,
"sett": 0.9,
"unhewn_cobblestone": 0.75,
"cobblestone": 0.8,
"unpaved": 0.75,
"compacted": 1.1,
"fine_gravel": 0.99,
"gravel": 0.9,
"dirt": 0.6,
"earth": 0.6,
"grass": 0.6,
"grass_paver": 0.9,
"ground": 0.7,
"sand": 0.5,
"woodchips": 0.5,
"snow": 0.5,
"pebblestone": 0.5,
"mud": 0.4
}
}
}
}

View file

@ -0,0 +1,18 @@
expected,highway,foot,bicycle,cyclestreet,cycleway,cycleway:right,surface,railway,towpath
1,,,,,,,,,
1,residential,,,,,,,,
1.1,residential,,,yes,,,,,
1.2,cycleway,,,,,,,,
1.2,cycleway,designated,,,,,,,
0.5,path,designated,designated,,,,,,
0.5,path,,designated,,,,,,
0.95,footway,designated,,,,,,,
0.3,primary,,,,no,,,,
0.3,primary,,,,yes,,,,
0.36,primary,,,,track,,,,
0.4,secondary,,,,lane,,,,
0.4,secondary,,,,,lane,asphalt,,
1.1,residential,,,yes,,,asphalt,,
2,,,,,,,,abandoned,
2,,,,,,,,,yes
4,,,,,,,,abandoned,yes
1 expected highway foot bicycle cyclestreet cycleway cycleway:right surface railway towpath
2 1
3 1 residential
4 1.1 residential yes
5 1.2 cycleway
6 1.2 cycleway designated
7 0.5 path designated designated
8 0.5 path designated
9 0.95 footway designated
10 0.3 primary no
11 0.3 primary yes
12 0.36 primary track
13 0.4 secondary lane
14 0.4 secondary lane asphalt
15 1.1 residential yes asphalt
16 2 abandoned
17 2 yes
18 4 abandoned yes

View file

@ -0,0 +1,80 @@
{
"name": "bicycle.legal_access",
"description": "Gives, for each type of highway, whether or not a normal bicycle can enter legally.\nNote that legal access is a bit 'grey' in the case of roads marked private and permissive, in which case these values are returned ",
"unit": "'designated': Access is allowed and even specifically for bicycles\n'yes': bicycles are allowed here\n'permissive': bicycles are allowed here, but this might be a private road or service where usage is allowed, but could be retracted one day by the owner\n'dismount': cycling here is not allowed, but walking with the bicycle is\n'destination': cycling is allowed here, but only if truly necessary to reach the destination\n'private': this is a private road, only go here if the destination is here\n'no': do not cycle here",
"$default": "no",
"value": {
"$firstMatchOf": [
"anyways:bicycle",
"anyways:access",
"anyways:construction",
"bicycle",
"access",
"cycleway:right",
"cycleway:left",
"cycleway",
"highway"
],
"value": {
"access": {
"no": "no",
"customers": "private",
"private": "private",
"#": "Note that we leave out 'yes', as it is meaningless - the default assumption is that everything on OSM is accessible! This forces to fall through to the road type, in order to force `highway=motorway; access=yes` as not to trigger access for bicycles",
"permissive": "permissive",
"destination": "destination",
"delivery": "destination",
"service": "destination"
},
"highway": {
"cycleway": "designated",
"residential": "yes",
"living_street": "yes",
"service": "yes",
"services": "yes",
"track": "yes",
"crossing": "dismount",
"footway": "dismount",
"pedestrian": "dismount",
"corridor": "dismount",
"path": "yes",
"primary": "no",
"primary_link": "no",
"secondary": "yes",
"secondary_link": "yes",
"tertiary": "yes",
"tertiary_link": "yes",
"unclassified": "yes",
"road": "yes"
},
"bicycle": {
"yes": "yes",
"no": "no",
"use_sidepath": "no",
"designated": "designated",
"permissive": "permissive",
"private": "private",
"official": "designated",
"dismount": "dismount"
},
"cycleway:right": {
"$not": "no"
},
"cycleway:left": {
"$not": "no"
},
"cycleway": {
"$not": "no"
},
"anyways:bicycle": "$id",
"anyways:access": {
"no": "no",
"destination": "destination",
"yes": "yes"
},
"anyways:construction": {
"yes": "no"
}
}
}
}

View file

@ -0,0 +1,20 @@
expected,highway,bicycle,access,anyways:access,cycleway:right,cycleway:right
no,,,,,,
no,,,no,,,
yes,,yes,no,,,
yes,path,,,,,
yes,pedestrian,yes,,,,
dismount,pedestrian,,,,,
designated,cycleway,,,,,
destination,residential,,destination,,,
private,residential,,private,,,
designated,residential,designated,,,,
designated,motorway,designated,,,,
no,residential,use_sidepath,,,,
yes,residential,,no,yes,,
no,primary,,,,,
yes,primary,,,,yes,
yes,primary,,,,,yes
yes,secondary,,,,track,
destination,service,,destination,,,
no,residential,use_sidepath,,,,
1 expected highway bicycle access anyways:access cycleway:right cycleway:right
2 no
3 no no
4 yes yes no
5 yes path
6 yes pedestrian yes
7 dismount pedestrian
8 designated cycleway
9 destination residential destination
10 private residential private
11 designated residential designated
12 designated motorway designated
13 no residential use_sidepath
14 yes residential no yes
15 no primary
16 yes primary yes
17 yes primary yes
18 yes secondary track
19 destination service destination
20 no residential use_sidepath

View file

@ -0,0 +1,15 @@
{
"name": "bicycle.network_by_operator",
"description": "The 'bicycle.network_score' returns true if the way is part of a cycling network of a certain (group of) operators",
"$memberOf": {
"$mustMatch": {
"type": "route",
"route": "bicycle",
"#": {
"note": "This block is commented out. A lot of networks we want to perform route planning on, are still proposed",
"state": {"$not": "proposed"}},
"operator": {"$containedIn": "#networkOperator"}
}
}
}

View file

@ -0,0 +1,12 @@
{
"name": "bicycle.network_is_bicycle_network",
"description": "The 'bicycle.network_score' returns true if the way is part of a cycling network",
"$memberOf": {
"$mustMatch": {
"type": "route",
"route": "bicycle",
"state": {"$notEq": "proposed"}
}
}
}

View file

@ -0,0 +1,13 @@
{
"name": "bicycle.network_is_cyclehighway",
"description": "Returns true if the highway is part of a [cycle highway](https://wiki.openstreetmap.org/wiki/Tag:cycle_network%3Dcycle_highway)",
"$memberOf": {
"$mustMatch": {
"type": "route",
"route": "bicycle",
"state": {"$not": "proposed"},
"cycle_network": "cycle_highway"
}
}
}

View file

@ -0,0 +1,13 @@
{
"name": "bicycle.network_is_nodenetwork",
"description": "Returns true if the highway is part of a [cycle node network](https://wiki.openstreetmap.org/wiki/Cycle_Node_Network_Tagging)",
"$memberOf": {
"$mustMatch": {
"type": "route",
"route": "bicycle",
"state": {"$not": "proposed"},
"network:type": "node_network"
}
}
}

View file

@ -0,0 +1,50 @@
{
"name": "bicycle.oneway",
"description": "Determines wether or not a bicycle can go in both ways in this street, and if it is oneway, in what direction",
"unit": "both: direction is allowed in both direction\nwith: this is a oneway street with direction allowed with the grain of the way\nagainst: oneway street with direction against the way",
"$default": "both",
"value": {
"$firstMatchOf": [
"oneway:bicycle",
"junction",
"cycleway",
"cycleway:left",
"oneway"
],
"value": {
"oneway": {
"yes": "with",
"no": "both",
"1": "with",
"-1": "against"
},
"oneway:bicycle": {
"yes": "with",
"no": "both",
"1": "with",
"-1": "against"
},
"junction": {
"roundabout": "with"
},
"cycleway": {
"right": "against",
"#": "We ignore 'no' as it has no meaning and is the default assumption",
"opposite_lane": "both",
"track": "both",
"lane": "both",
"opposite": "both",
"opposite_share_busway": "both",
"opposite_track": "both"
},
"cycleway:left": {
"no": "with",
"yes": "both",
"lane": "both",
"track": "both",
"shared_lane": "both",
"share_busway": "both"
}
}
}
}

View file

@ -0,0 +1,19 @@
expected,highway,oneway,oneway:bicycle,junction,cycleway,cycleway:right,cycleway:left
both,,,,,,,
both,,no,,,,,
with,,no,yes,,,,
with,,,,roundabout,,,
both,,yes,,,opposite,,
against,,yes,-1,,,,
with,residential,yes,,,,,
both,residential,no,,,,,
both,residential,yes,no,,,,
with,residential,,,roundabout,,,
both,residential,,no,roundabout,,,
against,residential,,-1,,,,
both,residential,invalidKey,no,,,,
with,secondary,yes,,,,track,
both,secondary,yes,,,,,track
both,secondary,yes,,,track,,
with,,yes,,,,,no
both,residential,yes,,,,,lane
1 expected highway oneway oneway:bicycle junction cycleway cycleway:right cycleway:left
2 both
3 both no
4 with no yes
5 with roundabout
6 both yes opposite
7 against yes -1
8 with residential yes
9 both residential no
10 both residential yes no
11 with residential roundabout
12 both residential no roundabout
13 against residential -1
14 both residential invalidKey no
15 with secondary yes track
16 both secondary yes track
17 both secondary yes track
18 with yes no
19 both residential yes lane

View file

@ -0,0 +1,76 @@
{
"name": "bicycle.safety",
"description": "Determines how safe a cyclist feels on a certain road, mostly based on car pressure. This is a relatively ",
"unit": "safety",
"$default": 1,
"value": {
"$multiply": {
"access": {
"#": "access=no and access 'destination' implies this access for cars too and is a bonus!",
"no": 1.5,
"destination": 1.4,
"dismount": 0.01,
"designated": 1.5
},
"motor_vehicle": {
"no": 1.5,
"destination": 1.4
},
"foot": {
"designated": 0.95
},
"bicycle": {
"designated": 1.5
},
"cyclestreet": {
"yes": 1.5
},
"towpath": {
"yes": 1.1
},
"designation": {
"towpath": 1.5
},
"highway": {
"cycleway": 1.0,
"primary": 0.3,
"secondary": 0.4,
"tertiary": 0.5,
"unclassified": 0.8,
"track": 0.95,
"residential": 0.9,
"living_street": 0.95,
"footway": 0.95,
"path": 0.9
},
"cycleway": {
"yes": 0.95,
"#": "TODO: the implied value for quite a bit of roads (residential, unclassified) is 'no', so this is a bit weird",
"no": 0.5,
"lane": 1,
"shared": 0.8,
"shared_lane": 0.8,
"share_busway": 0.9,
"track": 1.5
},
"cycleway:left": {
"yes": 0.95,
"no": 0.5,
"lane": 1,
"shared": 0.8,
"shared_lane": 0.8,
"share_busway": 0.9,
"track": 1.5
},
"cycleway:right": {
"yes": 0.95,
"no": 0.5,
"lane": 1,
"shared": 0.8,
"shared_lane": 0.8,
"share_busway": 0.9,
"track": 1.5
}
}
}
}

View file

@ -0,0 +1,13 @@
expected,highway,cycleway,cyclestreet,foot,bicycle,cycleway:right,access
0.15,primary,no,,,,,
0.285,primary,yes,,,,,
0.45,primary,track,,,,,
0.4,secondary,lane,,,,,
0.9,residential,,,,,,
1.5,cycleway,,,,,,designated
1.35,residential,,yes,,,,
0.95,cycleway,,,designated,,,
0.9025,footway,,,designated,,,
1.2825,path,,,designated,designated,,
1.35,path,,,,designated,,
0.4,secondary,,,,,lane,
1 expected highway cycleway cyclestreet foot bicycle cycleway:right access
2 0.15 primary no
3 0.285 primary yes
4 0.45 primary track
5 0.4 secondary lane
6 0.9 residential
7 1.5 cycleway designated
8 1.35 residential yes
9 0.95 cycleway designated
10 0.9025 footway designated
11 1.2825 path designated designated
12 1.35 path designated
13 0.4 secondary lane

View file

@ -0,0 +1,62 @@
{
"name": "bicycle.speed_factor",
"description": "Calculates a speed factor for bicycles based on physical features, e.g. a sand surface will slow a cyclist down; going over pedestrian areas even more, ...",
"$multiply": {
"access": {
"#": "We have to go by foot. Default speed of 20km/h * 0.15 = 3km/h",
"dismount": 0.15
},
"highway": {
"#": "A small forest path is typically slow",
"path": 0.5,
"#": "an unmaintained track (in Belgium: tractor path) is slower as well",
"track": 0.7
},
"surface": {
"paved": 0.99,
"asphalt": 1,
"concrete": 1,
"metal": 1,
"wood": 1,
"concrete:lanes": 0.95,
"concrete:plates": 1,
"paving_stones": 1,
"sett": 0.9,
"unhewn_cobblestone": 0.75,
"cobblestone": 0.8,
"unpaved": 0.75,
"compacted": 0.99,
"fine_gravel": 0.99,
"gravel": 0.9,
"dirt": 0.6,
"earth": 0.6,
"grass": 0.6,
"grass_paver": 0.9,
"ground": 0.7,
"sand": 0.5,
"woodchips": 0.5,
"snow": 0.5,
"pebblestone": 0.5,
"mud": 0.4
},
"tracktype": {
"grade1": 0.99,
"grade2": 0.8,
"grade3": 0.6,
"grade4": 0.3,
"grade5": 0.1
},
"incline": {
"up": 0.75,
"down": 1.25,
"0": 1,
"0%": 1,
"10%": 0.9,
"-10%": 1.1,
"20%": 0.8,
"-20%": 1.2,
"30%": 0.7,
"-30%": 1.3
}
}
}

View file

@ -0,0 +1,13 @@
expected,incline,surface,highway,access
1,,,,
1,,,residential,
0.75,up,,residential,
1.25,down,,residential,
0.3,up,mud,residential,
1.125,down,sett,residential,
0.675,up,sett,residential,
0.9,,sett,residential,
1,,asphalt,residential,
0.15,,,residential,dismount
0.0315,up,mud,track,dismount
0.9,,sett,primary,
1 expected incline surface highway access
2 1
3 1 residential
4 0.75 up residential
5 1.25 down residential
6 0.3 up mud residential
7 1.125 down sett residential
8 0.675 up sett residential
9 0.9 sett residential
10 1 asphalt residential
11 0.15 residential dismount
12 0.0315 up mud track dismount
13 0.9 sett primary

View file

@ -0,0 +1,18 @@
{
"name":"speedPedelec.access_be",
"description": "Describes where a speedpedelec (moped_p) can and can not go. This is quite different from a normal bike",
"$default":"no",
"value":{
"$firstMatchOf":["access","speed_pedelec"],
"mapping":{
"access":{
"no":"no"
},
"speed_pedelec":{
"no":"no",
"yes":"yes",
"designated":"designated"
}
}
}
}

View file

@ -0,0 +1,6 @@
access,oneway,speed,priority,highway,_relation:bicycle.network_by_operator,_relation:bicycle.network_is_cyclehighway
no,,,,,,
yes,both,15,19.7,residential,,
yes,both,15,22.7,residential,yes,
yes,both,15,22.7,residential,,yes
yes,both,15,25.7,residential,yes,yes
1 access oneway speed priority highway _relation:bicycle.network_by_operator _relation:bicycle.network_is_cyclehighway
2 no
3 yes both 15 19.7 residential
4 yes both 15 22.7 residential yes
5 yes both 15 22.7 residential yes
6 yes both 15 25.7 residential yes yes

View file

@ -0,0 +1,4 @@
access,oneway,speed,priority,highway,_relation:bicycle.network_score
no,,,,,
designated,both,15,2,cycleway,
designated,both,15,22,cycleway,yes
1 access oneway speed priority highway _relation:bicycle.network_score
2 no
3 designated both 15 2 cycleway
4 designated both 15 22 cycleway yes

View file

@ -0,0 +1,12 @@
access,oneway,speed,priority,highway,bicycle,surface,cycleway:left,oneway,oneway:bicycle,access,maxspeed
no,both,0,0,,,,,,,,
designated,both,15,15,cycleway,,,,,,,
no,both,0,0,primary,,,,,,,
yes,both,15,15,primary,yes,,,,,,
yes,both,15,15,residential,,,,,,,
yes,both,13.5,13.5,residential,yes,sett,,,,,
dismount,both,2.25,2.25,pedestrian,,,,,,,
yes,both,15,15,pedestrian,yes,,,,,,
yes,both,15,15,unclassified,,,track,yes,no,,
yes,both,15,15,service,,,,,,,
yes,both,15,15,tertiary,,,,,,yes,50
1 access oneway speed priority highway bicycle surface cycleway:left oneway oneway:bicycle access maxspeed
2 no both 0 0
3 designated both 15 15 cycleway
4 no both 0 0 primary
5 yes both 15 15 primary yes
6 yes both 15 15 residential
7 yes both 13.5 13.5 residential yes sett
8 dismount both 2.25 2.25 pedestrian
9 yes both 15 15 pedestrian yes
10 yes both 15 15 unclassified track yes no
11 yes both 15 15 service
12 yes both 15 15 tertiary yes 50

View file

@ -0,0 +1,149 @@
{
"name": "bicycle",
"description": "A simple profile which routes a normal bicycle",
"vehicletypes": [
"vehicle",
"bicycle"
],
"metadata": [
"name",
"bridge",
"tunnel",
"colour",
"cycle_network_colour",
"ref",
"status",
"network"
],
"access": "$bicycle.legal_access",
"oneway": "$bicycle.oneway",
"speed": {
"$min": [
"$legal_maxspeed_be",
"#maxspeed",
{
"$multiply": [
"#defaultSpeed",
"$bicycle.speed_factor"
]
}
]
},
"priority": {
"#comfort": "$bicycle.comfort",
"#safety": "$bicycle.safety",
"#operatorNetworkScore": "$bicycle.network_by_operator",
"#cycleHighwayNetworkScore": "$bicycle.network_is_cyclehighway",
"#nodeNetworkScore": "$bicycle.network_is_nodenetwork",
"#bicycleNetworkScore": "$bicycle.network_is_bicycle_network",
"#timeNeeded": "$speed",
"#distance": "$distance",
"#trespassingPenalty":"$clean_permission_score"
},
"defaults": {
"#defaultSpeed": 15,
"#maxspeed": 30,
"#timeNeeded": 0,
"#distance": 0,
"#comfort": 0,
"#safety": 0,
"#operatorNetworkScore": 0,
"#networkOperator": [],
"#cycleHighwayNetworkScore": 0,
"#nodeNetworkScore": 0,
"#bicycleNetworkScore": 0,
"#trespassingPenalty": 15
},
"behaviours": {
"fastest": {
"description": "The fastest route to your destination",
"#timeNeeded": 1
},
"shortest": {
"description": "The shortest route, independent of of speed",
"#distance": 1
},
"safety": {
"description": "A defensive route shying away from big roads with lots of cars",
"#safety": 1
},
"comfort": {
"description": "A comfortable route preferring well-paved roads, smaller roads and a bit of scenery at the cost of speed",
"#comfort": 1
},
"comfort_safety": {
"description": "A route which aims to be both safe and comfortable at the cost of speed",
"#comfort": 1,
"#safety": 1
},
"electrical.fastest": {
"description": "A profile for a bike with an electrical motor where the engine doesn't go faster then 25km/h (thus NOT the speed-pedelec). This is a variation of the normal fastest, but with a faster default speed. As the maxspeed is 30, it'll resemble shortest a bit more on 'normal' streets and will penalize slower roads more",
"#defaultSpeed": 23,
"#maxspeed": 30,
"#timeNeeded": 1
},
"networks": {
"description": "A recreative route following any existing cycling network. Might make a few detours",
"#bicycleNetworkScore": 3,
"#safety": 1
},
"brussels": {
"description": "A route preferring the cycling network by operator 'Brussels Mobility'",
"#operatorNetworkScore": 5,
"#networkOperator": [
"Brussels Mobility"
],
"#comfort": 1,
"#safety": 1
},
"genk": {
"description": "A route preferring the cycling network by operator 'Stad Genk'",
"#operatorNetworkScore": 5,
"#networkOperator": [
"Stad Genk"
],
"#comfort": 0,
"#safety": 1
},
"cycle_highway": {
"description": "A route preferring the 'cycle-highways' ",
"#cycleHighwayNetworkScore": 20,
"#safety": 0
},
"node_network": {
"description": "A route following the recreational node network. Might make detours",
"#nodeNetworkScore": 10,
"#safety": 1
},
"commute": {
"description": "A route for a daily commuter, prefers the 'cycle-highways' or the cycling network by operator 'Brussels Mobility', with a pinch of safety and comfort",
"#operatorNetworkScore": 3,
"#networkOperator": [
"Brussels Mobility"
],
"#cycleHighwayNetworkScore": 3,
"#timeNeeded": 1,
"#comfort": 2,
"#safety": 3
},
"b2w": {
"description": "[Custom] Route specifically for Bike2Work. Same as commute at this moment. A route preferring the 'cycle-highways' or the cycling network by operator 'Brussels Mobility'",
"#operatorNetworkScore": 3,
"#networkOperator": [
"Brussels Mobility"
],
"#cycleHighwayNetworkScore": 3,
"#timeNeeded": 1,
"#comfort": 2,
"#safety": 3
},
"anyways.network": {
"description": "[Internal use] A route using the Anyways branded network; mainly used in ShortCut/Impact",
"#timeNeeded": 1,
"#operatorNetworkScore": 10,
"#networkOperator": [
"Anyways"
]
}
}
}

View file

@ -0,0 +1,6 @@
access,oneway,speed,priority,highway,_relation:bicycle.network_is_bicycle_network
no,,,,,
designated,both,15,1.5,cycleway,
designated,both,15,4.5,cycleway,yes
yes,both,15,0.9,residential,
yes,both,15,3.9,residential,yes
1 access oneway speed priority highway _relation:bicycle.network_is_bicycle_network
2 no
3 designated both 15 1.5 cycleway
4 designated both 15 4.5 cycleway yes
5 yes both 15 0.9 residential
6 yes both 15 3.9 residential yes

View file

@ -0,0 +1,4 @@
access,oneway,speed,priority,highway,surface
no,both,0,0,,
designated,both,15,1,cycleway,
yes,both,5.25,1,path,ground
1 access oneway speed priority highway surface
2 no both 0 0
3 designated both 15 1 cycleway
4 yes both 5.25 1 path ground

View file

@ -0,0 +1,42 @@
{
"name": "small",
"description": "A minimal example, to start designing a profile or to debug",
"vehicletypes": [
"vehicle",
"bicycle"
],
"metadata": [
"name"
],
"defaults": {
"#defaultSpeed": 15,
"#distance": 0,
"#operatorNetworkScore": 0,
"#networkOperator":[]
},
"behaviours": {
"shortest": {
"description": "The shortest route, independent of of speed",
"#distance": 1
},
"fastest": {
"description": "The fastest route",
"#distance": 1
},
"genk": {
"description": "The Genk routeplanner",
"#distance": 0.01,
"#operatorNetworkScore": 5,
"#networkOperator": [
"Stad Genk"
]
}
},
"access": "$bicycle.legal_access",
"oneway": "$bicycle.oneway",
"speed": "#defaultSpeed",
"priority": {
"#distance": "$distance",
"#operatorNetworkScore": "$bicycle.network_by_operator"
}
}

View file

@ -0,0 +1,41 @@
{
"name":"speedPedelec",
"description":"A vehicle specifically for speed pedelec (aka Moped P) with Belgian legislation in mind. A speed pedelec is a kind of electrical bike with a maxspeed of 45km/h. Due to the high speed, this is considered a kind of moped or motorcycle for belgian law. Sources for more information are [speedpedelecVlaanderen.be](https://speedpedelecvlaanderen.be/infrastructuur-en-regelgeving/wegcode/relevante-verkeersborden/), [Fietsersbond](https://www.fietsersbond.be/speedpedelec)",
"defaults":{
"#defaultSpeed": 25,
"#maxspeed":45,
"#distance":0
},
"vehicletypes":["vehicle","motor_vehicle","moped_p"],
"metadata": [
"name",
"bridge",
"tunnel",
"colour",
"cycle_network_colour",
"ref",
"status",
"network"
],
"behaviours":{
"shortest":{
"description":"The shortest path",
"#distance":1
}
},
"speed":{
"$min":
[
{"$multiply":["#defaultSpeed", "$bicycle.speed_factor"]},
"$legal_maxspeed_be",
"#maxspeed"
]
},
"access":"$speedPedelec.access_be",
"oneway":"$bicycle.oneway",
"priority":{
"#distance": 1
}
}

View file

@ -0,0 +1,19 @@
{
"name": "rollerskate.can_access",
"description": "Determines if it is possible to skate (or at least pass) over a certain way",
"$default": "no",
"value": {
"highway": {
"residential": "yes",
"service": "yes",
"tertiary": "yes",
"tertiary_link": "yes",
"secondary": "yes",
"secondary_link": "yes",
"cycleway": "yes",
"footway": "yes",
"unclassified": "yes",
"living_street":"yes"
}
}
}

View file

@ -0,0 +1,38 @@
{
"name": "rollerskate.comfort",
"description": "How smooth is this road, on a factor 0 (horrible) to 1 (excellent)?",
"$default": 0.3,
"value": {
"$firstMatchOf": [
"highway",
"smoothness",
"surface",
"sidewalk:surface"
],
"value": {
"highway": {
"primary": 0.2,
"secondary": 0.2
},
"smoothness": {
"excellent": 1,
"very_good": 0.95,
"good": 0.75,
"intermediate": 0.5,
"bad": 0.1
},
"surface": {
"asphalt": 0.7,
"concrete": 0.7,
"paving_stones": 0.65,
"sett": 0.01
},
"sidewalk:surface": {
"asphalt": 0.7,
"concrete": 0.7,
"paving_stones": 0.65,
"sett": 0.01
}
}
}
}

View file

@ -0,0 +1,32 @@
{
"name": "rollerskate",
"description": "Tries to find a suitable way to rollerskate somewhere. Uses mostly smoothness and surface to determine where to go",
"access": "$rollerskate.can_access",
"oneway": "both",
"speed": {
"$multiply": [
"#defaultSpeed",
"$rollerskate.comfort"
]
},
"priority": {
"#speedFactor": "$speed"
},
"behaviours": {
"fastest": {
"description": "The fastest (and thus smoothest) route",
"#speedFactor": 1
}
},
"defaults": {
"#defaultSpeed": 20,
"#speedFactor": 0
},
"vehicletypes": [
"vehicle",
"rollerskate"
],
"metadata": [
"name"
]
}