Skip to content

oneway=-1 is broken? #108

@emiltin

Description

@emiltin

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

<?xml version="1.0" encoding="UTF-8"?>
<osm generator="osrm-test" version="0.6">
  <node id="1" version="1" uid="1" user="osrm" timestamp="2000-00-00T00:00:00Z" lon="1.0" lat="1.0">
    <tag k="name" v="a"/>
  </node>
  <node id="2" version="1" uid="1" user="osrm" timestamp="2000-00-00T00:00:00Z" lon="1.001" lat="1.0">
    <tag k="name" v="b"/>
  </node>
  <node id="3" version="1" uid="1" user="osrm" timestamp="2000-00-00T00:00:00Z" lon="1.002" lat="1.0">
    <tag k="name" v="c"/>
  </node>
  <way id="4" version="1" uid="1" user="osrm" timestamp="2000-00-00T00:00:00Z">
    <nd ref="1"/>
    <nd ref="2"/>
    <nd ref="3"/>
    <tag k="highway" v="primary"/>
    <tag k="name" v="abc"/>
    <tag k="oneway" v="-1"/>
  </way>
</osm>

[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)"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions