version 1.4.9
This commit is contained in:
parent
0171ba39a0
commit
c517ccc2df
43 changed files with 2002 additions and 508 deletions
|
|
@ -1 +1 @@
|
|||
javac -d . -cp pbfparser.jar;brouter.jar BPbfFieldDecoder.java BPbfBlobDecoder.java OsmParser.java
|
||||
javac -d . -cp pbfparser.jar;brouter.jar BPbfFieldDecoder.java BPbfBlobDecoder.java OsmParser.java OsmParser2.java
|
||||
|
|
|
|||
181
misc/profiles2/car-eco.brf
Normal file
181
misc/profiles2/car-eco.brf
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
#
|
||||
# Car-Routing based on a kinematic model
|
||||
#
|
||||
# Depending on the vmax-parameter (target-speed)
|
||||
# this can be anything from least-time routing to eco-routing
|
||||
#
|
||||
#
|
||||
---model:btools.router.KinematicModel
|
||||
|
||||
---context:global
|
||||
|
||||
# kinematic parameters
|
||||
|
||||
assign vmax = 90 # kmh
|
||||
assign recup_efficiency = 0.7 # (ratio)
|
||||
assign totalweight = 1640 # kg
|
||||
assign f_roll = 232 # Newton
|
||||
assign f_air = 0.4 # 0.5*cw*A*rho
|
||||
assign f_recup = 400 # Newton
|
||||
assign p_standby = 250 # Watt
|
||||
|
||||
# technical parameters
|
||||
|
||||
assign validForCars = true
|
||||
assign pass1coefficient = 1.3
|
||||
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
|
||||
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
assign initialcost switch route=ferry 20000 0
|
||||
|
||||
#
|
||||
# calculate logical car access
|
||||
#
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
switch access=
|
||||
switch highway=motorway|motorway_link 1
|
||||
switch highway=trunk|trunk_link 1
|
||||
switch highway=primary|primary_link 1
|
||||
switch highway=secondary|secondary_link 1
|
||||
switch highway=tertiary|tertiary_link 1
|
||||
switch highway=unclassified 1
|
||||
switch route=ferry 1
|
||||
switch highway=residential|living_street 1
|
||||
switch highway=service 1
|
||||
0
|
||||
access=yes|permissive|designated|destination
|
||||
vehicle=yes|designated|destination
|
||||
motor_vehicle=yes|permissive|designated|destination
|
||||
motorcar=yes|permissive|designated|destination
|
||||
|
||||
assign accessspeedlimit = if caraccess then 999 else 0
|
||||
|
||||
assign isbadoneway = if reversedirection=yes then ( if oneway= then junction=roundabout else oneway=yes|true|1 ) else oneway=-1
|
||||
assign onewayspeedlimit = if isbadoneway then 0 else 999
|
||||
|
||||
assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
|
||||
|
||||
assign maxspeed_surface =
|
||||
switch or surface= surface=paved|asphalt|concrete 999
|
||||
switch surface=paving_stones|cobblestone 30
|
||||
2
|
||||
|
||||
assign maxspeed_tracktype =
|
||||
switch tracktype= 999
|
||||
switch tracktype=grade1 40
|
||||
switch tracktype=grade2 5
|
||||
1
|
||||
|
||||
assign maxspeed_implicit =
|
||||
switch highway=motorway 999
|
||||
switch highway=motorway_link 130
|
||||
switch highway=trunk 250
|
||||
switch highway=trunk_link 100
|
||||
switch highway=primary|primary_link 100
|
||||
switch highway=secondary|secondary_link 90
|
||||
switch highway=tertiary|tertiary_link 80
|
||||
switch highway=unclassified 50
|
||||
switch route=ferry 10
|
||||
switch highway=bridleway 10
|
||||
switch highway=residential|living_street 30
|
||||
switch highway=service 30
|
||||
switch highway=track|road|path switch tracktype=grade1 30 5
|
||||
0
|
||||
|
||||
assign maxspeed =
|
||||
min onewayspeedlimit
|
||||
min accessspeedlimit
|
||||
switch maxspeed=50 50
|
||||
switch maxspeed=30 30
|
||||
switch maxspeed=10 10
|
||||
switch maxspeed=20 20
|
||||
switch maxspeed=40 40
|
||||
switch maxspeed=60 60
|
||||
switch maxspeed=70 70
|
||||
switch maxspeed=80 80
|
||||
switch maxspeed=90 90
|
||||
switch maxspeed=100 100
|
||||
switch maxspeed=110 110
|
||||
switch maxspeed=120 120
|
||||
switch maxspeed=130 130
|
||||
switch maxspeed=urban 50
|
||||
switch maxspeed=rural 100
|
||||
min maxspeed_implicit
|
||||
min maxspeed_surface maxspeed_tracktype
|
||||
|
||||
assign costfactor = if equal maxspeed 0 then 10000 else 0
|
||||
|
||||
assign minspeed =
|
||||
switch highway=motorway|trunk 75 0
|
||||
|
||||
# way priorities used for voice hint generation
|
||||
|
||||
assign priorityclassifier =
|
||||
|
||||
if ( highway=motorway ) then 30
|
||||
else if ( highway=motorway_link ) then 29
|
||||
else if ( highway=trunk ) then 28
|
||||
else if ( highway=trunk_link ) then 27
|
||||
else if ( highway=primary ) then 26
|
||||
else if ( highway=primary_link ) then 25
|
||||
else if ( highway=secondary ) then 24
|
||||
else if ( highway=secondary_link ) then 23
|
||||
else if ( highway=tertiary ) then 22
|
||||
else if ( highway=tertiary_link ) then 21
|
||||
else if ( highway=unclassified ) then 20
|
||||
else if ( highway=residential|living_street ) then 6
|
||||
else if ( highway=service ) then 6
|
||||
else if ( highway=track ) then if tracktype=grade1 then 4 else 2
|
||||
else if ( highway=bridleway|road ) then 2
|
||||
else 0
|
||||
|
||||
# some more classifying bits used for voice hint generation...
|
||||
|
||||
assign isgoodoneway = if reversedirection=yes then oneway=-1
|
||||
else if oneway= then junction=roundabout else oneway=yes|true|1
|
||||
assign isroundabout = junction=roundabout
|
||||
assign isgoodforcars = if greater priorityclassifier 6 then true
|
||||
else if highway=residential|living_street|service then true
|
||||
else if ( and highway=track tracktype=grade1 ) then true
|
||||
else false
|
||||
|
||||
# ... encoded into a bitmask
|
||||
|
||||
assign classifiermask add isbadoneway
|
||||
add multiply isgoodoneway 2
|
||||
add multiply isroundabout 4
|
||||
add multiply islinktype 8
|
||||
add multiply isgoodforcars 16
|
||||
multiply highway=residential|living_street 32
|
||||
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
#
|
||||
# calculate logical car access to nodes
|
||||
#
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
switch access=
|
||||
not barrier=gate|bollard|lift_gate|cycle_barrier
|
||||
access=yes|permissive|designated|destination
|
||||
vehicle=yes|permissive|designated|destination
|
||||
motor_vehicle=yes|permissive|designated|destination
|
||||
motorcar=yes|permissive|designated|destination
|
||||
|
||||
assign initialcost =
|
||||
|
||||
switch caraccess
|
||||
0
|
||||
1000000
|
||||
|
||||
assign maxspeed =
|
||||
|
||||
if or crossing=traffic_signals highway=traffic_signals then 0
|
||||
else 999
|
||||
181
misc/profiles2/car-fast.brf
Normal file
181
misc/profiles2/car-fast.brf
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
#
|
||||
# Car-Routing based on a kinematic model
|
||||
#
|
||||
# Depending on the vmax-parameter (target-speed)
|
||||
# this can be anything from least-time routing to eco-routing
|
||||
#
|
||||
#
|
||||
---model:btools.router.KinematicModel
|
||||
|
||||
---context:global
|
||||
|
||||
# kinematic parameters
|
||||
|
||||
assign vmax = 160 # kmh
|
||||
assign recup_efficiency = 0.7 # (ratio)
|
||||
assign totalweight = 1640 # kg
|
||||
assign f_roll = 232 # Newton
|
||||
assign f_air = 0.4 # 0.5*cw*A*rho
|
||||
assign f_recup = 400 # Newton
|
||||
assign p_standby = 250 # Watt
|
||||
|
||||
# technical parameters
|
||||
|
||||
assign validForCars = true
|
||||
assign pass1coefficient = 1.3
|
||||
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
|
||||
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
assign initialcost switch route=ferry 20000 0
|
||||
|
||||
#
|
||||
# calculate logical car access
|
||||
#
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
switch access=
|
||||
switch highway=motorway|motorway_link 1
|
||||
switch highway=trunk|trunk_link 1
|
||||
switch highway=primary|primary_link 1
|
||||
switch highway=secondary|secondary_link 1
|
||||
switch highway=tertiary|tertiary_link 1
|
||||
switch highway=unclassified 1
|
||||
switch route=ferry 1
|
||||
switch highway=residential|living_street 1
|
||||
switch highway=service 1
|
||||
0
|
||||
access=yes|permissive|designated|destination
|
||||
vehicle=yes|designated|destination
|
||||
motor_vehicle=yes|permissive|designated|destination
|
||||
motorcar=yes|permissive|designated|destination
|
||||
|
||||
assign accessspeedlimit = if caraccess then 999 else 0
|
||||
|
||||
assign isbadoneway = if reversedirection=yes then ( if oneway= then junction=roundabout else oneway=yes|true|1 ) else oneway=-1
|
||||
assign onewayspeedlimit = if isbadoneway then 0 else 999
|
||||
|
||||
assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
|
||||
|
||||
assign maxspeed_surface =
|
||||
switch or surface= surface=paved|asphalt|concrete 999
|
||||
switch surface=paving_stones|cobblestone 30
|
||||
2
|
||||
|
||||
assign maxspeed_tracktype =
|
||||
switch tracktype= 999
|
||||
switch tracktype=grade1 40
|
||||
switch tracktype=grade2 5
|
||||
1
|
||||
|
||||
assign maxspeed_implicit =
|
||||
switch highway=motorway 999
|
||||
switch highway=motorway_link 130
|
||||
switch highway=trunk 250
|
||||
switch highway=trunk_link 100
|
||||
switch highway=primary|primary_link 100
|
||||
switch highway=secondary|secondary_link 90
|
||||
switch highway=tertiary|tertiary_link 80
|
||||
switch highway=unclassified 50
|
||||
switch route=ferry 10
|
||||
switch highway=bridleway 10
|
||||
switch highway=residential|living_street 30
|
||||
switch highway=service 30
|
||||
switch highway=track|road|path switch tracktype=grade1 30 5
|
||||
0
|
||||
|
||||
assign maxspeed =
|
||||
min onewayspeedlimit
|
||||
min accessspeedlimit
|
||||
switch maxspeed=50 50
|
||||
switch maxspeed=30 30
|
||||
switch maxspeed=10 10
|
||||
switch maxspeed=20 20
|
||||
switch maxspeed=40 40
|
||||
switch maxspeed=60 60
|
||||
switch maxspeed=70 70
|
||||
switch maxspeed=80 80
|
||||
switch maxspeed=90 90
|
||||
switch maxspeed=100 100
|
||||
switch maxspeed=110 110
|
||||
switch maxspeed=120 120
|
||||
switch maxspeed=130 130
|
||||
switch maxspeed=urban 50
|
||||
switch maxspeed=rural 100
|
||||
min maxspeed_implicit
|
||||
min maxspeed_surface maxspeed_tracktype
|
||||
|
||||
assign costfactor = if equal maxspeed 0 then 10000 else 0
|
||||
|
||||
assign minspeed =
|
||||
switch highway=motorway|trunk 75 0
|
||||
|
||||
# way priorities used for voice hint generation
|
||||
|
||||
assign priorityclassifier =
|
||||
|
||||
if ( highway=motorway ) then 30
|
||||
else if ( highway=motorway_link ) then 29
|
||||
else if ( highway=trunk ) then 28
|
||||
else if ( highway=trunk_link ) then 27
|
||||
else if ( highway=primary ) then 26
|
||||
else if ( highway=primary_link ) then 25
|
||||
else if ( highway=secondary ) then 24
|
||||
else if ( highway=secondary_link ) then 23
|
||||
else if ( highway=tertiary ) then 22
|
||||
else if ( highway=tertiary_link ) then 21
|
||||
else if ( highway=unclassified ) then 20
|
||||
else if ( highway=residential|living_street ) then 6
|
||||
else if ( highway=service ) then 6
|
||||
else if ( highway=track ) then if tracktype=grade1 then 4 else 2
|
||||
else if ( highway=bridleway|road ) then 2
|
||||
else 0
|
||||
|
||||
# some more classifying bits used for voice hint generation...
|
||||
|
||||
assign isgoodoneway = if reversedirection=yes then oneway=-1
|
||||
else if oneway= then junction=roundabout else oneway=yes|true|1
|
||||
assign isroundabout = junction=roundabout
|
||||
assign isgoodforcars = if greater priorityclassifier 6 then true
|
||||
else if highway=residential|living_street|service then true
|
||||
else if ( and highway=track tracktype=grade1 ) then true
|
||||
else false
|
||||
|
||||
# ... encoded into a bitmask
|
||||
|
||||
assign classifiermask add isbadoneway
|
||||
add multiply isgoodoneway 2
|
||||
add multiply isroundabout 4
|
||||
add multiply islinktype 8
|
||||
add multiply isgoodforcars 16
|
||||
multiply highway=residential|living_street 32
|
||||
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
#
|
||||
# calculate logical car access to nodes
|
||||
#
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
switch access=
|
||||
not barrier=gate|bollard|lift_gate|cycle_barrier
|
||||
access=yes|permissive|designated|destination
|
||||
vehicle=yes|permissive|designated|destination
|
||||
motor_vehicle=yes|permissive|designated|destination
|
||||
motorcar=yes|permissive|designated|destination
|
||||
|
||||
assign initialcost =
|
||||
|
||||
switch caraccess
|
||||
0
|
||||
1000000
|
||||
|
||||
assign maxspeed =
|
||||
|
||||
if or crossing=traffic_signals highway=traffic_signals then 0
|
||||
else 999
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
#
|
||||
# Car-Routing is experimantal !!!
|
||||
#
|
||||
# DO NOT USE FOR ACTUAL NAVIGATION
|
||||
#
|
||||
# Turn restrictions are not complete, leading to wrong routes
|
||||
#
|
||||
|
||||
---context:global
|
||||
|
||||
assign downhillcost 0
|
||||
assign downhillcutoff 0
|
||||
assign uphillcost 0
|
||||
assign uphillcutoff 0
|
||||
|
||||
assign validForCars 1
|
||||
assign pass1coefficient 1.3
|
||||
|
||||
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
|
||||
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
assign turncost if junction=roundabout then 0 else 200
|
||||
assign initialcost switch route=ferry 20000 0
|
||||
|
||||
|
||||
#
|
||||
# calculate logical car access
|
||||
#
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
switch access=
|
||||
switch or highway=motorway highway=motorway_link 1
|
||||
switch or highway=trunk highway=trunk_link 1
|
||||
switch or highway=primary highway=primary_link 1
|
||||
switch or highway=secondary highway=secondary_link 1
|
||||
switch or highway=tertiary highway=tertiary_link 1
|
||||
switch highway=unclassified 1
|
||||
switch route=ferry 1
|
||||
switch or highway=residential highway=living_street 1
|
||||
switch highway=service 1
|
||||
0
|
||||
or access=yes or access=permissive or access=designated access=destination
|
||||
or vehicle=yes or vehicle=designated vehicle=destination
|
||||
or motor_vehicle=yes or motor_vehicle=permissive or motor_vehicle=designated motor_vehicle=destination
|
||||
or motorcar=yes or motorcar=permissive or motorcar=designated motorcar=destination
|
||||
|
||||
assign accesspenalty
|
||||
switch caraccess
|
||||
0
|
||||
10000
|
||||
|
||||
assign onewaypenalty
|
||||
switch switch reversedirection=yes
|
||||
switch oneway=
|
||||
junction=roundabout
|
||||
or oneway=yes or oneway=true oneway=1
|
||||
oneway=-1
|
||||
10000
|
||||
0.0
|
||||
|
||||
|
||||
assign ispaved or surface=paved or surface=asphalt or surface=concrete surface=paving_stones
|
||||
|
||||
assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
|
||||
|
||||
assign costfactor
|
||||
|
||||
add max onewaypenalty accesspenalty
|
||||
|
||||
add switch islinktype 0.05 0
|
||||
|
||||
switch and highway= not route=ferry 10000
|
||||
|
||||
switch or highway=motorway highway=motorway_link 1
|
||||
switch or highway=trunk highway=trunk_link 1
|
||||
switch or highway=primary highway=primary_link switch maxspeed=30 2.0 switch maxspeed=50 1.5 1.3
|
||||
switch or highway=secondary highway=secondary_link 1.4
|
||||
switch or highway=tertiary highway=tertiary_link 1.5
|
||||
switch highway=unclassified 1.6
|
||||
switch route=ferry 5.67
|
||||
switch highway=bridleway 5
|
||||
switch or highway=residential highway=living_street 2
|
||||
switch highway=service 2
|
||||
switch or highway=track or highway=road highway=path
|
||||
switch tracktype=grade1 5
|
||||
switch ispaved 5
|
||||
30
|
||||
10000
|
||||
|
||||
|
||||
# way priorities used for voice hint generation
|
||||
|
||||
assign priorityclassifier =
|
||||
|
||||
if ( highway=motorway ) then 30
|
||||
else if ( highway=motorway_link ) then 29
|
||||
else if ( highway=trunk ) then 28
|
||||
else if ( highway=trunk_link ) then 27
|
||||
else if ( highway=primary ) then 26
|
||||
else if ( highway=primary_link ) then 25
|
||||
else if ( highway=secondary ) then 24
|
||||
else if ( highway=secondary_link ) then 23
|
||||
else if ( highway=tertiary ) then 22
|
||||
else if ( highway=tertiary_link ) then 21
|
||||
else if ( highway=unclassified ) then 20
|
||||
else if ( highway=residential|living_street ) then 6
|
||||
else if ( highway=service ) then 6
|
||||
else if ( highway=track ) then if tracktype=grade1 then 4 else 2
|
||||
else if ( highway=bridleway|road ) then 2
|
||||
else 0
|
||||
|
||||
# some more classifying bits used for voice hint generation...
|
||||
|
||||
assign isbadoneway = not equal onewaypenalty 0
|
||||
assign isgoodoneway = if reversedirection=yes then oneway=-1
|
||||
else if oneway= then junction=roundabout else oneway=yes|true|1
|
||||
assign isroundabout = junction=roundabout
|
||||
assign isgoodforcars = if greater priorityclassifier 6 then true
|
||||
else if highway=residential|living_street|service then true
|
||||
else if ( and highway=track tracktype=grade1 ) then true
|
||||
else false
|
||||
|
||||
# ... encoded into a bitmask
|
||||
|
||||
assign classifiermask add isbadoneway
|
||||
add multiply isgoodoneway 2
|
||||
add multiply isroundabout 4
|
||||
add multiply islinktype 8
|
||||
multiply isgoodforcars 16
|
||||
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
#
|
||||
# calculate logical car access to nodes
|
||||
#
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
switch access=
|
||||
switch barrier=gate 0
|
||||
switch barrier=bollard 0
|
||||
switch barrier=lift_gate 0
|
||||
switch barrier=cycle_barrier 0
|
||||
1
|
||||
or access=yes or access=permissive or access=designated access=destination
|
||||
or vehicle=yes or vehicle=permissive or vehicle=designated vehicle=destination
|
||||
or motor_vehicle=yes or motor_vehicle=permissive or motor_vehicle=designated motor_vehicle=destination
|
||||
or motorcar=yes or motorcar=permissive or motorcar=designated motorcar=destination
|
||||
|
||||
assign initialcost
|
||||
switch caraccess
|
||||
0
|
||||
1000000
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
---lookupversion:10
|
||||
---minorversion:6
|
||||
---minorversion:7
|
||||
|
||||
---context:way
|
||||
|
||||
|
|
@ -35,6 +35,12 @@ highway;0000002631 services
|
|||
highway;0000002133 corridor
|
||||
highway;0000002093 crossing
|
||||
highway;0000001440 bus_stop
|
||||
highway;0000001274 yes
|
||||
highway;0000000679 unsurfaced
|
||||
highway;0000000108 byway
|
||||
highway;0000000037 driveway
|
||||
highway;0000000021 mini_roundabout
|
||||
highway;0000000020 turning_loop
|
||||
|
||||
tracktype;0000887965 grade2
|
||||
tracktype;0000868414 grade3
|
||||
|
|
@ -512,6 +518,35 @@ mtb:scale:uphill;0000009099 3 3+ 3-
|
|||
mtb:scale:uphill;0000005825 4 4+ 4-
|
||||
mtb:scale:uphill;0000004628 5 5+ 5-
|
||||
|
||||
crossing;0000101049 zebra
|
||||
crossing;0000017509 unmarked
|
||||
crossing;0000013817 traffic_signals
|
||||
crossing;0000011062 uncontrolled
|
||||
crossing;0000001722 yes
|
||||
crossing;0000001678 island
|
||||
crossing;0000000457 marked
|
||||
crossing;0000000131 pedestrian_signals
|
||||
crossing;0000000122 no
|
||||
|
||||
informal;0000002424 yes
|
||||
|
||||
indoor;0000058418 yes
|
||||
indoor;0000025038 room
|
||||
indoor;0000005295 wall
|
||||
indoor;0000004322 corridor
|
||||
indoor;0000002410 area
|
||||
indoor;0000000816 column
|
||||
indoor;0000000568 no
|
||||
indoor;0000000129 shop
|
||||
indoor;0000000099 steps
|
||||
|
||||
4wd_only;0000008129 yes Yes
|
||||
4wd_only;0000000487 recommended
|
||||
4wd_only;0000000041 no
|
||||
|
||||
concrete;0000000043 plates
|
||||
concrete;0000000013 lanes
|
||||
|
||||
---context:node
|
||||
|
||||
highway;0001314954 bus_stop
|
||||
|
|
@ -565,6 +600,8 @@ highway;0000000113 culvert
|
|||
highway;0000000100 <residential>
|
||||
highway;0000000046 toll_bridge
|
||||
highway;0000000037 city_entry
|
||||
highway;0000002967 traffic_mirror
|
||||
highway;0000001724 priority
|
||||
|
||||
barrier;0000606512 gate
|
||||
barrier;0000164120 bollard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue