a few more test for nearest api
This commit is contained in:
parent
76decf2e8b
commit
436cc692da
@ -31,3 +31,43 @@ Feature: Locating Nearest node on a Way - pick closest way
|
|||||||
| l | l |
|
| l | l |
|
||||||
| m | m |
|
| m | m |
|
||||||
| n | n |
|
| n | n |
|
||||||
|
|
||||||
|
Scenario: Nearest - inside a triangle
|
||||||
|
Given the node map
|
||||||
|
| | | | | | c | | | | | |
|
||||||
|
| | | | | | | | | | | |
|
||||||
|
| | | | y | | | | z | | | |
|
||||||
|
| | | | | 0 | | 1 | | | | |
|
||||||
|
| | | | 2 | | 3 | | 4 | | | |
|
||||||
|
| a | | | x | | u | | w | | | b |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| ca |
|
||||||
|
|
||||||
|
When I request nearest I should get
|
||||||
|
| in | out |
|
||||||
|
| 0 | y |
|
||||||
|
| 1 | z |
|
||||||
|
| 2 | x |
|
||||||
|
| 3 | u |
|
||||||
|
| 4 | w |
|
||||||
|
|
||||||
|
Scenario: Nearest - only pick routable ways
|
||||||
|
Given the node map
|
||||||
|
| | a | c | e | |
|
||||||
|
| 0 | z | y | x | 1 |
|
||||||
|
| | b | d | f | |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | barrier |
|
||||||
|
| ab | | wall |
|
||||||
|
| cd | (nil) | |
|
||||||
|
| ef | primary | |
|
||||||
|
|
||||||
|
When I request nearest I should get
|
||||||
|
| in | out |
|
||||||
|
| 0 | z |
|
||||||
|
| 1 | x |
|
||||||
|
Loading…
Reference in New Issue
Block a user