DennisOSRM/Project-OSRM — Issue #148: turn restrictions not recognized?
Author: emiltin
Created: 2012-02-25 09:06:06+00:00
State: open

when i run the tests for turn restrictions with "cucumber --tags @restrictions" they fail. YES i've rebuild the binaries and cleared the cache :-)

when i open the osm files involved in JOSM, the restrictions are recognized and looks good, and JOSM reports no issues.

but osrm-prepare doesn't recognize them, instead just reporting "Edge-based graph skipped 0 turns, defined by 0 restrictions."

i'm i missing something?

here's an excerpt from preprocessing.log, which is produced during preprocessing of the test files:

Preprocessing data for scenario: No left turn
Time: 2012-02-25T09:02:01Z

== OSM data:
```xml

```

== Speed profile:
[Scenario: No left turn]
accessTag = bicycle
defaultSpeed = 17
obeyOneways = yes
useRestrictions = yes
obeyBollards = no
cycleway = 19
primary = 19
primary_link = 19
secondary = 17
secondary_link = 17
tertiary = 15
residential = 15
unclassified = 15
living_street = 13
road = 13
service = 12
track = 12
path = 12
footway = 10
pedestrian = 5
pier = 5
steps = 3
ferry = 5
excludeFromGrid = ferry

== Converting cache/78ec26fdda3ee664f610d55d559377ff9a609b93.osm to protobuffer format...
Feb 25, 2012 9:59:01 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.39
Feb 25, 2012 9:59:01 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Feb 25, 2012 9:59:01 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Feb 25, 2012 9:59:01 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Feb 25, 2012 9:59:01 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
Feb 25, 2012 9:59:01 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 364 milliseconds.

== Extracting cache/78ec26fdda3ee664f610d55d559377ff9a609b93.osm...
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-MSG] 1 disks are allocated, total space: 1 MiB
[info extractor.cpp:85] extracting data from input file cache/78ec26fdda3ee664f610d55d559377ff9a609b93.osm.pbf
[info extractor.cpp:114] Loading speed profiles
[info extractor.cpp:116] Found the following speed profiles:
[0]Scenario: No left turn
[info extractor.cpp:124] Using profile "Scenario: No left turn"
[error] Failed to open file extractor.ini for reading.
Parse Data Thread Finished
[extractor] parsing finished after 0.000593901 seconds
[extractor] Sorting used nodes ... ok, after 0.0807831s
[extractor] Erasing duplicate nodes ... ok, after 0.000552893s
[extractor] Sorting all nodes ... ok, after 0.0793431s
[extractor] Sorting used ways ... ok, after 0.0709801s
[extractor] Sorting restrctns. by from... ok, after 0.137783s
[extractor] Fixing restriction starts ... ok, after 0.1387s
[extractor] Sorting restrctns. by to ... ok, after 0.088176s
[extractor] Fixing restriction ends ... ok, after 0.00095892s
[info extractor.cpp:303] usable restrictions: 1
[extractor] Confirming/Writing used nodes ... ok, after 0.00099206s
[extractor] setting number of nodes ... ok
[extractor] Sorting edges by start ... ok, after 0.097584s
[extractor] Setting start coords ... ok, after 0.000991106s
[extractor] Sorting edges by target ... ok, after 0.0873761s
[extractor] Setting target coords ... ok, after 0.00100303s
[extractor] setting number of edges ... ok
[extractor] writing street name index ... ok, after 0.000237942s
[info extractor.cpp:490] Processed 5.75427 nodes/sec and 4.60342 edges/sec
[extractor] finished.

== Preparing cache/78ec26fdda3ee664f610d55d559377ff9a609b93.osm...
[error] Failed to open file contractor.ini for reading.
[info createHierarchy.cpp:90] preprocessing data from input file cache/78ec26fdda3ee664f610d55d559377ff9a609b93.restrictions using STL serial mode
[info createHierarchy.cpp:92] Using restrictions from file: cache/78ec26fdda3ee664f610d55d559377ff9a609b93.restrictions
[info Util/GraphLoader.h:196] Graph loaded ok
[info createHierarchy.cpp:119] Loaded 0 restrictions, 0 bollard nodes, 0 traffic lights
[info Contractor/EdgeBasedGraphFactory.cpp:48] bollards: 0
[info Contractor/EdgeBasedGraphFactory.cpp:49] signals: 0
[info Contractor/EdgeBasedGraphFactory.cpp:91] Converted 4 node-based edges into 8 edge-based nodes.
[info Contractor/EdgeBasedGraphFactory.cpp:115] Generating Edge based representation of input data
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% 100%
. 90% . 100% [info Contractor/EdgeBasedGraphFactory.cpp:275] Node-based graph contains 8 edges
[info Contractor/EdgeBasedGraphFactory.cpp:276] Edge-based graph contains 16 edges, blowup is 2
[info Contractor/EdgeBasedGraphFactory.cpp:277] Edge-based graph skipped 0 turns, defined by 0 restrictions.
[info Contractor/EdgeBasedGraphFactory.cpp:278] Generated 8 edge based nodes
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-MSG] 1 disks are allocated, total space: 1 MiB
[info createHierarchy.cpp:136] building grid ...
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 100%
90% . 100% [info DataStructures/NNGrid.h:118] sorting grid data consisting of 10 edges...
[info DataStructures/NNGrid.h:121] finished sorting after 0.075269s
writing data .... 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% 100%
. 100% sse based
[info createHierarchy.cpp:146] writing node map ...
[info createHierarchy.cpp:159] initializing contractor
ok
merged 0 edges out of 32
Contractor is using 1 threads
initializing elimination PQ ...ok
preprocessing .... 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 100%
90% . 100% [info createHierarchy.cpp:163] Contraction took 0.000140905 sec
[info Contractor/ContractionCleanup.h:163] Scanning for useless shortcuts
[info Contractor/ContractionCleanup.h:201] Removing edges
[info Contractor/ContractionCleanup.h:209] Removed 0 useless shortcuts
[info createHierarchy.cpp:178] Building Node Array
[info createHierarchy.cpp:182] Serializing compacted graph
[info createHierarchy.cpp:234] Expansion : 23590 nodes/sec and 37744 edges/sec
[info createHierarchy.cpp:235] Contraction: 37744 nodes/sec and 181.72 edges/sec
[info createHierarchy.cpp:240] finished preprocessing