github issue 51
This commit is contained in:
parent
5b5083b010
commit
6d95bc46e7
4 changed files with 60 additions and 40 deletions
|
@ -94,21 +94,27 @@ assign accesspenalty
|
||||||
#
|
#
|
||||||
# handle one-ways. On primary roads, wrong-oneways should
|
# handle one-ways. On primary roads, wrong-oneways should
|
||||||
# be close to forbidden, while on other ways we just add
|
# be close to forbidden, while on other ways we just add
|
||||||
# 4 to the costfactor (making it at least 5 - you are allowed
|
# 6 to the costfactor (making it at least 7 - you are allowed
|
||||||
# to push your bike)
|
# to push your bike)
|
||||||
#
|
#
|
||||||
assign oneway
|
assign badoneway =
|
||||||
switch oneway=
|
if reversedirection=yes then
|
||||||
junction=roundabout
|
if oneway:bicycle=yes then true
|
||||||
or oneway=yes or oneway=true oneway=1
|
else if oneway= then junction=roundabout
|
||||||
assign onewaypenalty
|
else oneway=yes|true|1
|
||||||
switch switch reversedirection=yes oneway oneway=-1
|
else oneway=-1
|
||||||
switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0
|
|
||||||
switch or highway=primary highway=primary_link 50
|
assign onewaypenalty =
|
||||||
switch or highway=secondary highway=secondary_link 30
|
if ( badoneway ) then
|
||||||
switch or highway=tertiary highway=tertiary_link 20
|
(
|
||||||
6.0
|
if ( cycleway=opposite|opposite_lane|opposite_track ) then 0
|
||||||
0.0
|
else if ( oneway:bicycle=no ) then 0
|
||||||
|
else if ( highway=primary|primary_link ) then 50
|
||||||
|
else if ( highway=secondary|secondary_link ) then 30
|
||||||
|
else if ( highway=tertiary|tertiary_link ) then 20
|
||||||
|
else 6.0
|
||||||
|
)
|
||||||
|
else 0.0
|
||||||
|
|
||||||
assign costfactor
|
assign costfactor
|
||||||
|
|
||||||
|
|
|
@ -84,21 +84,27 @@ assign accesspenalty =
|
||||||
#
|
#
|
||||||
# handle one-ways. On primary roads, wrong-oneways should
|
# handle one-ways. On primary roads, wrong-oneways should
|
||||||
# be close to forbidden, while on other ways we just add
|
# be close to forbidden, while on other ways we just add
|
||||||
# 4 to the costfactor (making it at least 5 - you are allowed
|
# 6 to the costfactor (making it at least 7 - you are allowed
|
||||||
# to push your bike)
|
# to push your bike)
|
||||||
#
|
#
|
||||||
assign oneway
|
assign badoneway =
|
||||||
switch oneway=
|
if reversedirection=yes then
|
||||||
junction=roundabout
|
if oneway:bicycle=yes then true
|
||||||
or oneway=yes or oneway=true oneway=1
|
else if oneway= then junction=roundabout
|
||||||
assign onewaypenalty
|
else oneway=yes|true|1
|
||||||
switch switch reversedirection=yes oneway oneway=-1
|
else oneway=-1
|
||||||
switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0
|
|
||||||
switch or highway=primary highway=primary_link 50
|
assign onewaypenalty =
|
||||||
switch or highway=secondary highway=secondary_link 30
|
if ( badoneway ) then
|
||||||
switch or highway=tertiary highway=tertiary_link 20
|
(
|
||||||
6.0
|
if ( cycleway=opposite|opposite_lane|opposite_track ) then 0
|
||||||
0.0
|
else if ( oneway:bicycle=no ) then 0
|
||||||
|
else if ( highway=primary|primary_link ) then 50
|
||||||
|
else if ( highway=secondary|secondary_link ) then 30
|
||||||
|
else if ( highway=tertiary|tertiary_link ) then 20
|
||||||
|
else 6.0
|
||||||
|
)
|
||||||
|
else 0.0
|
||||||
|
|
||||||
assign hascycleway = not
|
assign hascycleway = not
|
||||||
and ( or cycleway= cycleway=no|none ) and ( or cycleway:left= cycleway:left=no ) ( or cycleway:right= cycleway:right=no )
|
and ( or cycleway= cycleway=no|none ) and ( or cycleway:left= cycleway:left=no ) ( or cycleway:right= cycleway:right=no )
|
||||||
|
|
|
@ -89,21 +89,27 @@ assign accesspenalty
|
||||||
#
|
#
|
||||||
# handle one-ways. On primary roads, wrong-oneways should
|
# handle one-ways. On primary roads, wrong-oneways should
|
||||||
# be close to forbidden, while on other ways we just add
|
# be close to forbidden, while on other ways we just add
|
||||||
# 4 to the costfactor (making it at least 5 - you are allowed
|
# 6 to the costfactor (making it at least 7 - you are allowed
|
||||||
# to push your bike)
|
# to push your bike)
|
||||||
#
|
#
|
||||||
assign oneway
|
assign badoneway =
|
||||||
switch oneway=
|
if reversedirection=yes then
|
||||||
junction=roundabout
|
if oneway:bicycle=yes then true
|
||||||
or oneway=yes or oneway=true oneway=1
|
else if oneway= then junction=roundabout
|
||||||
assign onewaypenalty
|
else oneway=yes|true|1
|
||||||
switch switch reversedirection=yes oneway oneway=-1
|
else oneway=-1
|
||||||
switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0
|
|
||||||
switch or highway=primary highway=primary_link 50
|
assign onewaypenalty =
|
||||||
switch or highway=secondary highway=secondary_link 30
|
if ( badoneway ) then
|
||||||
switch or highway=tertiary highway=tertiary_link 20
|
(
|
||||||
6.0
|
if ( cycleway=opposite|opposite_lane|opposite_track ) then 0
|
||||||
0.0
|
else if ( oneway:bicycle=no ) then 0
|
||||||
|
else if ( highway=primary|primary_link ) then 50
|
||||||
|
else if ( highway=secondary|secondary_link ) then 30
|
||||||
|
else if ( highway=tertiary|tertiary_link ) then 20
|
||||||
|
else 6.0
|
||||||
|
)
|
||||||
|
else 0.0
|
||||||
|
|
||||||
assign costfactor
|
assign costfactor
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,9 @@ assign accesspenalty =
|
||||||
#
|
#
|
||||||
assign badoneway =
|
assign badoneway =
|
||||||
if reversedirection=yes then
|
if reversedirection=yes then
|
||||||
if oneway= then junction=roundabout else oneway=yes|true|1
|
if oneway:bicycle=yes then true
|
||||||
|
else if oneway= then junction=roundabout
|
||||||
|
else oneway=yes|true|1
|
||||||
else oneway=-1
|
else oneway=-1
|
||||||
|
|
||||||
assign onewaypenalty =
|
assign onewaypenalty =
|
||||||
|
|
Loading…
Reference in a new issue