DennisOSRM/Project-OSRM — Issue #108: oneway=-1 is broken?
Author: emiltin
Created: 2012-02-05 13:21:59+00:00
State: open

handling of oneway=1 works.
but it seems handling of -1 is somehow not working, despite the code in ExtractorCallbacks.h?

```
| highway | oneway | forw | backw |
| primary | | x | x |
| primary | nonsense | x | x |
| primary | no | x | x |
| primary | false | x | x |
| primary | 0 | x | x |
| primary | yes | x | |
| primary | true | x | |
| primary | 1 | x | |
| primary | -1 | | x | <--- expected
| primary | -1 | x | | <--- actual
```

=========================================
Failed Scenario: Oneway street
Time: 2012-02-05T14:02:24Z

[test]
cycleway = 19
trunk = 19
trunk_link = 19
primary = 19
primary_link = 19
secondary = 17
secondary_link = 17
tertiary = 15
residential = 15
unclassified = 15
living_street = 13
service = 12
track = 12
path = 12
footway = 10
pedestrian = 5
pier = 5
steps = 3
ferry = 5
obeyOneways = yes
useRestrictions = yes
accessTag = bicycle
excludeFromGrid = ferry
defaultSpeed = 17
obeyBollards = no

Expected: {"from"=>"a", "to"=>"c", "route"=>""}
Got: {"from"=>"a", "to"=>"c", "route"=>"abc"}
Query: http://localhost:5000/viaroute&start=1.0,1.0&dest=1.0,1.002&output=json&geomformat=cmp
Response: {"version": 0.3,"status":0,"status_message": "Found route between points","route_summary": {"total_distance":110,"total_time":22,"start_point":"abc","end_point":"abc"},"route_geometry": "_ibE_ibE?gE","route_instructions": [["Head","abc",111,0,210,"0","NE",22.5]],"via_points":[],"transactionId": "OSRM Routing Engine JSON Descriptor (v0.3)"}
Parsed:
["version", 0.3]
["status", 0]
["status_message", "Found route between points"]
["route_summary", {"total_distance"=>110, "total_time"=>22, "start_point"=>"abc", "end_point"=>"abc"}]
["route_geometry", "_ibE_ibE?gE"]
["route_instructions", [["Head", "abc", 111, 0, 210, "0", "NE", 22.5]]]
["via_points", []]
["transactionId", "OSRM Routing Engine JSON Descriptor (v0.3)"]

Expected: {"from"=>"c", "to"=>"a", "route"=>"abc"}
Got: {"from"=>"c", "to"=>"a", "route"=>""}
Query: http://localhost:5000/viaroute&start=1.0,1.002&dest=1.0,1.0&output=json&geomformat=cmp
Response: {"version": 0.3,"status":207,"status_message": "Cannot find route between points","route_summary": {"total_distance":0,"total_time":214748365,"start_point":"unknown street","end_point":"unknown street"},"route_geometry": "","route_instructions": [],"via_points":[],"transactionId": "OSRM Routing Engine JSON Descriptor (v0.3)"}
Parsed:
["version", 0.3]
["status", 207]
["status_message", "Cannot find route between points"]
["route_summary", {"total_distance"=>0, "total_time"=>214748365, "start_point"=>"unknown street", "end_point"=>"unknown street"}]
["route_geometry", ""]
["route_instructions", []]
["via_points", []]
["transactionId", "OSRM Routing Engine JSON Descriptor (v0.3)"]