2015-03-07 19:32:13 -05:00
|
|
|
@match @testbot
|
|
|
|
Feature: Basic Map Matching
|
|
|
|
|
|
|
|
Background:
|
|
|
|
Given the profile "testbot"
|
|
|
|
Given a grid size of 10 meters
|
2016-07-20 08:59:16 -04:00
|
|
|
Given the extract extra arguments "--generate-edge-lookup"
|
2015-03-07 19:32:13 -05:00
|
|
|
|
2016-03-08 16:02:17 -05:00
|
|
|
Scenario: Testbot - Map matching with outlier that has no candidate
|
|
|
|
Given a grid size of 100 meters
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
|
|
"""
|
2016-03-08 16:02:17 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abcd | no |
|
|
|
|
|
|
|
|
When I match I should get
|
|
|
|
| trace | timestamps | matchings |
|
|
|
|
| ab1d | 0 1 2 3 | abcd |
|
|
|
|
|
2015-03-07 19:32:13 -05:00
|
|
|
Scenario: Testbot - Map matching with trace splitting
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
e
|
|
|
|
"""
|
2015-03-07 19:32:13 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abcd | no |
|
|
|
|
|
|
|
|
When I match I should get
|
|
|
|
| trace | timestamps | matchings |
|
2015-03-17 19:21:04 -04:00
|
|
|
| abcd | 0 1 62 63 | ab,cd |
|
2015-03-07 19:32:13 -05:00
|
|
|
|
2016-03-07 15:44:32 -05:00
|
|
|
Scenario: Testbot - Map matching with core factor
|
|
|
|
Given the contract extra arguments "--core 0.8"
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
e
|
|
|
|
"""
|
2016-03-07 15:44:32 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abcd | no |
|
|
|
|
|
|
|
|
When I match I should get
|
|
|
|
| trace | timestamps | matchings |
|
|
|
|
| abcd | 0 1 2 3 | abcd |
|
|
|
|
|
2015-03-07 19:32:13 -05:00
|
|
|
Scenario: Testbot - Map matching with small distortion
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d e
|
|
|
|
f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h k
|
|
|
|
"""
|
2015-03-07 19:32:13 -05:00
|
|
|
|
|
|
|
# The second way does not need to be a oneway
|
|
|
|
# but the grid spacing triggers the uturn
|
|
|
|
# detection on f
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abcde | no |
|
|
|
|
| bfhke | yes |
|
|
|
|
|
|
|
|
When I match I should get
|
|
|
|
| trace | matchings |
|
|
|
|
| afcde | abcde |
|
|
|
|
|
|
|
|
Scenario: Testbot - Map matching with oneways
|
2015-09-01 18:42:13 -04:00
|
|
|
Given a grid size of 10 meters
|
2015-03-07 19:32:13 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
e f g h
|
|
|
|
"""
|
2015-03-07 19:32:13 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abcd | yes |
|
|
|
|
| hgfe | yes |
|
|
|
|
|
|
|
|
When I match I should get
|
|
|
|
| trace | matchings |
|
|
|
|
| dcba | hgfe |
|
|
|
|
|
2016-04-05 07:27:15 -04:00
|
|
|
Scenario: Testbot - Matching with oneway streets
|
|
|
|
Given a grid size of 10 meters
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
e f g h
|
|
|
|
"""
|
2016-04-05 07:27:15 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
| cd | yes |
|
|
|
|
| hg | yes |
|
|
|
|
| gf | yes |
|
|
|
|
| fe | yes |
|
|
|
|
|
|
|
|
When I match I should get
|
|
|
|
| trace | matchings |
|
|
|
|
| dcba | hg,gf,fe |
|
|
|
|
| efgh | ab,bc,cd |
|
2016-05-09 01:58:13 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Duration details
|
2016-05-26 15:29:15 -04:00
|
|
|
Given the query options
|
|
|
|
| annotations | true |
|
|
|
|
|
2016-05-09 01:58:13 -04:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d e g h
|
|
|
|
i
|
|
|
|
"""
|
2016-05-09 01:58:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abcdegh | no |
|
|
|
|
| ci | no |
|
|
|
|
|
2016-07-20 08:59:16 -04:00
|
|
|
And the speed file
|
|
|
|
"""
|
|
|
|
1,2,36
|
|
|
|
"""
|
|
|
|
|
2016-09-19 17:13:44 -04:00
|
|
|
And the contract extra arguments "--segment-speed-file {speeds_file}"
|
2016-07-20 08:59:16 -04:00
|
|
|
|
2016-05-09 01:58:13 -04:00
|
|
|
When I match I should get
|
2016-07-20 08:59:16 -04:00
|
|
|
| trace | matchings | annotation |
|
|
|
|
| abeh | abcedgh | 1:9.897633:1,0:0:0,1:10.008842:0,1:10.008842:0,1:10.008842:0,0:0:0,2:20.017685:0,1:10.008842:0 |
|
|
|
|
| abci | abc,ci | 1:9.897633:1,0:0:0,1:10.008842:0,0:0.111209:0,1:10.010367:0 |
|
2016-05-19 11:04:00 -04:00
|
|
|
|
|
|
|
# The following is the same as the above, but separated for readability (line length)
|
|
|
|
When I match I should get
|
|
|
|
| trace | matchings | OSM IDs |
|
|
|
|
| abeh | abcedgh | 1,2,3,2,3,4,5,4,5,6,7 |
|
|
|
|
| abci | abc,ci | 1,2,3,2,3,8,3,8 |
|
2016-06-14 18:23:21 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Geometry details
|
|
|
|
Given the query options
|
|
|
|
| overview | full |
|
|
|
|
| geometries | polyline |
|
|
|
|
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d
|
|
|
|
"""
|
2016-06-14 18:23:21 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abc | no |
|
|
|
|
| bd | no |
|
|
|
|
|
|
|
|
When I match I should get
|
|
|
|
| trace | matchings | geometry |
|
|
|
|
| abd | abd | 1,1,1,1.00009,1,1.00009,0.99991,1.00009 |
|