don't push against oneway flow on roundabout. fixes #591
This commit is contained in:
		
							parent
							
								
									cad0069be2
								
							
						
					
					
						commit
						9a44f16846
					
				@ -79,3 +79,9 @@ Feature: Bike - Accessability of different way types
 | 
				
			|||||||
 		 | construction |      |         |       |
 | 
					 		 | construction |      |         |       |
 | 
				
			||||||
 		 | construction | yes  |         |       |
 | 
					 		 | construction | yes  |         |       |
 | 
				
			||||||
 		 | construction |      | yes     |       |
 | 
					 		 | construction |      | yes     |       |
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    @roundabout
 | 
				
			||||||
 | 
					  	Scenario: Bike - Don't push bikes against oneway flow on roundabouts
 | 
				
			||||||
 | 
					  	 	Then routability should be
 | 
				
			||||||
 | 
					  		 | junction   | forw | backw |
 | 
				
			||||||
 | 
					  		 | roundabout | x    |       |
 | 
				
			||||||
 | 
				
			|||||||
@ -263,12 +263,14 @@ function way_function (way, numberOfNodesInWay)
 | 
				
			|||||||
	-- pushing bikes
 | 
						-- pushing bikes
 | 
				
			||||||
	if bicycle_speeds[highway] or pedestrian_speeds[highway] then
 | 
						if bicycle_speeds[highway] or pedestrian_speeds[highway] then
 | 
				
			||||||
	    if foot ~= 'no' then
 | 
						    if foot ~= 'no' then
 | 
				
			||||||
        	if way.direction == Way.oneway then
 | 
						        if junction ~= "roundabout" then
 | 
				
			||||||
        	    way.backward_speed = walking_speed
 | 
					            	if way.direction == Way.oneway then
 | 
				
			||||||
            elseif way.direction == Way.opposite then
 | 
					            	    way.backward_speed = walking_speed
 | 
				
			||||||
                way.backward_speed = walking_speed
 | 
					                elseif way.direction == Way.opposite then
 | 
				
			||||||
                way.speed = way.speed
 | 
					                    way.backward_speed = walking_speed
 | 
				
			||||||
        	end
 | 
					                    way.speed = way.speed
 | 
				
			||||||
 | 
					            	end
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
        if way.backward_speed == way.speed then
 | 
					        if way.backward_speed == way.speed then
 | 
				
			||||||
            -- TODO: no way yet to mark a way as pedestrian mode if forward/backward speeds are equal
 | 
					            -- TODO: no way yet to mark a way as pedestrian mode if forward/backward speeds are equal
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user