Move nodes inside the search radius

This commit is contained in:
Patrick Niklaus 2015-05-15 00:34:53 +02:00
parent 1b0d8739c1
commit 7b1a5566fb
2 changed files with 28 additions and 34 deletions

View File

@ -61,10 +61,9 @@ Feature: Locating Nearest node on a Way - pick closest way
| a | -85 | -180 |
| b | -85 | -160 |
| c | -85 | -140 |
| x | 75 | -180 |
| y | 75 | -180 |
| v | 1 | 1 |
| w | -1 | -1 |
| x | -84.999 | -180 |
| y | -84.999 | -160 |
| z | -84.999 | -140 |
And the ways
| nodes |
@ -73,6 +72,5 @@ Feature: Locating Nearest node on a Way - pick closest way
When I request nearest I should get
| in | out |
| x | a |
| y | a |
| v | c |
| w | c |
| y | b |
| z | c |

View File

@ -98,30 +98,26 @@ Feature: Snap start/end point to the nearest way
| b | x | xb |
| c | x | xc |
Scenario: Find edges within 1km, and the same from 10km
Given a grid size of 1000 meters
Scenario: Find edges within 100m, and the same from 1km
Given a grid size of 100 meters
Given the node map
| p | | | | | | | | | | | i | | | | | | | | | | | j |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | 8 | | 1 | | 2 | | | | | | | | | |
| | | | | | | | | | | h | a | b | | | | | | | | | | |
| o | | | | | | | | | 7 | g | x | c | 3 | | | | | | | | | k |
| | | | | | | | | | | f | e | d | | | | | | | | | | |
| | | | | | | | | | 6 | | 5 | | 4 | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| n | | | | | | | | | | | m | | | | | | | | | | | l |
| p | | | | | | | | i | | | | | | | | j |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | 8 | | 1 | | 2 | | | | | | |
| | | | | | | | h | a | b | | | | | | | |
| o | | | | | | 7 | g | x | c | 3 | | | | | | k |
| | | | | | | | f | e | d | | | | | | | |
| | | | | | | 6 | | 5 | | 4 | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| n | | | | | | | | m | | | | | | | | l |
Given the ways
| nodes |