From 20f321347708f89d9d7c32548177ad03a04823e2 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Wed, 2 Oct 2013 13:43:07 +0200 Subject: [PATCH] test projection onto ways at high lat --- features/testbot/projection.feature | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 features/testbot/projection.feature diff --git a/features/testbot/projection.feature b/features/testbot/projection.feature new file mode 100644 index 000000000..daf293fa6 --- /dev/null +++ b/features/testbot/projection.feature @@ -0,0 +1,37 @@ +@routing @projection +Feature: Projection to nearest point on road + + Background: + The coordinas below was calculated using http://www.movable-type.co.uk/scripts/latlong.html + The nodes are placed as follows, with ab, bc and bd all being 1 km in length each: + | | | c | | + | | b | | (this is sketch only, real data is in the table below) | + | a | | d | | + + Given the profile "testbot" + Given the node locations + | node | lat | lon | + | a | 80.00000 | 0.00000 | + | b | 80.00639 | 0.03667 | + | c | 80.01278 | 0.07333 | + | d | 80.00000 | 0.07333 | + + And the ways + | nodes | + | abc | + + Scenario: Projection onto way at high latitudes, 1km distance + When I route I should get + | from | to | route | compass | bearing | distance | + | b | a | abc | SW | 225 | 1000m +-3 | + | b | c | abc | NE | 45 | 1000m +-3 | + | a | d | abc | NE | 45 | 1000m +-3 | + | d | a | abc | SW | 225 | 1000m +-3 | + | c | d | abc | SW | 225 | 1000m +-3 | + | d | c | abc | NE | 45 | 1000m +-3 | + + Scenario: Projection onto way at high latitudes, no distance + When I route I should get + | from | to | route | distance | + | d | b | abc | 0m | + | b | d | abc | 0m |