Compare commits

...

308 Commits

Author SHA1 Message Date
Patrick Niklaus
c34fff5e7a Filter segments correctly by bounding box 2016-04-03 11:41:46 +02:00
Patrick Niklaus
da3b7c86c5 Remove tests from default target until we get proper switchting in place 2016-04-03 10:17:07 +02:00
Patrick Niklaus
4d8a9c7262 Bump osrm version 2016-04-03 01:08:08 +02:00
Patrick Niklaus
5de5dd0906 Update changelog to 5.0.0 RC1 2016-04-03 01:07:32 +02:00
Daniel Patterson
4293997406 Exclude new node_modules folder that might be around if test cases have been run. 2016-04-01 23:59:12 +02:00
Daniel J. Hofmann
ef0ef90a19 Initial libosrm API docs 2016-04-01 23:59:12 +02:00
Daniel Patterson
b95faabefb Remove leftover debug output. 2016-04-01 12:41:19 -07:00
Daniel Patterson
7f1f044fa0 Fix context returned in JSON error (had null bytes).
Update status test cases to match new API.
2016-04-01 10:42:49 -07:00
Moritz Kobitzsch
7f7d7816e5 fix duration of direct connection 2016-04-01 18:15:11 +02:00
Moritz Kobitzsch
144536a09d fix cucumber tests and issues 2016-04-01 17:13:13 +02:00
Daniel Patterson
6a4abfffda Add missing arrival instruction. 2016-03-31 18:37:08 -07:00
Lauren Budorick
0084f54f0d Add arrival instruction 2016-03-31 17:46:27 -07:00
Daniel Patterson
34337ec3c9 Add missing arrival instruction. 2016-03-31 17:30:47 -07:00
Daniel Patterson
83134c4cbd Add missing arrival instruction. 2016-03-31 17:28:30 -07:00
Daniel Patterson
909d341eb8 Add missing arrival instruction. 2016-03-31 17:27:30 -07:00
Daniel Patterson
a5de5451f8 Add missing arrival instruction. 2016-03-31 17:25:37 -07:00
Daniel Patterson
93dd806913 Add missing arrival instruction. This test was incorrect. 2016-03-31 17:23:43 -07:00
Lauren Budorick
cab023726c Add missing arrival instructions 2016-03-31 17:23:12 -07:00
Daniel Patterson
c75c22e652 Add missing arrive instruction. 2016-03-31 17:20:43 -07:00
Daniel Patterson
c7c46d3ff6 Add missing arrive instruction. 2016-03-31 17:20:03 -07:00
Daniel Patterson
55c6bc49d4 Add missing arrive instruction. 2016-03-31 17:17:34 -07:00
Daniel Patterson
6a72e61497 Add missing arrive instruction. 2016-03-31 17:15:56 -07:00
Daniel Patterson
a5cdb85d79 Add missing arrive instruction to distance feature. 2016-03-31 17:13:58 -07:00
Daniel Patterson
f32a21b02c Fix missing arrive instruction on bearing tests. 2016-03-31 17:08:55 -07:00
Daniel Patterson
0a12aab97b Add missing arrive instructions to time tests. 2016-03-31 16:56:50 -07:00
Lauren Budorick
52af0a615d start updating testbot fixtures (TODO: the rest) 2016-03-31 16:48:06 -07:00
Lauren Budorick
964c002b47 Update raster features to reflect not cutting off arrive instruction 2016-03-31 16:46:47 -07:00
Lauren Budorick
d3dea9439a Update foot features to reflect not cutting off arrive instruction 2016-03-31 16:45:03 -07:00
Lauren Budorick
5de8f57549 Update car features to reflect not cutting off arrival instruction 2016-03-31 16:39:31 -07:00
Patrick Niklaus
da525eb8dc Fix code of InternalError 2016-04-01 01:30:40 +02:00
Patrick Niklaus
6e2b4d3cc3 Fix some via tests 2016-04-01 01:30:40 +02:00
Daniel Patterson
0a06641c2c Fix bearing param tests. Have not yet fixed the cause of the two failing cases. 2016-03-31 16:29:12 -07:00
Lauren Budorick
9eda7d3845 Update bicycle tests to reflect not cutting off arrive step 2016-03-31 16:25:08 -07:00
Daniel Patterson
f87a13f5cf Adjust threshold when trimming steps (needs to be bigger).
Also, when trimming the last step, we need to copy name values from the new next-to-last step, otherwise
we can still end up with an arrive step on a different road to the last maneuver.
2016-03-31 16:09:12 -07:00
Patrick Niklaus
b52c8819f5 Fix some of the accidental forced loops in viaroute 2016-04-01 00:19:35 +02:00
Patrick Niklaus
af57742307 Remove unused detach parameter 2016-04-01 00:19:35 +02:00
Daniel Patterson
9859808d03 Add 'arrive' step to route descriptions. 2016-03-31 14:32:00 -07:00
Daniel Patterson
1f18dc300f Colorize test result diff output. 2016-03-31 13:29:41 -07:00
Lauren Budorick
23d41d584b unbreak the zombiekilling 2016-03-31 13:27:29 -07:00
Lauren Budorick
335be174d2 Fix routability now that we don't chop off a step 2016-03-31 13:21:14 -07:00
Patrick Niklaus
b3aca211d6 Remove arrive filter 2016-03-31 22:03:31 +02:00
Patrick Niklaus
d1b9c09c23 Remove leftover hello_world and timestamp plugins 2016-03-31 21:35:48 +02:00
Patrick Niklaus
fad3fc116e There is no timestamp service anymore 2016-03-31 21:35:48 +02:00
Lauren Budorick
eeefb24a8e Remove one more compass column; update polyline encoding tests 2016-03-31 12:33:48 -07:00
Patrick Niklaus
dfce2a64f4 .json hotfix 2016-03-31 21:32:44 +02:00
Patrick Niklaus
2a103c4362 Fix mathematical assumptions in StaticRTree
StaticRTree now uses projected coordinates internally. That means we can
use a euclidean distance measure (squared distance) for sorting the
query queue.
2016-03-31 19:03:57 +02:00
Moritz Kobitzsch
76d64f27cc fix same segment routes 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
3d9f1e5c66 Removed debug code 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
c7b0e5abc3 correctly handle roundabouts in a wide set of special cases 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
166aebbff4 Removes server-side support for POST requests. 2016-03-31 18:58:52 +02:00
Lauren Budorick
6ec5622ec5 Rm unnecessary io.write 2016-03-31 18:58:52 +02:00
Lauren Budorick
c36e8cc9ea Fix raster_source + tests 2016-03-31 18:58:52 +02:00
Lauren Budorick
7f3f98a264 return geometry from new API 2016-03-31 18:58:52 +02:00
Lauren Budorick
4fd68e3970 Fix route/bearing param 2016-03-31 18:58:52 +02:00
Lauren Budorick
94d3340d63 Fix double shutdown 2016-03-31 18:58:52 +02:00
Lauren Budorick
ee96cbfd00 Fix alternatives option test, chdirs on fail, spacing 2016-03-31 18:58:52 +02:00
Lauren Budorick
edb4b1366f Update pushing test to reflect better guidance 2016-03-31 18:58:52 +02:00
Patrick Niklaus
f29e92c776 Move osrm-components to BUILD_COMPONENTS flag 2016-03-31 18:58:52 +02:00
Patrick Niklaus
888f2e10e3 Fix staticrtree benchmark 2016-03-31 18:58:52 +02:00
Lauren Budorick
28a8079eef Fix trips + matchLocation 2016-03-31 18:58:52 +02:00
Jeff Miccolis
c630128281 make eslint happy 2016-03-31 18:58:52 +02:00
Jeff Miccolis
990ed90a2d Fix timestamp handling, restores testbot/matching test 2016-03-31 18:58:52 +02:00
Lauren Budorick
467d93ffff Status fixes 2016-03-31 18:58:52 +02:00
Lauren Budorick
d4e2b5a3b8 Distance matrix fixes 2016-03-31 18:58:52 +02:00
Lauren Budorick
e9369293dc rm console.log my bad 2016-03-31 18:58:52 +02:00
Lauren Budorick
e94384a5d9 Fix guidance/roundabout spacing 2016-03-31 18:58:52 +02:00
Lauren Budorick
d820ef0796 enter_roundabout -> roundabout-exit (these are still off by one @mokob ?) 2016-03-31 18:58:52 +02:00
karenzshea
b61beee95c parse for the right nearest output coordinate 2016-03-31 18:58:52 +02:00
Jeff Miccolis
dcb7651f40 Fix testbot turns 2016-03-31 18:58:52 +02:00
karenzshea
c6c7e1a478 console error which files are missing for osrm-routed 2016-03-31 18:58:52 +02:00
Jeff Miccolis
909be09ebf Matrix times are on seconds now. Removing POST matrix tests 2016-03-31 18:58:52 +02:00
Lauren Budorick
de2205cac7 head/destination -> depart/arrive to reflect guidance API changes; minor fixes for roundabout tests 2016-03-31 18:58:52 +02:00
karenzshea
73050c0503 update osrm-routed options menu 2016-03-31 18:58:52 +02:00
Jeff Miccolis
f54419d4dd Return first alternative in tests 2016-03-31 18:58:52 +02:00
Jeff Miccolis
99c8c4e7cb Remove compass direction test handling 2016-03-31 18:58:52 +02:00
Lauren Budorick
78bcaada6b #2155 is fixed 2016-03-31 18:58:52 +02:00
Jeff Miccolis
ee12704133 eslinting 2016-03-31 18:58:52 +02:00
Jeff Miccolis
848b3815bd Update alternatives flag 2016-03-31 18:58:52 +02:00
Jeff Miccolis
0fcdb4b8e6 test query params are an object 2016-03-31 18:58:52 +02:00
Jeff Miccolis
88a1a69c1b Removing unneeded stopgap 2016-03-31 18:58:52 +02:00
Jeff Miccolis
222d06850c Allow for different rounding in car-maxspeed fixture 2016-03-31 18:58:52 +02:00
Jeff Miccolis
a2612a1ebe Add stopgap for https://github.com/Project-OSRM/osrm-backend/pull/2159 2016-03-31 18:58:52 +02:00
Lauren Budorick
598c78200f Mode changes, guidance comments, fix turns 2016-03-31 18:58:52 +02:00
Lauren Budorick
bf8e4e8270 Fixes: double callbacks and untested headers 2016-03-31 18:58:52 +02:00
Jeff Miccolis
1bcdc0fa75 Better handling of test response payloads 2016-03-31 18:58:52 +02:00
Lauren Budorick
3ed46aa4c5 ensure all nodes are written as decimals 2016-03-31 18:58:52 +02:00
Lauren Budorick
4d2be0b44c WIP: race conditions and stalling server 2016-03-31 18:58:52 +02:00
Lauren Budorick
3135bb34b3 start fixing URLs 2016-03-31 18:58:52 +02:00
Lauren Budorick
ceb46b8da4 Add more files to be renamed; fix launch error 2016-03-31 18:58:52 +02:00
Lauren Budorick
bc0222c204 Bind use_turn_restrictions to ProfileProperties in scripting environment 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
d40f777a87 perform zero-length segment removal 2016-03-31 18:58:52 +02:00
Daniel Patterson
290101b8ce Use simpler coordinates for tests. 2016-03-31 18:58:52 +02:00
Daniel Patterson
a548155f65 Use correct perpendicular distance measure when simplifying line geometries. 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
0a4015690f fixes missing overrides in mock data facade 2016-03-31 18:58:52 +02:00
Daniel Patterson
5553dad423 Fixes #2152 - weight vector needed to be reversed, and start index was wrong. 2016-03-31 18:58:52 +02:00
Patrick Niklaus
991a0b38c5 Implement re-enabling of PhantomNode directions after bearing filtering 2016-03-31 18:58:52 +02:00
Patrick Niklaus
c9e2a8d24a Move Centroid to coordinate_calculation 2016-03-31 18:58:52 +02:00
Patrick Niklaus
ebd8bf7c7c Round integers to remove fake precision 2016-03-31 18:58:52 +02:00
Patrick Niklaus
156b01ae93 Fix problem with uturns=true 2016-03-31 18:58:52 +02:00
Patrick Niklaus
306b0610a2 Add route fixture test 2016-03-31 18:58:52 +02:00
Patrick Niklaus
7e5274e6e6 Adapt get_osrm to EngineConfig changes 2016-03-31 18:58:52 +02:00
Patrick Niklaus
f998cb8c54 Make tests build by default 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
324cfaac83 Make extractor unit tests work again after global uturn changeset 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
dbcc86c59d Number of waypoints equals number of input coordinates 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
22cd9505ef Make test assumption failure output violation in Route unit tests 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
3e1b7ad6d5 Hook up small component locations for Nearest response test 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
1c41a6b1e8 Provide dummy locations from our fixed monaco dataset 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
776c0d0ae2 Fixes integer overflow due to fixed / floating mismatch in coordinate interpolation 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
a86f09a1f7 Makes switching between floating and fixed coordinates safe wrt. overflows 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
cecb0c547b Makes viewport immune to inf and nans 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
f8bd22dc6f Fix base64 test wrt. Hint no longer taking coordinate in ctor 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
a4ccc59833 Adapt mock facade implementation to renamed base facade symbols 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
d774a875cd Provide implementation for all pure virtual base member functions in mock facade 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
bfde117ff5 Mismatched tag in fwd decl 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
4bb7e734f9 Make unit tests compile again after rebasing 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
f16a865420 Make Tile plugin validate its parameters, fixes #2109 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
c087a11659 Make Route plugin validate its parameters 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
de1f1b8ab3 Makes Nearest plugin adhere to v5 spec for precondition violations, fixes #2108 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
665f93c92f Unit test for Route service; some failing where v5 spec is unclear 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
e1d9d9c218 Unit tests for Tile service; plugin needs improvements: see #2109 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
09c40db4ad Unit tests for Nearest service; one test failing: see #2108 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
cb212a7315 Makes table plugin adhere to v5 spec for limit violations, fixes #2100 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
9dbd437233 Adapts our Travis config to continuously run the library unit tests 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
fea6c2731a Tests for config level constraints; table failing: see #2100 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
1d11701034 Initial unit tests setup for typed libosrm services 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
28fe1600ae Puts auto-generated monaco test files on gitignore 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
7ccb3a6327 Library tests build system integration 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
5edc332e49 Add guidance assembly unit test stub 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
e68c057139 Sentinel spelling 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
943a2d4ab7 Explicitely construct coordinate and phantom node 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
5b00bb81e3 Adapts all unit tests and benchmarks to compile under v5 again 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
e050f15cf8 Provide correct Base64 implementation.
Phew, this was painful. Turns out most hints out there on how to use the
Boost serialization iterators are wrong. Here's why:

    transform_width<6, 8>

needs an input stream of length: common multiple of 6 and 8.

That is, the padding needs to happen _before_ using the provided
iterators, otherwise the behavior is undefined!

See: http://www.boost.org/doc/libs/1_60_0/boost/archive/iterators/transform_width.hpp

Thanks @mokob for pointing that out to me!

We also need to manually add as many padding chars "=" to the encoded
result as many bytes we had to append to the input to conform to the
rule above.

Decoding then knows the number of padding chars by counting for "=" and
then using it in order to split off the last bytes from the decoded
result.
2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
0acf7f7400 Adds round trip tests for RFC 4648 Test Vectors and equality checks 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
9abfb7ea3b Makes hint Equatable and Printable for tests 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
8a4551500d Make Hint encoding safe for passing them as GET parameter in URLs
Thanks @TheMarex for flagging this!
2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
d0c534e5fa Completely re-write base64 logic, make API suck less in doing so 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
822bb97a5f RFC 4648 Test Vectors 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
6cd3b8bc00 Object Encoder -> Base64, kill false dependencies while doing so 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
a145520b5b Adapts Hint encoding and decoding to new fixed data facade 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
3d75d15361 Formats parameter parser unit tests 2016-03-31 18:58:52 +02:00
Patrick Niklaus
8dd3fe3173 Fix hint size 2016-03-31 18:58:52 +02:00
Patrick Niklaus
0bb1b04170 Always safe the absolute path to .fileIndex 2016-03-31 18:58:52 +02:00
Patrick Niklaus
11629e0538 Install storage_config.hpp 2016-03-31 18:58:52 +02:00
Aleksei Potov
6462ea14a2 compilation error on debian jessie with boost 1.54 2016-03-31 18:58:52 +02:00
Daniel Patterson
993c4796c1 Fix boost geometry constructor.
Versions older than 1.58 don't support the initializer-list form.
2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
b11d3ad1ba syncronize geometry and steps after post-processing 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
9681d662cb added list of intersections to the step-maneuver, not in api so far 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
6a5ffc126a fix initial maneuvers 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
7bf2cb1917 post processing moved onto route-steps, looses sync with geometry segments 2016-03-31 18:58:52 +02:00
Patrick Niklaus
2b0a1bbb63 Simplify the timestamp handling 2016-03-31 18:58:52 +02:00
Patrick Niklaus
31297d1c9f Check all streams 2016-03-31 18:58:52 +02:00
Patrick Niklaus
4e854399b6 std::string -> boost::filesystem::path 2016-03-31 18:58:52 +02:00
Patrick Niklaus
17adeaf3e2 Only allow to specify the common base path 2016-03-31 18:58:52 +02:00
Patrick Niklaus
cf92e52b86 print -> io.write 2016-03-31 18:58:52 +02:00
Patrick Niklaus
250acf6a2a Address PR comments
Renamed lua_function_exists and removes unused print function
2016-03-31 18:58:52 +02:00
Patrick Niklaus
49c852917f Use uturn default from .properties file 2016-03-31 18:58:52 +02:00
Patrick Niklaus
3467696f8a Adds .properties file to osrm-extract ouput
This file contains global properties set by the lua
profile, such as enabling uturns at vias and penalties.
This file will be consumed by the server.
2016-03-31 18:58:52 +02:00
Patrick Niklaus
a6a4fb0d49 Use global uturns parameter.
Instead of previously per-via settings like uturns=true;false;true;; it
now only supports a global setting uturns=true.
2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
d3888942e8 improves consistency of fork handling 2016-03-31 18:58:52 +02:00
Patrick Niklaus
1f853385d5 Make gcc 4.8 happy and disable protected because of lambdas 2016-03-31 18:58:52 +02:00
Daniel Patterson
08e56956d6 Properly clip lines so that we don't get crazy coords with long linestrings (relative to tile coords) 2016-03-31 18:58:52 +02:00
Daniel Patterson
fc027417d8 Include edge duration information. 2016-03-31 18:58:52 +02:00
Patrick Niklaus
f07da00dfe Implement viewport code to fix simplification
This fixes #2083
2016-03-31 18:58:52 +02:00
Patrick Niklaus
5bd874aab6 Add tests for coordinate transformation 2016-03-31 18:58:52 +02:00
Patrick Niklaus
6904851eb6 Consolidate math functions 2016-03-31 18:58:52 +02:00
Patrick Niklaus
6d70e1d47d get_name_for_id -> GetNameForID 2016-03-31 18:58:52 +02:00
Patrick Niklaus
7a55b46848 Simplfy name change announcement 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
989b374d86 fix division by zero 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
9034d0c521 restructured to only return valid turns to the outside + cleanup 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
064eb8bca7 less new names, forks consider road classes, api clean-up 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
b63f3cc247 implement basic turn handling 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
4f1503c4a1 implements relative position feature based on coordinates 2016-03-31 18:58:52 +02:00
Patrick Niklaus
64ace032f6 Don't sum up durations of merged steps since we do that in a different place now 2016-03-31 18:58:52 +02:00
Patrick Niklaus
2d4fc9a0b7 Fix foward/backwad swap 2016-03-31 18:58:52 +02:00
Patrick Niklaus
0c4cb9fb1b Limit zoomlevel to 18 2016-03-31 18:58:52 +02:00
Patrick Niklaus
d2bd2c7ec6 Fix shared memory 2016-03-31 18:58:52 +02:00
Patrick Niklaus
10f8bf53b4 Fixup for last commit 2016-03-31 18:58:52 +02:00
Daniel Patterson
3058135f55 Enables the use of multiple segment-speed-files on the osrm-contract
command line, and exposes the file name used for each edge in the debug
tiles.
2016-03-31 18:58:52 +02:00
Patrick Niklaus
ba00871793 Fix ingestion fixed duration values from UnpackPath 2016-03-31 18:58:52 +02:00
Patrick Niklaus
bd66ba9eee Fix durations in UnpackPath 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
dacd3b4833 fixes a broken assertion 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
94c465aeb9 fix merging of turn instructions 2016-03-31 18:58:52 +02:00
Patrick Niklaus
1b1bb780fe Include reverse edges again 2016-03-31 18:58:52 +02:00
Patrick Niklaus
0ce18f1658 Formating and logging changes for turn classification 2016-03-31 18:58:52 +02:00
Patrick Niklaus
811372fca8 Handle case of dead-end edges by inserting an invalid turn 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
21a1a2da93 report depart/arrive in addition to waypoint 2016-03-31 18:58:52 +02:00
Patrick Niklaus
43b0638074 Only install necessary headers 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
146f20191a Adds the license preamble for all publicly installed eaders, closes #2036 2016-03-31 18:58:52 +02:00
Patrick Niklaus
0be7ce2c0f Remove the encoder/decoder dependecy from Hint 2016-03-31 18:58:52 +02:00
Patrick Niklaus
1109b8de16 Rename alternative -> alternatives 2016-03-31 18:58:52 +02:00
Patrick Niklaus
86a2b6eb07 Remove obsolete debug information 2016-03-31 18:58:52 +02:00
Patrick Niklaus
1af59e874d Just return NoSegment in map matching if all candidates are empty 2016-03-31 18:58:52 +02:00
Patrick Niklaus
09a9d6c417 Add failing test for map matching of outlier 2016-03-31 18:58:52 +02:00
Patrick Niklaus
44c12afc3f Fix missing capitalization of error codes 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
b01c2bc8b8 encapsulated into class 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
770d9833d1 improving fork handling on three-way turns 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
b6c2e86443 fix comparison for ramps on three-way turns 2016-03-31 18:58:52 +02:00
Patrick Niklaus
a4134db847 Minor auto iterator cleanup 2016-03-31 18:58:52 +02:00
Patrick Niklaus
fa56abcd58 Don't pass down unsnapped coordinates. All information is already there 2016-03-31 18:58:52 +02:00
Patrick Niklaus
611eafb4c6 Fix camMergeTrivially 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
afa62064fd fixes roundabout counting 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
64933389ae fixes assignment for basic turn types / invalid ramp assignment 2016-03-31 18:58:52 +02:00
Patrick Niklaus
cb84e6009d Add edge id assertions 2016-03-31 18:58:52 +02:00
Patrick Niklaus
6b0b160f37 Don't pass shared_ptr down to functions
"Don’t pass a smart pointer as a function parameter unless you want to
use or manipulate the smart pointer itself, such as to share or transfer
ownership."

Source:
http://herbsutter.com/2013/06/05/gotw-91-solution-smart-pointer-parameters/
2016-03-31 18:58:52 +02:00
Patrick Niklaus
7cc689af7d Move bearing to public namespace 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
25bd7d6d30 Properly includes needed headers in turn analysis interface 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
5c6cbd2b10 Const-correctnes for compressed geometry iterator 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
32d5b6b1b7 Use stdint and using type-alias for discrete angle 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
458a1c8157 Hide functional road classification based on tags in implementation file 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b45efeb4bd Inline initialize functional road classification hash table 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b5619e89c8 256 functional road classes should be enough 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
e1da384b62 Moves route assembly into implementation file 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b250fce92c Fixes remaining engine/guidance includes 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
11da796a70 Fixes accumulate living in <numeric> and not <algorithm> 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
2985e73938 Puts step maneuver handling into implementation file 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b5a67003fe Removes penalizing move 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
4797d6f1e1 Uses static_casts for underlying type in post processing 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
426f773cb7 Fix asymmetry in min/max from using -max 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
5c39449263 Adapts MakeResponse to not pass vector by pointer 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
1062007e67 Fixes multi-line comment 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
ea81866e28 Runs scripts/format.sh 2016-03-31 18:58:52 +02:00
Patrick Niklaus
3b9c772d14 Fix coodinate include and unused warnings 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
9d1032a742 start of four way turns 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
a27f7326bd improved fork handling 2016-03-31 18:58:52 +02:00
Patrick Niklaus
ba3f167b99 Fix crash on extracting Berlin in guidance 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
8322a7ccaf bugfixing/classification 2016-03-31 18:58:52 +02:00
Patrick Niklaus
8c71239e48 Big Restructuring / Cleanup 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
ffb3578180 starting on conflict resolution 2016-03-31 18:58:52 +02:00
Lauren Budorick
c918d68b3e Fixes for gcc compiling, temporary hacks to remove later 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
ebdae7591b handle segregated roads (merge for turn analysis) 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
0ba70bcbf9 structural changes, motorway handling 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
3cdd282e0f enter and exit roundabout feature - currently not showing turn 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
72202b7e4a migrated out of edge based graph factory 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
9f9040eaf6 relative waypoint locations 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
bc252ea110 handling of roundabouts (simple version) 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
bcf7741f95 advanced guidance on 5.0 2016-03-31 18:58:52 +02:00
Patrick Niklaus
70afe209d5 Fix numerical problems with polyline 2016-03-31 18:58:52 +02:00
Patrick Niklaus
4e9709d038 Fix table response format to return null + double in seconds 2016-03-31 18:58:52 +02:00
Patrick Niklaus
8b50f48d8e Return NoMatch 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
09d70f7342 Provides ctor from base path for EngineConfig, fixes #2030 2016-03-31 18:58:52 +02:00
Patrick Niklaus
6f89ce516f Add support for tile plugin 2016-03-31 18:58:52 +02:00
Patrick Niklaus
666d363c93 Preliminary integration of the tile plugin 2016-03-31 18:58:52 +02:00
Patrick Niklaus
0182b9a584 sources and destinations can be empty actually 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
cc93ed15c0 Fixes coordinate, source and destination validation by means of backporting #2041 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b0a83191cd Fixes ownership semantics and forwarding references misplacements in the JSON factory 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b8f6d3ca97 Unwrap function call from identity lambda 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
5a0ee6d1d8 Uses JSON's String constructor for polyline encoding 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
4e02e8e1a0 Passes coordinates by value 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
407509d1af Asserts on unknown TurnInstruction 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
c1bea5c22d Fixes header includes in the JSON factory 2016-03-31 18:58:52 +02:00
Dane Springmeyer
cf63399c9f fix compile of osrm-components 2016-03-31 18:58:52 +02:00
Patrick Niklaus
17382b2a28 Fix if the last coordinate is not found 2016-03-31 18:58:52 +02:00
Patrick Niklaus
c2423ef20f Allocate correct table size 2016-03-31 18:58:52 +02:00
Patrick Niklaus
e6782fd30b Fix travel mode passing from profiles up to the API 2016-03-31 18:58:52 +02:00
Patrick Niklaus
77a4530433 Fix geometries type in steps 2016-03-31 18:58:52 +02:00
Patrick Niklaus
ee8302bf27 Fix table parameter parsing 2016-03-31 18:58:52 +02:00
Patrick Niklaus
5e1a8d82d6 Fix behaviour of table if sources/destinations arrays are empty 2016-03-31 18:58:52 +02:00
Patrick Niklaus
cf1274de21 Fuck. this. shit. 2016-03-31 18:58:52 +02:00
Patrick Niklaus
4ce786b357 Change stream operator of strong typedef 2016-03-31 18:58:52 +02:00
Patrick Niklaus
e5efee2dd8 Fix stream operator for coordinate 2016-03-31 18:58:52 +02:00
Patrick Niklaus
20ace659b6 Add stream operator to Rectangle 2016-03-31 18:58:52 +02:00
Patrick Niklaus
1d026882f9 Add euclideanDistance to coordinate_calculation 2016-03-31 18:58:52 +02:00
Patrick Niklaus
48000008d7 Simplify static_rtree tests 2016-03-31 18:58:52 +02:00
Patrick Niklaus
60d83ccf53 First round of lat,lng -> lng,lat switcheroo 2016-03-31 18:58:52 +02:00
Patrick Niklaus
dcab2b19c2 Add rectangle unit test 2016-03-31 18:58:52 +02:00
Patrick Niklaus
ce2c0ba160 Fix match and trip API response 2016-03-31 18:58:52 +02:00
Patrick Niklaus
776add7ea2 Fix out-of-bounds write in map_matching 2016-03-31 18:58:52 +02:00
Dane Springmeyer
dab8f76516 Fix compile on OS X 2016-03-31 18:58:52 +02:00
Patrick Niklaus
db170d006a Finish the nearest plugin 2016-03-31 18:58:52 +02:00
Patrick Niklaus
84d79f789c Initialize NearestParameters correctly 2016-03-31 18:58:52 +02:00
Patrick Niklaus
b1d70b8a8c Adapt to feedback in #519 2016-03-31 18:58:52 +02:00
Patrick Niklaus
1b1211092b Add trip plugin 2016-03-31 18:58:52 +02:00
Patrick Niklaus
4e0f2e13bd Hook up map matching 2016-03-31 18:58:52 +02:00
Patrick Niklaus
28961ed593 First compiling version of map_match plugin 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
c32900091c Adapts example/example.cpp to new osrm api 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
283926dbc9 Install _all_ transitively from public headers included header 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
40bf5c6092 Fix missing headers in hint.hpp 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
2a88477178 Adds $prefix/include/osrm to include dirs so that transitive header includes without osrm prefix can be found 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
f8d8289c84 Adapt the example to include all osrm public headers 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
030682fc62 Fixes missing public header installations 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
1e891e6ec5 Fix forward declarations in publicly facing osrm header 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
6a77ac442e Enable all plugins with aStatus::Error return code fallback for not implemented ones 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
9578b9a045 Adds publicly facing alias headers for parameters 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
130c88bd0c Temporarily comment out match.cpp as to not break the build process 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
2617960d6c We don't need templates at all, this is not CRTP? 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
f10da205bb Fix classes for service member function definitions 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
247d0d5290 Service skeletons for nearest, trip, match 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
bb5ca42114 Fix grammar constraint and enable all plugin links 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
66cb69d1d2 Plugin grammar skeletons 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
48008cdc6e Enforce parameter and grammar type to catch subtle bugs 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
3ff86c4536 Link parameters to grammars 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
ce82242004 Require a BaseParameters type at compile time via enable_if 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
d989714007 Adapts Nearest plugin to new API 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
9704ca7a8b Fix deleting incomplete type and make Engine moveable only 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
ec79d1e933 Adapts publicly facing new API 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
94f6005358 Adapts NearestParameters to new API 2016-03-31 18:58:52 +02:00
Patrick Niklaus
7d51a76e79 Initial non-building match plugin 2016-03-31 18:58:52 +02:00
Lauren Budorick
5b18278ee5 Include numeric in assemble_overview.cpp (needed on OSX for std::accumulate) 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
1d312f212a Semantic action handler requires passing optional by value and fusion::vector2 2016-03-31 18:58:52 +02:00
Patrick Niklaus
1258a64b3e Add tests for bearing parsing 2016-03-31 18:58:52 +02:00
Patrick Niklaus
c57e85f391 Add table service 2016-03-31 18:58:52 +02:00
Patrick Niklaus
59b4a142ec Add table API 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
bcea53460c Optional<T> semantic action handler takes T argument 2016-03-31 18:58:52 +02:00
Patrick Niklaus
72ebb3acb8 Fix parameter parsing tests 2016-03-31 18:58:52 +02:00
Patrick Niklaus
9e5a300cbb Fix table plugin 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
bf9824502a First take at distance table API re-write 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
d69bad9cb2 Adapts TableParameters and its validation to new API 2016-03-31 18:58:52 +02:00
Patrick Niklaus
66d241a2d8 Add viaroute suport for new API 2016-03-31 18:58:52 +02:00
356 changed files with 18678 additions and 9296 deletions

2
.gitignore vendored
View File

@ -40,6 +40,8 @@ Thumbs.db
# build related files # # build related files #
####################### #######################
/build/ /build/
/example/build/
/test/data/monaco*
/cmake/postinst /cmake/postinst
# Eclipse related files # # Eclipse related files #

View File

@ -165,6 +165,7 @@ script:
- popd - popd
- npm test - npm test
- make -C test/data - make -C test/data
- ./build/library-tests test/data/monaco.osrm
- mkdir example/build && pushd example/build - mkdir example/build && pushd example/build
- cmake .. - cmake ..
- make - make

View File

@ -1,3 +1,17 @@
# 5.0.0 # 5.0.0 RC1
- Renamed osrm-prepare into osrm-contract - Renamed osrm-prepare into osrm-contract
- osrm-contract does not need a profile parameter anymore - osrm-contract does not need a profile parameter anymore
- New public HTTP API, find documentation [here](https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api)
- POST support is discontinued, please use library bindings for more complex requests
- Removed timestamp plugin
- Coordinate order is now Longitude,Latitude
- Cucumber tests now based on Javascript (run with `npm test`)
- Profile API changed:
- `forward_mode` and `backward_mode` now need to be selected from a pre-defined list
- Global profile properties are now stored in a global `properties` element. This includes:
- `properties.traffic_signal_penalty`
- `properties.use_turn_restrictions`
- `properties.u_turn_penalty`
- `properties.allow_u_turn_at_via`

View File

@ -7,9 +7,9 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. P
endif() endif()
project(OSRM C CXX) project(OSRM C CXX)
set(OSRM_VERSION_MAJOR 4) set(OSRM_VERSION_MAJOR 5)
set(OSRM_VERSION_MINOR 9) set(OSRM_VERSION_MINOR 0)
set(OSRM_VERSION_PATCH 1) set(OSRM_VERSION_PATCH 0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
@ -32,6 +32,7 @@ endif()
option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON) option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON)
option(ENABLE_JSON_LOGGING "Adds additional JSON debug logging to the response" OFF) option(ENABLE_JSON_LOGGING "Adds additional JSON debug logging to the response" OFF)
option(BUILD_TOOLS "Build OSRM tools" OFF) option(BUILD_TOOLS "Build OSRM tools" OFF)
option(BUILD_COMPONENTS "Build OSRM tools" ON)
option(ENABLE_ASSERTIONS OFF) option(ENABLE_ASSERTIONS OFF)
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/) include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/)
@ -45,7 +46,7 @@ add_custom_target(FingerPrintConfigure ALL ${CMAKE_COMMAND}
COMMENT "Configuring revision fingerprint" COMMENT "Configuring revision fingerprint"
VERBATIM) VERBATIM)
add_custom_target(tests DEPENDS engine-tests extractor-tests util-tests) add_custom_target(tests DEPENDS engine-tests extractor-tests util-tests server-tests library-tests)
add_custom_target(benchmarks DEPENDS rtree-bench) add_custom_target(benchmarks DEPENDS rtree-bench)
set(BOOST_COMPONENTS date_time filesystem iostreams program_options regex system thread unit_test_framework) set(BOOST_COMPONENTS date_time filesystem iostreams program_options regex system thread unit_test_framework)
@ -55,7 +56,7 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/include/util/version.hpp ${CMAKE_CURRENT_BINARY_DIR}/include/util/version.hpp
) )
file(GLOB UtilGlob src/util/*.cpp) file(GLOB UtilGlob src/util/*.cpp)
file(GLOB ExtractorGlob src/extractor/*.cpp) file(GLOB ExtractorGlob src/extractor/*.cpp src/extractor/*/*.cpp)
file(GLOB ContractorGlob src/contractor/*.cpp) file(GLOB ContractorGlob src/contractor/*.cpp)
file(GLOB StorageGlob src/storage/*.cpp) file(GLOB StorageGlob src/storage/*.cpp)
file(GLOB ServerGlob src/server/*.cpp src/server/**/*.cpp) file(GLOB ServerGlob src/server/*.cpp src/server/**/*.cpp)
@ -63,6 +64,8 @@ file(GLOB EngineGlob src/engine/*.cpp src/engine/**/*.cpp)
file(GLOB ExtractorTestsGlob unit_tests/extractor/*.cpp) file(GLOB ExtractorTestsGlob unit_tests/extractor/*.cpp)
file(GLOB EngineTestsGlob unit_tests/engine/*.cpp) file(GLOB EngineTestsGlob unit_tests/engine/*.cpp)
file(GLOB UtilTestsGlob unit_tests/util/*.cpp) file(GLOB UtilTestsGlob unit_tests/util/*.cpp)
file(GLOB ServerTestsGlob unit_tests/server/*.cpp)
file(GLOB LibraryTestsGlob unit_tests/library/*.cpp)
file(GLOB IOTestsGlob unit_tests/io/*.cpp) file(GLOB IOTestsGlob unit_tests/io/*.cpp)
add_library(UTIL OBJECT ${UtilGlob}) add_library(UTIL OBJECT ${UtilGlob})
@ -79,20 +82,24 @@ add_executable(osrm-extract src/tools/extract.cpp)
add_executable(osrm-contract src/tools/contract.cpp) add_executable(osrm-contract src/tools/contract.cpp)
add_executable(osrm-routed src/tools/routed.cpp $<TARGET_OBJECTS:SERVER> $<TARGET_OBJECTS:UTIL>) add_executable(osrm-routed src/tools/routed.cpp $<TARGET_OBJECTS:SERVER> $<TARGET_OBJECTS:UTIL>)
add_executable(osrm-datastore src/tools/store.cpp $<TARGET_OBJECTS:UTIL>) add_executable(osrm-datastore src/tools/store.cpp $<TARGET_OBJECTS:UTIL>)
add_library(osrm src/osrm/osrm.cpp $<TARGET_OBJECTS:ENGINE> $<TARGET_OBJECTS:UTIL>) add_library(osrm src/osrm/osrm.cpp $<TARGET_OBJECTS:ENGINE> $<TARGET_OBJECTS:UTIL> $<TARGET_OBJECTS:STORAGE>)
add_library(osrm_extract $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>) add_library(osrm_extract $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>)
add_library(osrm_contract $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>) add_library(osrm_contract $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>)
add_library(osrm_store $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:UTIL>) add_library(osrm_store $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:UTIL>)
# Unit tests # Unit tests
add_executable(engine-tests EXCLUDE_FROM_ALL unit_tests/engine_tests.cpp ${EngineTestsGlob} $<TARGET_OBJECTS:ENGINE> $<TARGET_OBJECTS:UTIL>) add_executable(engine-tests EXCLUDE_FROM_ALL unit_tests/engine_tests.cpp ${EngineTestsGlob} $<TARGET_OBJECTS:ENGINE> $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:UTIL>)
add_executable(extractor-tests EXCLUDE_FROM_ALL unit_tests/extractor_tests.cpp ${ExtractorTestsGlob} $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>) add_executable(extractor-tests EXCLUDE_FROM_ALL unit_tests/extractor_tests.cpp ${ExtractorTestsGlob} $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>)
add_executable(util-tests EXCLUDE_FROM_ALL unit_tests/util_tests.cpp ${UtilTestsGlob} $<TARGET_OBJECTS:UTIL>) add_executable(util-tests EXCLUDE_FROM_ALL unit_tests/util_tests.cpp ${UtilTestsGlob} $<TARGET_OBJECTS:UTIL>)
add_executable(server-tests EXCLUDE_FROM_ALL unit_tests/server_tests.cpp ${ServerTestsGlob} $<TARGET_OBJECTS:UTIL> $<TARGET_OBJECTS:SERVER>)
add_executable(library-tests EXCLUDE_FROM_ALL unit_tests/library_tests.cpp ${LibraryTestsGlob})
# Benchmarks # Benchmarks
add_executable(rtree-bench EXCLUDE_FROM_ALL src/benchmarks/static_rtree.cpp $<TARGET_OBJECTS:UTIL>) add_executable(rtree-bench EXCLUDE_FROM_ALL src/benchmarks/static_rtree.cpp $<TARGET_OBJECTS:UTIL>)
target_include_directories(engine-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests)
target_include_directories(util-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests) target_include_directories(util-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests)
target_include_directories(library-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/)
target_include_directories(rtree-bench PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests) target_include_directories(rtree-bench PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests)
# Check the release mode # Check the release mode
@ -332,12 +339,13 @@ target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES})
target_link_libraries(osrm_store ${STORAGE_LIBRARIES}) target_link_libraries(osrm_store ${STORAGE_LIBRARIES})
# Tests # Tests
target_link_libraries(engine-tests ${ENGINE_LIBRARIES}) target_link_libraries(engine-tests ${ENGINE_LIBRARIES})
target_link_libraries(server-tests osrm ${Boost_LIBRARIES})
target_link_libraries(extractor-tests ${EXTRACTOR_LIBRARIES}) target_link_libraries(extractor-tests ${EXTRACTOR_LIBRARIES})
target_link_libraries(rtree-bench ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${TBB_LIBRARIES}) target_link_libraries(rtree-bench ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${TBB_LIBRARIES})
target_link_libraries(util-tests ${UTIL_LIBRARIES}) target_link_libraries(util-tests ${UTIL_LIBRARIES})
target_link_libraries(library-tests osrm ${Boost_LIBRARIES})
if(BUILD_TOOLS) if(BUILD_COMPONENTS)
message(STATUS "Activating OSRM internal tools")
find_package(GDAL) find_package(GDAL)
if(GDAL_FOUND) if(GDAL_FOUND)
add_executable(osrm-components src/tools/components.cpp $<TARGET_OBJECTS:UTIL>) add_executable(osrm-components src/tools/components.cpp $<TARGET_OBJECTS:UTIL>)
@ -348,6 +356,10 @@ if(BUILD_TOOLS)
else() else()
message(WARNING "libgdal and/or development headers not found") message(WARNING "libgdal and/or development headers not found")
endif() endif()
endif()
if(BUILD_TOOLS)
message(STATUS "Activating OSRM internal tools")
add_executable(osrm-io-benchmark src/tools/io-benchmark.cpp $<TARGET_OBJECTS:UTIL>) add_executable(osrm-io-benchmark src/tools/io-benchmark.cpp $<TARGET_OBJECTS:UTIL>)
target_link_libraries(osrm-io-benchmark ${Boost_LIBRARIES}) target_link_libraries(osrm-io-benchmark ${Boost_LIBRARIES})
add_executable(osrm-unlock-all src/tools/unlock_all_mutexes.cpp $<TARGET_OBJECTS:UTIL>) add_executable(osrm-unlock-all src/tools/unlock_all_mutexes.cpp $<TARGET_OBJECTS:UTIL>)
@ -378,16 +390,19 @@ set_property(TARGET osrm-routed PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
file(GLOB VariantGlob third_party/variant/*.hpp) file(GLOB VariantGlob third_party/variant/*.hpp)
file(GLOB LibraryGlob include/osrm/*.hpp) file(GLOB LibraryGlob include/osrm/*.hpp)
set(EngineHeader include/engine/engine.hpp include/engine/engine_config.hpp include/engine/route_parameters.hpp) file(GLOB ParametersGlob include/engine/api/*_parameters.hpp)
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp) set(EngineHeader include/engine/status.hpp include/engine/engine_config.hpp include/engine/hint.hpp include/engine/bearing.hpp include/engine/phantom_node.hpp)
set(ExtractorHeader include/extractor/extractor.hpp include/extractor/extractor_config.hpp) set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp include/util/typedefs.hpp include/util/strong_typedef.hpp)
set(ExtractorHeader include/extractor/extractor.hpp include/extractor/extractor_config.hpp include/extractor/travel_mode.hpp)
set(ContractorHeader include/contractor/contractor.hpp include/contractor/contractor_config.hpp) set(ContractorHeader include/contractor/contractor.hpp include/contractor/contractor_config.hpp)
#set(StorageHeader include/storage/storage.hpp include/storage/storage_config.hpp) set(StorageHeader include/storage/storage.hpp include/storage/storage_config.hpp)
install(FILES ${EngineHeader} DESTINATION include/osrm/engine) install(FILES ${EngineHeader} DESTINATION include/osrm/engine)
install(FILES ${UtilHeader} DESTINATION include/osrm/util) install(FILES ${UtilHeader} DESTINATION include/osrm/util)
install(FILES ${StorageHeader} DESTINATION include/osrm/storage)
install(FILES ${ExtractorHeader} DESTINATION include/osrm/extractor) install(FILES ${ExtractorHeader} DESTINATION include/osrm/extractor)
install(FILES ${ContractorHeader} DESTINATION include/osrm/contractor) install(FILES ${ContractorHeader} DESTINATION include/osrm/contractor)
install(FILES ${LibraryGlob} DESTINATION include/osrm) install(FILES ${LibraryGlob} DESTINATION include/osrm)
install(FILES ${ParametersGlob} DESTINATION include/osrm/engine/api)
install(FILES ${VariantGlob} DESTINATION include/variant) install(FILES ${VariantGlob} DESTINATION include/variant)
install(TARGETS osrm-extract DESTINATION bin) install(TARGETS osrm-extract DESTINATION bin)
install(TARGETS osrm-contract DESTINATION bin) install(TARGETS osrm-contract DESTINATION bin)

View File

@ -18,6 +18,7 @@ RECURSIVE = YES
EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/third_party \ EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/third_party \
@CMAKE_CURRENT_SOURCE_DIR@/build \ @CMAKE_CURRENT_SOURCE_DIR@/build \
@CMAKE_CURRENT_SOURCE_DIR@/node_modules \
@CMAKE_CURRENT_SOURCE_DIR@/unit_tests \ @CMAKE_CURRENT_SOURCE_DIR@/unit_tests \
@CMAKE_CURRENT_SOURCE_DIR@/benchmarks \ @CMAKE_CURRENT_SOURCE_DIR@/benchmarks \
@CMAKE_CURRENT_SOURCE_DIR@/features @CMAKE_CURRENT_SOURCE_DIR@/features

View File

@ -1,5 +1,5 @@
prefix=@CMAKE_INSTALL_PREFIX@ prefix=@CMAKE_INSTALL_PREFIX@
includedir=${prefix}/include includedir=${prefix}/include ${prefix}/include/osrm
libdir=${prefix}/lib libdir=${prefix}/lib
Name: libOSRM Name: libOSRM

View File

@ -1,6 +1,6 @@
module.exports = { module.exports = {
default: '--require features --tags ~@todo --tags ~@bug --tags ~@stress', default: '--require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@guidance',
verify: '--require features --tags ~@todo --tags ~@bug --tags ~@stress -f progress', verify: '--require features --tags ~@todo --tags ~@bug --tags ~@stress -f progress --tags ~@guidance',
jenkins: '--require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@options -f progress', jenkins: '--require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@options -f progress',
bugs: '--require features --tags @bug', bugs: '--require features --tags @bug',
todo: '--require features --tags @todo', todo: '--require features --tags @todo',

View File

@ -19,7 +19,7 @@ find_path(LibOSRM_INCLUDE_DIR osrm/osrm.hpp
/opt/local /opt/local
/opt) /opt)
set(LibOSRM_INCLUDE_DIRS ${LibOSRM_INCLUDE_DIR}) set(LibOSRM_INCLUDE_DIRS ${LibOSRM_INCLUDE_DIR} ${LibOSRM_INCLUDE_DIR}/osrm)
find_library(TEST_LibOSRM_STATIC_LIBRARY Names osrm.lib libosrm.a find_library(TEST_LibOSRM_STATIC_LIBRARY Names osrm.lib libosrm.a
PATH_SUFFIXES osrm lib/osrm lib PATH_SUFFIXES osrm lib/osrm lib

View File

@ -1,61 +1,85 @@
#include "osrm/json_container.hpp"
#include "osrm/engine_config.hpp"
#include "osrm/route_parameters.hpp" #include "osrm/route_parameters.hpp"
#include "osrm/table_parameters.hpp"
#include "osrm/nearest_parameters.hpp"
#include "osrm/trip_parameters.hpp"
#include "osrm/match_parameters.hpp"
#include "osrm/coordinate.hpp"
#include "osrm/engine_config.hpp"
#include "osrm/json_container.hpp"
#include "osrm/status.hpp"
#include "osrm/osrm.hpp" #include "osrm/osrm.hpp"
#include <string> #include <string>
#include <utility> #include <utility>
#include <iostream> #include <iostream>
#include <exception> #include <exception>
#include <cstdlib> #include <cstdlib>
int main(int argc, const char *argv[]) try int main(int argc, const char *argv[]) try
{ {
if (argc < 2) if (argc < 2)
{ {
std::cerr << "Error: Not enough arguments." << std::endl std::cerr << "Usage: " << argv[0] << " data.osrm\n";
<< "Run " << argv[0] << " data.osrm" << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
osrm::EngineConfig engine_config; using namespace osrm;
std::string base_path(argv[1]);
engine_config.server_paths["ramindex"] = base_path + ".ramIndex";
engine_config.server_paths["fileindex"] = base_path + ".fileIndex";
engine_config.server_paths["hsgrdata"] = base_path + ".hsgr";
engine_config.server_paths["nodesdata"] = base_path + ".nodes";
engine_config.server_paths["edgesdata"] = base_path + ".edges";
engine_config.server_paths["coredata"] = base_path + ".core";
engine_config.server_paths["geometries"] = base_path + ".geometry";
engine_config.server_paths["timestamp"] = base_path + ".timestamp";
engine_config.server_paths["namesdata"] = base_path + ".names";
engine_config.use_shared_memory = false;
osrm::OSRM routing_machine(engine_config); // Configure based on a .osrm base path, and no datasets in shared mem from osrm-datastore
EngineConfig config;
config.storage_config = {argv[1]};
config.use_shared_memory = false;
osrm::RouteParameters route_parameters; // Routing machine with several services (such as Route, Table, Nearest, Trip, Match)
// route is in Monaco OSRM osrm{config};
route_parameters.service = "viaroute";
route_parameters.AddCoordinate(43.731142, 7.419758);
route_parameters.AddCoordinate(43.736825, 7.419505);
osrm::json::Object json_result; // The following shows how to use the Route service; configure this service
const int result_code = routing_machine.RunQuery(route_parameters, json_result); RouteParameters params;
std::cout << "result code: " << result_code << std::endl;
// 2xx code // Route in monaco
if (result_code / 100 == 2) params.coordinates.push_back({util::FloatLongitude(7.419758), util::FloatLatitude(43.731142)});
params.coordinates.push_back({util::FloatLongitude(7.419505), util::FloatLatitude(43.736825)});
// Response is in JSON format
json::Object result;
// Execute routing request, this does the heavy lifting
const auto status = osrm.Route(params, result);
if (status == Status::Ok)
{ {
// Extract data out of JSON structure auto &routes = result.values["routes"].get<json::Array>();
auto& summary = json_result.values["route_summary"].get<osrm::json::Object>();
auto duration = summary.values["total_time"].get<osrm::json::Number>().value; // Let's just use the first route
auto distance = summary.values["total_distance"].get<osrm::json::Number>().value; auto &route = routes.values.at(0).get<json::Object>();
std::cout << "duration: " << duration << std::endl; const auto distance = route.values["distance"].get<json::Number>().value;
std::cout << "distance: " << distance << std::endl; const auto duration = route.values["duration"].get<json::Number>().value;
// Warn users if extract does not contain the default Berlin coordinates from above
if (distance == 0 or duration == 0)
{
std::cout << "Note: distance or duration is zero. ";
std::cout << "You are probably doing a query outside of the OSM extract.\n\n";
}
std::cout << "Distance: " << distance << " meter\n";
std::cout << "Duration: " << duration << " seconds\n";
}
else if (status == Status::Error)
{
const auto code = result.values["code"].get<json::String>().value;
const auto message = result.values["message"].get<json::String>().value;
std::cout << "Code: " << code << "\n";
std::cout << "Message: " << code << "\n";
return EXIT_FAILURE;
} }
return EXIT_SUCCESS;
} }
catch (const std::exception &current_exception) catch (const std::exception &e)
{ {
std::cout << "exception: " << current_exception.what(); std::cerr << "Error: " << e.what() << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }

View File

@ -4,7 +4,7 @@ Feature: Bike - Squares and other areas
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
@square @square @mokob @2154
Scenario: Bike - Route along edge of a squares Scenario: Bike - Route along edge of a squares
Given the node map Given the node map
| x | | | x | |
@ -17,15 +17,15 @@ Feature: Bike - Squares and other areas
| abcda | yes | residential | | abcda | yes | residential |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abcda | | a | b | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
| b | c | abcda | | b | c | abcda,abcda |
| c | b | abcda | | c | b | abcda,abcda |
| c | d | abcda | | c | d | abcda,abcda |
| d | c | abcda | | d | c | abcda,abcda |
| d | a | abcda | | d | a | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
@building @building
Scenario: Bike - Don't route on buildings Scenario: Bike - Don't route on buildings
@ -41,16 +41,16 @@ Feature: Bike - Squares and other areas
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | xa | | a | b | xa,xa |
| a | d | xa | | a | d | xa,xa |
| b | c | xa | | b | c | xa,xa |
| c | b | xa | | c | b | xa,xa |
| c | d | xa | | c | d | xa,xa |
| d | c | xa | | d | c | xa,xa |
| d | a | xa | | d | a | xa,xa |
| a | d | xa | | a | d | xa,xa |
@parking @parking @mokob @2154
Scenario: Bike - parking areas Scenario: Bike - parking areas
Given the node map Given the node map
| e | | | f | | e | | | f |
@ -65,19 +65,20 @@ Feature: Bike - Squares and other areas
| abcda | (nil) | parking | | abcda | (nil) | parking |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,abcda,by | | x | y | xa,abcda,by,by |
| y | x | by,abcda,xa | | y | x | by,abcda,xa,xa |
| a | b | abcda | | a | b | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
| b | c | abcda | | b | c | abcda,abcda |
| c | b | abcda | | c | b | abcda,abcda |
| c | d | abcda | | c | d | abcda,abcda |
| d | c | abcda | | d | c | abcda,abcda |
| d | a | abcda | | d | a | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
@train @platform
@train @platform @mokob @2154
Scenario: Bike - railway platforms Scenario: Bike - railway platforms
Given the node map Given the node map
| x | a | b | y | | x | a | b | y |
@ -90,14 +91,14 @@ Feature: Bike - Squares and other areas
| abcda | (nil) | platform | | abcda | (nil) | platform |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,abcda,by | | x | y | xa,abcda,by,by |
| y | x | by,abcda,xa | | y | x | by,abcda,xa,xa |
| a | b | abcda | | a | b | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
| b | c | abcda | | b | c | abcda,abcda |
| c | b | abcda | | c | b | abcda,abcda |
| c | d | abcda | | c | d | abcda,abcda |
| d | c | abcda | | d | c | abcda,abcda |
| d | a | abcda | | d | a | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |

View File

@ -17,15 +17,15 @@ Feature: Bicycle - Handle movable bridge
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | g | abc,cde,efg | 1,5,1 | | a | g | abc,cde,efg,efg | cycling,movable bridge,cycling,cycling |
| b | f | abc,cde,efg | 1,5,1 | | b | f | abc,cde,efg,efg | cycling,movable bridge,cycling,cycling |
| e | c | cde | 5 | | e | c | cde,cde | movable bridge,movable bridge |
| e | b | cde,abc | 5,1 | | e | b | cde,abc,abc | movable bridge,cycling,cycling |
| e | a | cde,abc | 5,1 | | e | a | cde,abc,abc | movable bridge,cycling,cycling |
| c | e | cde | 5 | | c | e | cde,cde | movable bridge,movable bridge |
| c | f | cde,efg | 5,1 | | c | f | cde,efg,efg | movable bridge,cycling,cycling |
| c | g | cde,efg | 5,1 | | c | g | cde,efg,efg | movable bridge,cycling,cycling |
Scenario: Bicycle - Properly handle durations Scenario: Bicycle - Properly handle durations
Given the node map Given the node map
@ -40,8 +40,8 @@ Feature: Bicycle - Handle movable bridge
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | modes | speed | | from | to | route | modes | speed |
| a | g | abc,cde,efg | 1,5,1 | 5 km/h | | a | g | abc,cde,efg,efg | cycling,movable bridge,cycling,cycling | 5 km/h |
| b | f | abc,cde,efg | 1,5,1 | 4 km/h | | b | f | abc,cde,efg,efg | cycling,movable bridge,cycling,cycling | 4 km/h |
| c | e | cde | 5 | 2 km/h | | c | e | cde,cde | movable bridge,movable bridge | 2 km/h |
| e | c | cde | 5 | 2 km/h | | e | c | cde,cde | movable bridge,movable bridge | 2 km/h |

View File

@ -17,15 +17,15 @@ Feature: Bike - Handle ferry routes
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | g | abc,cde,efg | | a | g | abc,cde,efg,efg |
| b | f | abc,cde,efg | | b | f | abc,cde,efg,efg |
| e | c | cde | | e | c | cde,cde |
| e | b | cde,abc | | e | b | cde,abc,abc |
| e | a | cde,abc | | e | a | cde,abc,abc |
| c | e | cde | | c | e | cde,cde |
| c | f | cde,efg | | c | f | cde,efg,efg |
| c | g | cde,efg | | c | g | cde,efg,efg |
Scenario: Bike - Ferry duration, single node Scenario: Bike - Ferry duration, single node
Given the node map Given the node map
@ -59,5 +59,5 @@ Feature: Bike - Handle ferry routes
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | d | abcd | 3600s +-10 | | a | d | abcd,abcd | 3600s +-10 |
| d | a | abcd | 3600s +-10 | | d | a | abcd,abcd | 3600s +-10 |

View File

@ -48,9 +48,9 @@ Feature: Bike - Max speed restrictions
| bc | residential | 80 | | bc | residential | 80 |
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 15 km/h | | a | b | ab,ab | 15 km/h |
| b | c | bc | 15 km/h | | b | c | bc,bc | 15 km/h |
Scenario: Bike - Forward/backward maxspeed Scenario: Bike - Forward/backward maxspeed
Given the shortcuts Given the shortcuts

View File

@ -1,12 +1,6 @@
@routing @bicycle @mode @routing @bicycle @mode
Feature: Bike - Mode flag Feature: Bike - Mode flag
# bicycle modes:
# 1 bike
# 2 pushing
# 3 ferry
# 4 train
Background: Background:
Given the profile "bicycle" Given the profile "bicycle"
@ -22,13 +16,13 @@ Feature: Bike - Mode flag
| cd | primary | | | | cd | primary | | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | 1,3,1 | | a | d | ab,bc,cd,cd | depart,right,left,arrive | cycling,ferry,cycling,cycling |
| d | a | cd,bc,ab | head,right,left,destination | 1,3,1 | | d | a | cd,bc,ab,ab | depart,right,left,arrive | cycling,ferry,cycling,cycling |
| c | a | bc,ab | head,left,destination | 3,1 | | c | a | bc,ab,ab | depart,left,arrive | ferry,cycling,cycling |
| d | b | cd,bc | head,right,destination | 1,3 | | d | b | cd,bc,bc | depart,right,arrive | cycling,ferry,ferry |
| a | c | ab,bc | head,right,destination | 1,3 | | a | c | ab,bc,bc | depart,right,arrive | cycling,ferry,ferry |
| b | d | bc,cd | head,left,destination | 3,1 | | b | d | bc,cd,cd | depart,left,arrive | ferry,cycling,cycling |
Scenario: Bike - Mode when using a train Scenario: Bike - Mode when using a train
Given the node map Given the node map
@ -42,13 +36,13 @@ Feature: Bike - Mode flag
| cd | primary | | | | cd | primary | | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | 1,4,1 | | a | d | ab,bc,cd,cd | depart,right,left,arrive | cycling,train,cycling,cycling |
| d | a | cd,bc,ab | head,right,left,destination | 1,4,1 | | d | a | cd,bc,ab,ab | depart,right,left,arrive | cycling,train,cycling,cycling |
| c | a | bc,ab | head,left,destination | 4,1 | | c | a | bc,ab,ab | depart,left,arrive | train,cycling,cycling |
| d | b | cd,bc | head,right,destination | 1,4 | | d | b | cd,bc,bc | depart,right,arrive | cycling,train,train |
| a | c | ab,bc | head,right,destination | 1,4 | | a | c | ab,bc,bc | depart,right,arrive | cycling,train,train |
| b | d | bc,cd | head,left,destination | 4,1 | | b | d | bc,cd,cd | depart,left,arrive | train,cycling,cycling |
Scenario: Bike - Mode when pushing bike against oneways Scenario: Bike - Mode when pushing bike against oneways
Given the node map Given the node map
@ -62,13 +56,13 @@ Feature: Bike - Mode flag
| cd | primary | | | cd | primary | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,straight,straight,destination | 1,1,1 | | a | d | ab,bc,cd,cd | depart,right,left,arrive | cycling,cycling,cycling,cycling |
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 | | d | a | cd,bc,ab,ab | depart,right,left,arrive | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab | head,left,destination | 2,1 | | c | a | bc,ab,ab | depart,left,arrive | pushing bike,cycling,cycling |
| d | b | cd,bc | head,right,destination | 1,2 | | d | b | cd,bc,bc | depart,right,arrive | cycling,pushing bike,pushing bike |
| a | c | ab,bc | head,straight,destination | 1,1 | | a | c | ab,bc,bc | depart,right,arrive | cycling,cycling,cycling |
| b | d | bc,cd | head,straight,destination | 1,1 | | b | d | bc,cd,cd | depart,left,arrive | cycling,cycling,cycling |
Scenario: Bike - Mode when pushing on pedestrain streets Scenario: Bike - Mode when pushing on pedestrain streets
Given the node map Given the node map
@ -82,13 +76,13 @@ Feature: Bike - Mode flag
| cd | primary | | cd | primary |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 | | a | d | ab,bc,cd,cd | depart,right,left,arrive | cycling,pushing bike,cycling,cycling |
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 | | d | a | cd,bc,ab,ab | depart,right,left,arrive | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab | head,left,destination | 2,1 | | c | a | bc,ab,ab | depart,left,arrive | pushing bike,cycling,cycling |
| d | b | cd,bc | head,right,destination | 1,2 | | d | b | cd,bc,bc | depart,right,arrive | cycling,pushing bike,pushing bike |
| a | c | ab,bc | head,right,destination | 1,2 | | a | c | ab,bc,bc | depart,right,arrive | cycling,pushing bike,pushing bike |
| b | d | bc,cd | head,left,destination | 2,1 | | b | d | bc,cd,cd | depart,left,arrive | pushing bike,cycling,cycling |
Scenario: Bike - Mode when pushing on pedestrain areas Scenario: Bike - Mode when pushing on pedestrain areas
Given the node map Given the node map
@ -102,13 +96,13 @@ Feature: Bike - Mode flag
| df | primary | | | df | primary | |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | f | ab,bcd,df | 1,2,1 | | a | f | ab,bcd,df,df | cycling,pushing bike,cycling,cycling |
| f | a | df,bcd,ab | 1,2,1 | | f | a | df,bcd,ab,ab | cycling,pushing bike,cycling,cycling |
| d | a | bcd,ab | 2,1 | | d | a | bcd,ab,ab | pushing bike,cycling,cycling |
| f | b | df,bcd | 1,2 | | f | b | df,bcd,bcd | cycling,pushing bike,pushing bike |
| a | d | ab,bcd | 1,2 | | a | d | ab,bcd,bcd | cycling,pushing bike,pushing bike |
| b | f | bcd,df | 2,1 | | b | f | bcd,df,df | pushing bike,cycling,cycling |
Scenario: Bike - Mode when pushing on steps Scenario: Bike - Mode when pushing on steps
Given the node map Given the node map
@ -122,13 +116,13 @@ Feature: Bike - Mode flag
| cd | primary | | cd | primary |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 | | a | d | ab,bc,cd,cd | depart,right,left,arrive | cycling,pushing bike,cycling,cycling |
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 | | d | a | cd,bc,ab,ab | depart,right,left,arrive | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab | head,left,destination | 2,1 | | c | a | bc,ab,ab | depart,left,arrive | pushing bike,cycling,cycling |
| d | b | cd,bc | head,right,destination | 1,2 | | d | b | cd,bc,bc | depart,right,arrive | cycling,pushing bike,pushing bike |
| a | c | ab,bc | head,right,destination | 1,2 | | a | c | ab,bc,bc | depart,right,arrive | cycling,pushing bike,pushing bike |
| b | d | bc,cd | head,left,destination | 2,1 | | b | d | bc,cd,cd | depart,left,arrive | pushing bike,cycling,cycling |
Scenario: Bike - Mode when bicycle=dismount Scenario: Bike - Mode when bicycle=dismount
Given the node map Given the node map
@ -142,13 +136,13 @@ Feature: Bike - Mode flag
| cd | primary | | | cd | primary | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 | | a | d | ab,bc,cd,cd | depart,right,left,arrive | cycling,pushing bike,cycling,cycling |
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 | | d | a | cd,bc,ab,ab | depart,right,left,arrive | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab | head,left,destination | 2,1 | | c | a | bc,ab,ab | depart,left,arrive | pushing bike,cycling,cycling |
| d | b | cd,bc | head,right,destination | 1,2 | | d | b | cd,bc,bc | depart,right,arrive | cycling,pushing bike,pushing bike |
| a | c | ab,bc | head,right,destination | 1,2 | | a | c | ab,bc,bc | depart,right,arrive | cycling,pushing bike,pushing bike |
| b | d | bc,cd | head,left,destination | 2,1 | | b | d | bc,cd,cd | depart,left,arrive | pushing bike,cycling,cycling |
Scenario: Bicycle - Modes when starting on forward oneway Scenario: Bicycle - Modes when starting on forward oneway
Given the node map Given the node map
@ -159,9 +153,9 @@ Feature: Bike - Mode flag
| ab | yes | | ab | yes |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | b | ab | 1 | | a | b | ab,ab | cycling,cycling |
| b | a | ab | 2 | | b | a | ab,ab | pushing bike,pushing bike |
Scenario: Bicycle - Modes when starting on reverse oneway Scenario: Bicycle - Modes when starting on reverse oneway
Given the node map Given the node map
@ -172,6 +166,6 @@ Feature: Bike - Mode flag
| ab | -1 | | ab | -1 |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | b | ab | 2 | | a | b | ab,ab | pushing bike,pushing bike |
| b | a | ab | 1 | | b | a | ab,ab | cycling,cycling |

View File

@ -15,8 +15,8 @@ Feature: Bike - Street names in instructions
| bc | Your Way | | bc | Your Way |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | My Way,Your Way | | a | c | My Way,Your Way,Your Way |
@unnamed @unnamed
Scenario: Bike - Use way type to describe unnamed ways Scenario: Bike - Use way type to describe unnamed ways
@ -29,5 +29,5 @@ Feature: Bike - Street names in instructions
| bcd | track | | | bcd | track | |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | d | {highway:cycleway},{highway:track} | | a | d | {highway:cycleway},{highway:track},{highway:track} |

View File

@ -29,9 +29,9 @@ Feature: Bike - Oneway streets
| da | | no | | da | | no |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| b | a | bc,cd,da | | b | a | bc,cd,da,da |
Scenario: Bike - Handle various oneway tag values Scenario: Bike - Handle various oneway tag values
Then routability should be Then routability should be
@ -124,5 +124,5 @@ Feature: Bike - Oneway streets
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | ab,bc | | a | c | ab,bc,bc |

View File

@ -32,7 +32,7 @@ Feature: Bike - Accessability of different way types
| primary | -1 | foot | bike | | primary | -1 | foot | bike |
| pedestrian | -1 | foot | foot | | pedestrian | -1 | foot | foot |
@square @square
Scenario: Bike - Push bikes on pedestrian areas Scenario: Bike - Push bikes on pedestrian areas
Given the node map Given the node map
| x | | | x | |
@ -46,14 +46,14 @@ Feature: Bike - Accessability of different way types
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abcda | | a | b | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
| b | c | abcda | | b | c | abcda,abcda |
| c | b | abcda | | c | b | abcda,abcda |
| c | d | abcda | | c | d | abcda,abcda |
| d | c | abcda | | d | c | abcda,abcda |
| d | a | abcda | | d | a | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
Scenario: Bike - Pushing bikes on ways with foot=yes Scenario: Bike - Pushing bikes on ways with foot=yes
Then routability should be Then routability should be
@ -62,7 +62,7 @@ Feature: Bike - Accessability of different way types
| motorway | yes | foot | | | motorway | yes | foot | |
| runway | | | | | runway | | | |
| runway | yes | foot | foot | | runway | yes | foot | foot |
@todo @todo
Scenario: Bike - Pushing bikes on ways with foot=yes in one direction Scenario: Bike - Pushing bikes on ways with foot=yes in one direction
Then routability should be Then routability should be
@ -72,20 +72,20 @@ Feature: Bike - Accessability of different way types
| motorway | | yes | | foot | | motorway | | yes | | foot |
@construction @construction
Scenario: Bike - Don't allow routing on ways still under construction Scenario: Bike - Don't allow routing on ways still under construction
Then routability should be Then routability should be
| highway | foot | bicycle | bothw | | highway | foot | bicycle | bothw |
| primary | | | x | | primary | | | x |
| construction | | | | | construction | | | |
| construction | yes | | | | construction | yes | | |
| construction | | yes | | | construction | | yes | |
@roundabout @roundabout
Scenario: Bike - Don't push bikes against oneway flow on roundabouts Scenario: Bike - Don't push bikes against oneway flow on roundabouts
Then routability should be Then routability should be
| junction | forw | backw | | junction | forw | backw |
| roundabout | x | | | roundabout | x | |
Scenario: Bike - Instructions when pushing bike on oneways Scenario: Bike - Instructions when pushing bike on oneways
Given the node map Given the node map
| a | b | | | a | b | |
@ -98,11 +98,11 @@ Feature: Bike - Accessability of different way types
| cd | primary | | | cd | primary | |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| a | d | ab,bc,cd | head,straight,straight,destination | | a | d | ab,bc,cd,cd | depart,right,left,arrive |
| d | a | cd,bc,ab | head,right,left,destination | | d | a | cd,bc,ab,ab | depart,right,left,arrive |
| c | a | bc,ab | head,left,destination | | c | a | bc,ab,ab | depart,left,arrive |
| d | b | cd,bc | head,right,destination | | d | b | cd,bc,bc | depart,right,arrive |
@todo @todo
Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc. Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc.
@ -117,8 +117,8 @@ Feature: Bike - Accessability of different way types
| cd | primary | | cd | primary |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| a | d | ab,bc,cd | head,right,left,destination | | a | d | ab,bc,cd,cd | depart,right,left,arrive |
| d | a | cd,bc,ab | head,right,left,destination | | d | a | cd,bc,ab,ab | depart,right,left,arrive |
| c | a | bc,ab | head,left,destination | | c | a | bc,ab,ab | depart,left,arrive |
| d | b | cd,bc | head,right,destination | | d | b | cd,bc,bc | depart,right,arrive |

View File

@ -13,8 +13,8 @@ Feature: Bike - Way ref
| ab | Utopia Drive | E7 | | ab | Utopia Drive | E7 |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | Utopia Drive / E7 | | a | b | Utopia Drive / E7,Utopia Drive / E7 |
Scenario: Bike - Way with only ref Scenario: Bike - Way with only ref
Given the node map Given the node map
@ -26,7 +26,7 @@ Feature: Bike - Way ref
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | E7 | | a | b | E7,E7 |
Scenario: Bike - Way with only name Scenario: Bike - Way with only name
Given the node map Given the node map
@ -37,5 +37,5 @@ Feature: Bike - Way ref
| ab | Utopia Drive | | ab | Utopia Drive |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | Utopia Drive | | a | b | Utopia Drive,Utopia Drive |

View File

@ -25,10 +25,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | wj | j | no_left_turn | | restriction | sj | wj | j | no_left_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Bike - No right turn Scenario: Bike - No right turn
@ -49,10 +49,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | ej | j | no_right_turn | | restriction | sj | ej | j | no_right_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Bike - No u-turn Scenario: Bike - No u-turn
@ -73,10 +73,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | wj | j | no_u_turn | | restriction | sj | wj | j | no_u_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Bike - Handle any no_* relation Scenario: Bike - Handle any no_* relation
@ -97,10 +97,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | wj | j | no_weird_zigzags | | restriction | sj | wj | j | no_weird_zigzags |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@only_turning @only_turning
Scenario: Bike - Only left turn Scenario: Bike - Only left turn
@ -121,10 +121,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | wj | j | only_left_turn | | restriction | sj | wj | j | only_left_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@only_turning @only_turning
Scenario: Bike - Only right turn Scenario: Bike - Only right turn
@ -145,10 +145,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | ej | j | only_right_turn | | restriction | sj | ej | j | only_right_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@only_turning @only_turning
Scenario: Bike - Only straight on Scenario: Bike - Only straight on
@ -169,10 +169,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | nj | j | only_straight_on | | restriction | sj | nj | j | only_straight_on |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Bike - Handle any only_* restriction Scenario: Bike - Handle any only_* restriction
@ -193,10 +193,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | nj | j | only_weird_zigzags | | restriction | sj | nj | j | only_weird_zigzags |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@except @except
Scenario: Bike - Except tag and on no_ restrictions Scenario: Bike - Except tag and on no_ restrictions
@ -222,11 +222,11 @@ Feature: Bike - Turn restrictions
| restriction | sj | dj | j | no_right_turn | bicycle | | restriction | sj | dj | j | no_right_turn | bicycle |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | a | sj,aj | | s | a | sj,aj,aj |
| s | b | sj,bj | | s | b | sj,bj,bj |
| s | c | sj,cj | | s | c | sj,cj,cj |
| s | d | sj,dj | | s | d | sj,dj,dj |
@except @except
Scenario: Bike - Except tag and on only_ restrictions Scenario: Bike - Except tag and on only_ restrictions
@ -246,9 +246,9 @@ Feature: Bike - Turn restrictions
| restriction | sj | aj | j | only_straight_on | bicycle | | restriction | sj | aj | j | only_straight_on | bicycle |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | a | sj,aj | | s | a | sj,aj,aj |
| s | b | sj,bj | | s | b | sj,bj,bj |
@except @except
Scenario: Bike - Multiple except tag values Scenario: Bike - Multiple except tag values
@ -280,10 +280,10 @@ Feature: Bike - Turn restrictions
| restriction | sj | jf | j | no_straight_on | bicycle, bus | | restriction | sj | jf | j | no_straight_on | bicycle, bus |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | a | sj,ja | | s | a | sj,ja,ja |
| s | b | sj,jb | | s | b | sj,jb,jb |
| s | c | sj,jc | | s | c | sj,jc,jc |
| s | d | sj,jd | | s | d | sj,jd,jd |
| s | e | sj,je | | s | e | sj,je,je |
| s | f | sj,jf | | s | f | sj,jf,jf |

View File

@ -21,10 +21,10 @@ Feature: Roundabout Instructions
| abcda | roundabout | | abcda | roundabout |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| s | t | sa,tb | head,enter_roundabout-1,destination | | s | t | sa,tb,tb | depart,roundabout-exit-1,arrive |
| s | u | sa,uc | head,enter_roundabout-2,destination | | s | u | sa,uc,uc | depart,roundabout-exit-2,arrive |
| s | v | sa,vd | head,enter_roundabout-3,destination | | s | v | sa,vd,vd | depart,roundabout-exit-3,arrive |
| u | v | uc,vd | head,enter_roundabout-1,destination | | u | v | uc,vd,vd | depart,roundabout-exit-1,arrive |
| u | s | uc,sa | head,enter_roundabout-2,destination | | u | s | uc,sa,sa | depart,roundabout-exit-2,arrive |
| u | t | uc,tb | head,enter_roundabout-3,destination | | u | t | uc,tb,tb | depart,roundabout-exit-3,arrive |

View File

@ -31,7 +31,7 @@ Feature: Bike - Stop areas for public transport
| public_transport | stop_area | c | st | | public_transport | stop_area | c | st |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | d | abcd | | a | d | abcd,abcd |
| s | t | st | | s | t | st,st |
| s | d | /st,.+,abcd/ | | s | d | /st,.+,abcd/,abcd/ |

View File

@ -23,11 +23,11 @@ Feature: Turn Penalties
| jg | | jg |
When I route I should get When I route I should get
| from | to | route | time | distance | | from | to | route | time | distance |
| s | a | sj,ja | 39s +-1 | 242m +-1 | | s | a | sj,ja,ja | 39s +-1 | 242m +-1 |
| s | b | sj,jb | 30s +-1 | 200m +-1 | | s | b | sj,jb,jb | 30s +-1 | 200m +-1 |
| s | c | sj,jc | 29s +-1 | 242m +-1 | | s | c | sj,jc,jc | 29s +-1 | 242m +-1 |
| s | d | sj,jd | 20s +-1 | 200m +-1 | | s | d | sj,jd,jd | 20s +-1 | 200m +-1 |
| s | e | sj,je | 29s +-1 | 242m +-1 | | s | e | sj,je,je | 29s +-1 | 242m +-1 |
| s | f | sj,jf | 30s +-1 | 200m +-1 | | s | f | sj,jf,jf | 30s +-1 | 200m +-1 |
| s | g | sj,jg | 39s +-1 | 242m +-1 | | s | g | sj,jg,jg | 39s +-1 | 242m +-1 |

View File

@ -17,8 +17,8 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 47 km/h +- 1 | | a | b | ab,ab | 47 km/h +- 1 |
| b | c | bc | 47 km/h +- 1 | | b | c | bc,bc | 47 km/h +- 1 |
Scenario: Car - Advisory speed overwrites forward maxspeed Scenario: Car - Advisory speed overwrites forward maxspeed
Given the node map Given the node map
@ -31,9 +31,10 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 47 km/h +- 1 | | a | b | ab,ab | 47 km/h +- 1 |
| b | c | bc | 47 km/h +- 1 | | b | c | bc,bc | 47 km/h +- 1 |
@mokob @2162
Scenario: Car - Advisory speed overwrites backwards maxspeed Scenario: Car - Advisory speed overwrites backwards maxspeed
Given the node map Given the node map
| a | b | c | | a | b | c |
@ -45,9 +46,26 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| b | a | ab | 47 km/h +- 1 | | b | a | ab,ab | 47 km/h +- 1 |
| c | b | bc | 47 km/h +- 1 | | c | b | bc,bc | 47 km/h +- 1 |
@mokob @2162 @deleteme
Scenario: Car - Advisory speed overwrites backwards maxspeed
Given the node map
| a | b | c | d |
And the ways
| nodes | highway | maxspeed:backward | maxspeed:advisory:backward |
| ab | residential | | 45 |
| bc | residential | 90 | 45 |
| cd | residential | | 45 |
When I route I should get
| from | to | route | speed |
| c | b | bc,bc | 47 km/h +- 1 |
| d | c | cd,cd | 47 km/h +- 1 |
@mokob @2162
Scenario: Car - Directional advisory speeds play nice with eachother Scenario: Car - Directional advisory speeds play nice with eachother
Given the node map Given the node map
| a | b | c | | a | b | c |
@ -59,9 +77,9 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 47 km/h +- 1 | | a | b | ab,ab | 47 km/h +- 1 |
| b | a | ab | 59 km/h +- 1 | | b | a | ab,ab | 59 km/h +- 1 |
| b | c | bc | 59 km/h +- 1 | | b | c | bc,bc | 59 km/h +- 1 |
| c | b | bc | 47 km/h +- 1 | | c | b | bc,bc | 47 km/h +- 1 |

View File

@ -17,15 +17,15 @@ Feature: Car - Handle movable bridge
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | g | abc,cde,efg | 1,3,1 | | a | g | abc,cde,efg,efg | driving,movable bridge,driving,driving |
| b | f | abc,cde,efg | 1,3,1 | | b | f | abc,cde,efg,efg | driving,movable bridge,driving,driving |
| e | c | cde | 3 | | e | c | cde,cde | movable bridge,movable bridge |
| e | b | cde,abc | 3,1 | | e | b | cde,abc,abc | movable bridge,driving,driving |
| e | a | cde,abc | 3,1 | | e | a | cde,abc,abc | movable bridge,driving,driving |
| c | e | cde | 3 | | c | e | cde,cde | movable bridge,movable bridge |
| c | f | cde,efg | 3,1 | | c | f | cde,efg,efg | movable bridge,driving,driving |
| c | g | cde,efg | 3,1 | | c | g | cde,efg,efg | movable bridge,driving,driving |
Scenario: Car - Properly handle durations Scenario: Car - Properly handle durations
Given the node map Given the node map
@ -40,8 +40,8 @@ Feature: Car - Handle movable bridge
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | modes | speed | | from | to | route | modes | speed |
| a | g | abc,cde,efg | 1,3,1 | 7 km/h | | a | g | abc,cde,efg,efg | driving,movable bridge,driving,driving | 7 km/h |
| b | f | abc,cde,efg | 1,3,1 | 5 km/h | | b | f | abc,cde,efg,efg | driving,movable bridge,driving,driving | 5 km/h |
| c | e | cde | 3 | 2 km/h | | c | e | cde,cde | movable bridge,movable bridge | 2 km/h |
| e | c | cde | 3 | 2 km/h | | e | c | cde,cde | movable bridge,movable bridge | 2 km/h |

View File

@ -17,15 +17,15 @@ Feature: Car - Handle ferry routes
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | g | abc,cde,efg | 1,2,1 | | a | g | abc,cde,efg,efg | driving,ferry,driving,driving |
| b | f | abc,cde,efg | 1,2,1 | | b | f | abc,cde,efg,efg | driving,ferry,driving,driving |
| e | c | cde | 2 | | e | c | cde,cde | ferry,ferry |
| e | b | cde,abc | 2,1 | | e | b | cde,abc,abc | ferry,driving,driving |
| e | a | cde,abc | 2,1 | | e | a | cde,abc,abc | ferry,driving,driving |
| c | e | cde | 2 | | c | e | cde,cde | ferry,ferry |
| c | f | cde,efg | 2,1 | | c | f | cde,efg,efg | ferry,driving,driving |
| c | g | cde,efg | 2,1 | | c | g | cde,efg,efg | ferry,driving,driving |
Scenario: Car - Properly handle simple durations Scenario: Car - Properly handle simple durations
Given the node map Given the node map
@ -40,11 +40,11 @@ Feature: Car - Handle ferry routes
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | modes | speed | | from | to | route | modes | speed |
| a | g | abc,cde,efg | 1,2,1 | 25 km/h | | a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 25 km/h |
| b | f | abc,cde,efg | 1,2,1 | 20 km/h | | b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 20 km/h |
| c | e | cde | 2 | 12 km/h | | c | e | cde,cde | ferry,ferry | 12 km/h |
| e | c | cde | 2 | 12 km/h | | e | c | cde,cde | ferry,ferry | 12 km/h |
Scenario: Car - Properly handle ISO 8601 durations Scenario: Car - Properly handle ISO 8601 durations
Given the node map Given the node map
@ -59,8 +59,8 @@ Feature: Car - Handle ferry routes
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | modes | speed | | from | to | route | modes | speed |
| a | g | abc,cde,efg | 1,2,1 | 25 km/h | | a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 25 km/h |
| b | f | abc,cde,efg | 1,2,1 | 20 km/h | | b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 20 km/h |
| c | e | cde | 2 | 12 km/h | | c | e | cde,cde | ferry,ferry | 12 km/h |
| e | c | cde | 2 | 12 km/h | | e | c | cde,cde | ferry,ferry | 12 km/h |

View File

@ -24,9 +24,9 @@ Feature: Car - Speed on links
| dy | unclassified | | dy | unclassified |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,ae,ef,fd,dy | | x | y | xa,ae,ef,fd,dy,dy |
| b | c | bc | | b | c | bc,bc |
Scenario: Car - Use trunk_link when reasonable Scenario: Car - Use trunk_link when reasonable
Given the node map Given the node map
@ -44,9 +44,9 @@ Feature: Car - Speed on links
| fd | trunk | | fd | trunk |
| dy | unclassified | | dy | unclassified |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,ae,ef,fd,dy | | x | y | xa,ae,ef,fd,dy,dy |
| b | c | bc | | b | c | bc,bc |
Scenario: Car - Use primary_link when reasonable Scenario: Car - Use primary_link when reasonable
Given the node map Given the node map
@ -64,9 +64,9 @@ Feature: Car - Speed on links
| fd | primary | | fd | primary |
| dy | unclassified | | dy | unclassified |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,ae,ef,fd,dy | | x | y | xa,ae,ef,fd,dy,dy |
| b | c | bc | | b | c | bc,bc |
Scenario: Car - Use secondary_link when reasonable Scenario: Car - Use secondary_link when reasonable
Given the node map Given the node map
@ -85,9 +85,9 @@ Feature: Car - Speed on links
| dy | unclassified | | dy | unclassified |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,ae,ef,fd,dy | | x | y | xa,ae,ef,fd,dy,dy |
| b | c | bc | | b | c | bc,bc |
Scenario: Car - Use tertiary_link when reasonable Scenario: Car - Use tertiary_link when reasonable
Given the node map Given the node map
@ -106,6 +106,6 @@ Feature: Car - Speed on links
| dy | unclassified | | dy | unclassified |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,ae,ef,fd,dy | | x | y | xa,ae,ef,fd,dy,dy |
| b | c | bc | | b | c | bc,bc |

View File

@ -21,12 +21,12 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 78 km/h | | a | b | ab,ab | 79 km/h |
| b | c | bc | 59 km/h +- 1 | | b | c | bc,bc | 59 km/h +- 1 |
| c | d | cd | 51 km/h | | c | d | cd,cd | 51 km/h |
| d | e | de | 75 km/h | | d | e | de,de | 75 km/h |
| e | f | ef | 90 km/h | | e | f | ef,ef | 91 km/h |
| f | g | fg | 106 km/h | | f | g | fg,fg | 107 km/h |
Scenario: Car - Do not ignore maxspeed when higher than way speed Scenario: Car - Do not ignore maxspeed when higher than way speed
Given the node map Given the node map
@ -40,9 +40,9 @@ OSRM will use 4/5 of the projected free-flow speed.
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 31 km/h | | a | b | ab,ab | 31 km/h |
| b | c | bc | 83 km/h +- 1 | | b | c | bc,bc | 83 km/h +- 1 |
| c | d | cd | 51 km/h | | c | d | cd,cd | 51 km/h |
Scenario: Car - Forward/backward maxspeed Scenario: Car - Forward/backward maxspeed
Given a grid size of 100 meters Given a grid size of 100 meters

View File

@ -15,13 +15,13 @@ Feature: Car - Mode flag
| cd | primary | | | | cd | primary | | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | turns | modes |
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 | | a | d | ab,bc,cd,cd | depart,right,left,arrive | driving,ferry,driving,driving |
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 | | d | a | cd,bc,ab,ab | depart,right,left,arrive | driving,ferry,driving,driving |
| c | a | bc,ab | head,left,destination | 2,1 | | c | a | bc,ab,ab | depart,left,arrive | ferry,driving,driving |
| d | b | cd,bc | head,right,destination | 1,2 | | d | b | cd,bc,bc | depart,right,arrive | driving,ferry,ferry |
| a | c | ab,bc | head,right,destination | 1,2 | | a | c | ab,bc,bc | depart,right,arrive | driving,ferry,ferry |
| b | d | bc,cd | head,left,destination | 2,1 | | b | d | bc,cd,cd | depart,left,arrive | ferry,driving,driving |
Scenario: Car - Snapping when using a ferry Scenario: Car - Snapping when using a ferry
Given the node map Given the node map
@ -34,7 +34,7 @@ Feature: Car - Mode flag
| ef | primary | | | | ef | primary | | |
When I route I should get When I route I should get
| from | to | route | turns | modes | time | | from | to | route | turns | modes | time |
| c | d | bcde | head,destination | 2 | 600s | | c | d | bcde,bcde | depart,arrive | ferry,ferry | 600s |

View File

@ -15,8 +15,8 @@ Feature: Car - Street names in instructions
| bc | Your Way | A1 | | bc | Your Way | A1 |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | My Way,Your Way (A1) | | a | c | My Way,Your Way (A1),Your Way (A1) |
@todo @todo
Scenario: Car - Use way type to describe unnamed ways Scenario: Car - Use way type to describe unnamed ways
@ -29,5 +29,5 @@ Feature: Car - Street names in instructions
| bcd | residential | | | bcd | residential | |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | tertiary,residential | | a | c | tertiary,residential,residential |

View File

@ -44,9 +44,9 @@ Feature: Car - Oneway streets
| da | | | da | |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| b | a | bc,cd,da | | b | a | bc,cd,da,da |
Scenario: Car - Cars should not be affected by bicycle tags Scenario: Car - Cars should not be affected by bicycle tags
Then routability should be Then routability should be
@ -75,5 +75,5 @@ Feature: Car - Oneway streets
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | ab,bc | | a | c | ab,bc,bc |

View File

@ -25,10 +25,10 @@ Feature: Car - Turn restrictions
| restriction | sj | wj | j | no_left_turn | | restriction | sj | wj | j | no_left_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | | | s | w | |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Car - No straight on Scenario: Car - No straight on
@ -55,8 +55,8 @@ Feature: Car - Turn restrictions
| restriction | bj | jd | j | no_straight_on | | restriction | bj | jd | j | no_straight_on |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | e | av,vw,wx,xy,yz,ze | | a | e | av,vw,wx,xy,yz,ze,ze |
@no_turning @no_turning
Scenario: Car - No right turn Scenario: Car - No right turn
@ -77,10 +77,10 @@ Feature: Car - Turn restrictions
| restriction | sj | ej | j | no_right_turn | | restriction | sj | ej | j | no_right_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | | | s | e | |
@no_turning @no_turning
Scenario: Car - No u-turn Scenario: Car - No u-turn
@ -101,10 +101,10 @@ Feature: Car - Turn restrictions
| restriction | sj | wj | j | no_u_turn | | restriction | sj | wj | j | no_u_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | | | s | w | |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Car - Handle any no_* relation Scenario: Car - Handle any no_* relation
@ -125,10 +125,10 @@ Feature: Car - Turn restrictions
| restriction | sj | wj | j | no_weird_zigzags | | restriction | sj | wj | j | no_weird_zigzags |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | | | s | w | |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@only_turning @only_turning
Scenario: Car - Only left turn Scenario: Car - Only left turn
@ -149,10 +149,10 @@ Feature: Car - Turn restrictions
| restriction | sj | wj | j | only_left_turn | | restriction | sj | wj | j | only_left_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | | | s | n | |
| s | e | | | s | e | |
@only_turning @only_turning
Scenario: Car - Only right turn Scenario: Car - Only right turn
@ -173,10 +173,10 @@ Feature: Car - Turn restrictions
| restriction | sj | ej | j | only_right_turn | | restriction | sj | ej | j | only_right_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | | | s | w | |
| s | n | | | s | n | |
| s | e | sj,ej | | s | e | sj,ej,ej |
@only_turning @only_turning
Scenario: Car - Only straight on Scenario: Car - Only straight on
@ -197,10 +197,10 @@ Feature: Car - Turn restrictions
| restriction | sj | nj | j | only_straight_on | | restriction | sj | nj | j | only_straight_on |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | | | s | w | |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | | | s | e | |
@no_turning @no_turning
Scenario: Car - Handle any only_* restriction Scenario: Car - Handle any only_* restriction
@ -221,10 +221,10 @@ Feature: Car - Turn restrictions
| restriction | sj | nj | j | only_weird_zigzags | | restriction | sj | nj | j | only_weird_zigzags |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | | | s | w | |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | | | s | e | |
@specific @specific
Scenario: Car - :hgv-qualified on a standard turn restriction Scenario: Car - :hgv-qualified on a standard turn restriction
@ -245,10 +245,10 @@ Feature: Car - Turn restrictions
| restriction | sj | nj | j | no_straight_on | | restriction | sj | nj | j | no_straight_on |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@specific @specific
Scenario: Car - :motorcar-qualified on a standard turn restriction Scenario: Car - :motorcar-qualified on a standard turn restriction
@ -269,10 +269,10 @@ Feature: Car - Turn restrictions
| restriction | sj | nj | j | no_straight_on | | restriction | sj | nj | j | no_straight_on |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | | | s | n | |
| s | e | sj,ej | | s | e | sj,ej,ej |
@except @except
Scenario: Car - Except tag and on no_ restrictions Scenario: Car - Except tag and on no_ restrictions
@ -298,11 +298,11 @@ Feature: Car - Turn restrictions
| restriction | sj | dj | j | no_right_turn | motorcar | | restriction | sj | dj | j | no_right_turn | motorcar |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | a | sj,aj | | s | a | sj,aj,aj |
| s | b | | | s | b | |
| s | c | | | s | c | |
| s | d | sj,dj | | s | d | sj,dj,dj |
@except @except
Scenario: Car - Except tag and on only_ restrictions Scenario: Car - Except tag and on only_ restrictions
@ -322,9 +322,9 @@ Feature: Car - Turn restrictions
| restriction | sj | aj | j | only_straight_on | motorcar | | restriction | sj | aj | j | only_straight_on | motorcar |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | a | sj,aj | | s | a | sj,aj,aj |
| s | b | sj,bj | | s | b | sj,bj,bj |
@except @except
Scenario: Car - Several only_ restrictions at the same segment Scenario: Car - Several only_ restrictions at the same segment
@ -356,10 +356,10 @@ Feature: Car - Turn restrictions
| restriction | da | ae | a | only_right_turn | | restriction | da | ae | a | only_right_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| e | f | ae,xa,bx,fb | | e | f | ae,xa,bx,fb,fb |
| c | f | dc,da,ae,ge,hg,hg,ge,ae,xa,bx,fb | | c | f | dc,da,ae,ge,hg,hg,ge,ae,xa,bx,fb,fb |
| d | f | da,ae,ge,hg,hg,ge,ae,xa,bx,fb | | d | f | da,ae,ge,hg,hg,ge,ae,xa,bx,fb,fb |
@except @except
Scenario: Car - two only_ restrictions share same to-way Scenario: Car - two only_ restrictions share same to-way
@ -391,9 +391,9 @@ Feature: Car - Turn restrictions
| restriction | by | xy | y | only_straight_on | | restriction | by | xy | y | only_straight_on |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ax,xy,yb | | a | b | ax,xy,yb,yb |
| b | a | yb,xy,ax | | b | a | yb,xy,ax,ax |
@except @except
Scenario: Car - two only_ restrictions share same from-way Scenario: Car - two only_ restrictions share same from-way
@ -425,7 +425,7 @@ Feature: Car - Turn restrictions
| restriction | xy | yb | y | only_straight_on | | restriction | xy | yb | y | only_straight_on |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ax,xy,yb | | a | b | ax,xy,yb,yb |
| b | a | yb,xy,ax | | b | a | yb,xy,ax,ax |

View File

@ -21,10 +21,10 @@ Feature: Roundabout Instructions
| abcda | roundabout | | abcda | roundabout |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| s | t | sa,tb | head,enter_roundabout-1,destination | | s | t | sa,tb,tb | depart,roundabout-exit-1,arrive |
| s | u | sa,uc | head,enter_roundabout-2,destination | | s | u | sa,uc,uc | depart,roundabout-exit-2,arrive |
| s | v | sa,vd | head,enter_roundabout-3,destination | | s | v | sa,vd,vd | depart,roundabout-exit-3,arrive |
| u | v | uc,vd | head,enter_roundabout-1,destination | | u | v | uc,vd,vd | depart,roundabout-exit-1,arrive |
| u | s | uc,sa | head,enter_roundabout-2,destination | | u | s | uc,sa,sa | depart,roundabout-exit-2,arrive |
| u | t | uc,tb | head,enter_roundabout-3,destination | | u | t | uc,tb,tb | depart,roundabout-exit-3,arrive |

View File

@ -19,13 +19,13 @@ Feature: Car - Handle ferryshuttle train routes
| gh | primary | | no | | gh | primary | | no |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | f | abc,cde,ef | | a | f | abc,cde,ef,ef |
| b | f | abc,cde,ef | | b | f | abc,cde,ef,ef |
| e | c | cde | | e | c | cde,cde |
| e | b | cde,abc | | e | b | cde,abc,abc |
| e | a | cde,abc | | e | a | cde,abc,abc |
| c | e | cde | | c | e | cde,cde |
| c | f | cde,ef | | c | f | cde,ef,ef |
| f | g | | | f | g | |
| g | h | gh | | g | h | gh,gh |

View File

@ -36,12 +36,12 @@ Feature: Traffic - speeds
Given the extract extra arguments "--generate-edge-lookup" Given the extract extra arguments "--generate-edge-lookup"
Given the contract extra arguments "--segment-speed-file speeds.csv" Given the contract extra arguments "--segment-speed-file speeds.csv"
And I route I should get And I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 27 km/h | | a | b | ab,ab | 27 km/h |
| a | c | ab,bc | 27 km/h | | a | c | ab,bc,bc | 27 km/h |
| b | c | bc | 27 km/h | | b | c | bc,bc | 27 km/h |
| a | d | ad | 27 km/h | | a | d | ad,ad | 27 km/h |
| d | c | dc | 36 km/h | | d | c | dc,dc | 36 km/h |
| g | b | ab | 27 km/h | | g | b | ab,ab | 27 km/h |
| a | g | ab | 27 km/h | | a | g | ab,ab | 27 km/h |

View File

@ -17,15 +17,15 @@ Feature: Foot - Squares and other areas
| abcda | yes | residential | | abcda | yes | residential |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abcda | | a | b | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
| b | c | abcda | | b | c | abcda,abcda |
| c | b | abcda | | c | b | abcda,abcda |
| c | d | abcda | | c | d | abcda,abcda |
| d | c | abcda | | d | c | abcda,abcda |
| d | a | abcda | | d | a | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
@building @building
Scenario: Foot - Don't route on buildings Scenario: Foot - Don't route on buildings
@ -41,14 +41,14 @@ Feature: Foot - Squares and other areas
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | xa | | a | b | xa,xa |
| a | d | xa | | a | d | xa,xa |
| b | c | xa | | b | c | xa,xa |
| c | b | xa | | c | b | xa,xa |
| c | d | xa | | c | d | xa,xa |
| d | c | xa | | d | c | xa,xa |
| d | a | xa | | d | a | xa,xa |
| a | d | xa | | a | d | xa,xa |
@parking @parking
Scenario: Foot - parking areas Scenario: Foot - parking areas
@ -65,17 +65,17 @@ Feature: Foot - Squares and other areas
| abcda | (nil) | parking | | abcda | (nil) | parking |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,abcda,by | | x | y | xa,abcda,by,by |
| y | x | by,abcda,xa | | y | x | by,abcda,xa,xa |
| a | b | abcda | | a | b | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
| b | c | abcda | | b | c | abcda,abcda |
| c | b | abcda | | c | b | abcda,abcda |
| c | d | abcda | | c | d | abcda,abcda |
| d | c | abcda | | d | c | abcda,abcda |
| d | a | abcda | | d | a | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
@train @platform @train @platform
Scenario: Foot - railway platforms Scenario: Foot - railway platforms
@ -90,14 +90,14 @@ Feature: Foot - Squares and other areas
| abcda | (nil) | platform | | abcda | (nil) | platform |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,abcda,by | | x | y | xa,abcda,by,by |
| y | x | by,abcda,xa | | y | x | by,abcda,xa,xa |
| a | b | abcda | | a | b | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |
| b | c | abcda | | b | c | abcda,abcda |
| c | b | abcda | | c | b | abcda,abcda |
| c | d | abcda | | c | d | abcda,abcda |
| d | c | abcda | | d | c | abcda,abcda |
| d | a | abcda | | d | a | abcda,abcda |
| a | d | abcda | | a | d | abcda,abcda |

View File

@ -17,15 +17,15 @@ Feature: Foot - Handle ferry routes
| efg | primary | | | | efg | primary | | |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | g | abc,cde,efg | 1,2,1 | | a | g | abc,cde,efg,efg | walking,ferry,walking,walking |
| b | f | abc,cde,efg | 1,2,1 | | b | f | abc,cde,efg,efg | walking,ferry,walking,walking |
| e | c | cde | 2 | | e | c | cde,cde | ferry,ferry |
| e | b | cde,abc | 2,1 | | e | b | cde,abc,abc | ferry,walking,walking |
| e | a | cde,abc | 2,1 | | e | a | cde,abc,abc | ferry,walking,walking |
| c | e | cde | 2 | | c | e | cde,cde | ferry,ferry |
| c | f | cde,efg | 2,1 | | c | f | cde,efg,efg | ferry,walking,walking |
| c | g | cde,efg | 2,1 | | c | g | cde,efg,efg | ferry,walking,walking |
Scenario: Foot - Ferry duration, single node Scenario: Foot - Ferry duration, single node
Given the node map Given the node map
@ -58,6 +58,6 @@ Feature: Foot - Handle ferry routes
| abcd | | ferry | yes | 1:00 | | abcd | | ferry | yes | 1:00 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | d | abcd | 3600s +-10 | | a | d | abcd,abcd | 3600s +-10 |
| d | a | abcd | 3600s +-10 | | d | a | abcd,abcd | 3600s +-10 |

View File

@ -15,8 +15,8 @@ Feature: Foot - Street names in instructions
| bc | Your Way | | bc | Your Way |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | My Way,Your Way | | a | c | My Way,Your Way,Your Way |
@unnamed @unnamed
Scenario: Foot - Use way type to describe unnamed ways Scenario: Foot - Use way type to describe unnamed ways
@ -29,5 +29,5 @@ Feature: Foot - Street names in instructions
| bcd | track | | | bcd | track | |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | d | {highway:footway},{highway:track} | | a | d | {highway:footway},{highway:track},{highway:track} |

View File

@ -13,8 +13,8 @@ Feature: Foot - Way ref
| ab | Utopia Drive | E7 | | ab | Utopia Drive | E7 |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | Utopia Drive / E7 | | a | b | Utopia Drive / E7,Utopia Drive / E7 |
Scenario: Foot - Way with only ref Scenario: Foot - Way with only ref
Given the node map Given the node map
@ -26,7 +26,7 @@ Feature: Foot - Way ref
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | E7 | | a | b | E7,E7 |
Scenario: Foot - Way with only name Scenario: Foot - Way with only name
Given the node map Given the node map
@ -37,5 +37,5 @@ Feature: Foot - Way ref
| ab | Utopia Drive | | ab | Utopia Drive |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | Utopia Drive | | a | b | Utopia Drive,Utopia Drive |

View File

@ -24,10 +24,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | wj | j | no_left_turn | | restriction | sj | wj | j | no_left_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Foot - No right turn Scenario: Foot - No right turn
@ -48,10 +48,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | ej | j | no_right_turn | | restriction | sj | ej | j | no_right_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Foot - No u-turn Scenario: Foot - No u-turn
@ -72,10 +72,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | wj | j | no_u_turn | | restriction | sj | wj | j | no_u_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Foot - Handle any no_* relation Scenario: Foot - Handle any no_* relation
@ -96,10 +96,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | wj | j | no_weird_zigzags | | restriction | sj | wj | j | no_weird_zigzags |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@only_turning @only_turning
Scenario: Foot - Only left turn Scenario: Foot - Only left turn
@ -120,10 +120,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | wj | j | only_left_turn | | restriction | sj | wj | j | only_left_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@only_turning @only_turning
Scenario: Foot - Only right turn Scenario: Foot - Only right turn
@ -144,10 +144,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | ej | j | only_right_turn | | restriction | sj | ej | j | only_right_turn |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@only_turning @only_turning
Scenario: Foot - Only straight on Scenario: Foot - Only straight on
@ -168,10 +168,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | nj | j | only_straight_on | | restriction | sj | nj | j | only_straight_on |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@no_turning @no_turning
Scenario: Foot - Handle any only_* restriction Scenario: Foot - Handle any only_* restriction
@ -192,10 +192,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | nj | j | only_weird_zigzags | | restriction | sj | nj | j | only_weird_zigzags |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | w | sj,wj | | s | w | sj,wj,wj |
| s | n | sj,nj | | s | n | sj,nj,nj |
| s | e | sj,ej | | s | e | sj,ej,ej |
@except @except
Scenario: Foot - Except tag and on no_ restrictions Scenario: Foot - Except tag and on no_ restrictions
@ -221,11 +221,11 @@ Feature: Foot - Turn restrictions
| restriction | sj | dj | j | no_right_turn | foot | | restriction | sj | dj | j | no_right_turn | foot |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | a | sj,aj | | s | a | sj,aj,aj |
| s | b | sj,bj | | s | b | sj,bj,bj |
| s | c | sj,cj | | s | c | sj,cj,cj |
| s | d | sj,dj | | s | d | sj,dj,dj |
@except @except
Scenario: Foot - Except tag and on only_ restrictions Scenario: Foot - Except tag and on only_ restrictions
@ -245,9 +245,9 @@ Feature: Foot - Turn restrictions
| restriction | sj | aj | j | only_straight_on | foot | | restriction | sj | aj | j | only_straight_on | foot |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | a | sj,aj | | s | a | sj,aj,aj |
| s | b | sj,bj | | s | b | sj,bj,bj |
@except @except
Scenario: Foot - Multiple except tag values Scenario: Foot - Multiple except tag values
@ -279,10 +279,10 @@ Feature: Foot - Turn restrictions
| restriction | sj | jf | j | no_straight_on | foot, bus | | restriction | sj | jf | j | no_straight_on | foot, bus |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | a | sj,ja | | s | a | sj,ja,ja |
| s | b | sj,jb | | s | b | sj,jb,jb |
| s | c | sj,jc | | s | c | sj,jc,jc |
| s | d | sj,jd | | s | d | sj,jd,jd |
| s | e | sj,je | | s | e | sj,je,je |
| s | f | sj,jf | | s | f | sj,jf,jf |

View File

@ -3,12 +3,12 @@ Feature: Roundabout Instructions
Background: Background:
Given the profile "foot" Given the profile "foot"
@todo @todo
Scenario: Foot - Roundabout instructions Scenario: Foot - Roundabout instructions
# You can walk in both directions on a roundabout, bu the normal roundabout instructions don't # You can walk in both directions on a roundabout, bu the normal roundabout instructions don't
# make sense when you're going the opposite way around the roundabout. # make sense when you're going the opposite way around the roundabout.
Given the node map Given the node map
| | | v | | | | | | v | | |
| | | d | | | | | | d | | |
@ -25,10 +25,10 @@ Feature: Roundabout Instructions
| abcda | roundabout | | abcda | roundabout |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| s | t | sa,tb | head,enter_roundabout-1,destination | | s | t | sa,tb | depart,roundabout-exit-1,arrive |
| s | u | sa,uc | head,enter_roundabout-2,destination | | s | u | sa,uc | depart,roundabout-exit-2,arrive |
| s | v | sa,vd | head,enter_roundabout-3,destination | | s | v | sa,vd | depart,roundabout-exit-3,arrive |
| u | v | uc,vd | head,enter_roundabout-1,destination | | u | v | uc,vd | depart,roundabout-exit-1,arrive |
| u | s | uc,sa | head,enter_roundabout-2,destination | | u | s | uc,sa | depart,roundabout-exit-2,arrive |
| u | t | uc,tb | head,enter_roundabout-3,destination | | u | t | uc,tb | depart,roundabout-exit-3,arrive |

View File

@ -0,0 +1,202 @@
@routing @guidance
Feature: Basic Roundabout
Background:
Given the profile "testbot"
Given a grid size of 10 meters
Scenario: Ramp Exit Right
Given the node map
| a | b | c | d | e |
| | | | f | g |
And the ways
| nodes | highway |
| abcde | motorway |
| bfg | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| a,g | abcde, bfg, bfg | depart, ramp-slight-right, arrive |
Scenario: Ramp Exit Right Curved Right
Given the node map
| a | b | c | | |
| | | f | d | |
| | | | g | e |
And the ways
| nodes | highway |
| abcde | motorway |
| bfg | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| a,g | abcde, bfg, bfg | depart, ramp-slight-right, arrive |
Scenario: Ramp Exit Right Curved Left
Given the node map
| | | | | e |
| | | | d | g |
| a | b | c | f | |
And the ways
| nodes | highway |
| abcde | motorway |
| cfg | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| a,g | abcde, cfg, cfg | depart, ramp-slight-right, arrive |
Scenario: Ramp Exit Left
Given the node map
| | | | f | g |
| a | b | c | d | e |
And the ways
| nodes | highway |
| abcde | motorway |
| bfg | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| a,g | abcde, bfg, bfg | depart, ramp-slight-left, arrive |
Scenario: Ramp Exit Left Curved Left
Given the node map
| | | | g | e |
| | | f | d | |
| a | b | c | | |
And the ways
| nodes | highway |
| abcde | motorway |
| bfg | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| a,g | abcde, bfg, bfg | depart, ramp-slight-left, arrive |
Scenario: Ramp Exit Left Curved Right
Given the node map
| a | b | c | f | |
| | | | d | g |
| | | | | e |
And the ways
| nodes | highway |
| abcde | motorway |
| cfg | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| a,g | abcde, cfg, cfg | depart, ramp-slight-left, arrive |
Scenario: On Ramp Right
Given the node map
| a | b | c | d | e |
| f | g | | | |
And the ways
| nodes | highway |
| abcde | motorway |
| fgd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| f,e | abcde, fgd, fgd | depart, merge-slight-left, arrive |
Scenario: On Ramp Left
Given the node map
| f | g | | | |
| a | b | c | d | e |
And the ways
| nodes | highway |
| abcde | motorway |
| fgd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| f,e | abcde, fgd, fgd | depart, merge-slight-right, arrive |
Scenario: Highway Fork
Given the node map
| | | | | d | e |
| a | b | c | | | |
| | | | | f | g |
And the ways
| nodes | highway |
| abcde | motorway |
| cfg | motorway |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde, abcde | depart, fork-left, arrive |
| a,g | abcde, cfg, cfg | depart, fork-right, arrive |
Scenario: Fork After Ramp
Given the node map
| | | | | d | e |
| a | b | c | | | |
| | | | | f | g |
And the ways
| nodes | highway |
| abc | motorway_link |
| cde | motorway |
| cfg | motorway |
When I route I should get
| waypoints | route | turns |
| a,e | abc, cde, cde | depart, fork-left, arrive |
| a,g | abc, cfg, cfg | depart, fork-right, arrive |
Scenario: On And Off Ramp Right
Given the node map
| a | b | | c | | d | e |
| f | g | | | | h | i |
And the ways
| nodes | highway |
| abcde | motorway |
| fgc | motorway_link |
| chi | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| f,e | fgc, abcde, abcde | depart, merge-slight-left, arrive |
| a,i | abcde, chi, chi | depart, ramp-slight-right, arrive |
| f,i | fgc, chi, chi | depart, turn-slight-right, arrive |
Scenario: On And Off Ramp Left
Given the node map
| f | g | | | | h | i |
| a | b | | c | | d | e |
And the ways
| nodes | highway |
| abcde | motorway |
| fgc | motorway_link |
| chi | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,e | abcde, abcde | depart, arrive |
| f,e | fgc, abcde, abcde | depart, merge-slight-right, arrive |
| a,i | abcde, chi, chi | depart, ramp-slight-left, arrive |
| f,i | fgc, chi, chi | depart, turn-slight-left, arrive |

View File

@ -0,0 +1,173 @@
@routing @guidance
Feature: Basic Roundabout
Background:
Given the profile "testbot"
Given a grid size of 10 meters
Scenario: Enter and Exit
Given the node map
| | | a | | |
| | | b | | |
| h | g | | c | d |
| | | e | | |
| | | f | | |
And the ways
| nodes | junction |
| ab | |
| cd | |
| ef | |
| gh | |
| bcegb | roundabout |
When I route I should get
| waypoints | route | turns |
| a,d | ab,cd,cd | depart,roundabout-exit-1,arrive |
| a,f | ab,ef,ef | depart,roundabout-exit-2,arrive |
| a,h | ab,gh,gh | depart,roundabout-exit-3,arrive |
| d,f | cd,ef,ef | depart,roundabout-exit-1,arrive |
| d,h | cd,gh,gh | depart,roundabout-exit-2,arrive |
| d,a | cd,ab,ab | depart,roundabout-exit-3,arrive |
| f,h | ef,gh,gh | depart,roundabout-exit-1,arrive |
| f,a | ef,ab,ab | depart,roundabout-exit-2,arrive |
| f,d | ef,cd,cd | depart,roundabout-exit-3,arrive |
| h,a | gh,ab,ab | depart,roundabout-exit-1,arrive |
| h,d | gh,cd,cd | depart,roundabout-exit-2,arrive |
| h,f | gh,ef,ef | depart,roundabout-exit-3,arrive |
Scenario: Only Enter
Given the node map
| | | a | | |
| | | b | | |
| h | g | | c | d |
| | | e | | |
| | | f | | |
And the ways
| nodes | junction |
| ab | |
| cd | |
| ef | |
| gh | |
| bcegb | roundabout |
When I route I should get
| waypoints | route | turns |
| a,b | ab,ab | depart,arrive |
| a,c | ab,bcegb | depart,roundabout-enter,arrive |
| a,e | ab,bcegb | depart,roundabout-enter,arrive |
| a,g | ab,bcegb | depart,roundabout-enter,arrive |
| d,c | cd,cd | depart,arrive |
| d,e | cd,bcegb | depart,roundabout-enter,arrive |
| d,g | cd,bcegb | depart,roundabout-enter,arrive |
| d,b | cd,bcegb | depart,roundabout-enter,arrive |
| f,e | ef,ef | depart,arrive |
| f,g | ef,bcegb | depart,roundabout-enter,arrive |
| f,b | ef,bcegb | depart,roundabout-enter,arrive |
| f,c | ef,bcegb | depart,roundabout-enter,arrive |
| h,g | gh,gh | depart,arrive |
| h,b | gh,bcegb | depart,roundabout-enter,arrive |
| h,c | gh,bcegb | depart,roundabout-enter,arrive |
| h,e | gh,bcegb | depart,roundabout-enter,arrive |
Scenario: Only Exit
Given the node map
| | | a | | |
| | | b | | |
| h | g | | c | d |
| | | e | | |
| | | f | | |
And the ways
| nodes | junction |
| ab | |
| cd | |
| ef | |
| gh | |
| bcegb | roundabout |
When I route I should get
| waypoints | route | turns |
| b,a | ab,ab | depart,arrive |
| b,d | bcegb,cd,cd | depart,roundabout-exit-1,arrive |
| b,f | bcegb,ef,ef | depart,roundabout-exit-2,arrive |
| b,h | bcegb,gh,gh | depart,roundabout-exit-3,arrive |
| c,d | cd,cd | depart,arrive |
| c,f | bcegb,ef,ef | depart,roundabout-exit-1,arrive |
| c,h | bcegb,gh,gh | depart,roundabout-exit-2,arrive |
| c,a | bcegb,ab,ab | depart,roundabout-exit-3,arrive |
| e,f | ef,ef | depart,arrive |
| e,h | bcegb,gh,gh | depart,roundabout-exit-1,arrive |
| e,a | bcegb,ab,ab | depart,roundabout-exit-2,arrive |
| e,d | bcegb,cd,cd | depart,roundabout-exit-3,arrive |
| g,h | gh,gh | depart,arrive |
| g,a | bcegb,ab,ab | depart,roundabout-exit-1,arrive |
| g,d | bcegb,cd,cd | depart,roundabout-exit-2,arrive |
| g,f | bcegb,ef,ef | depart,roundabout-exit-3,arrive |
Scenario: Drive Around
Given the node map
| | | a | | |
| | | b | | |
| h | g | | c | d |
| | | e | | |
| | | f | | |
And the ways
| nodes | junction |
| ab | |
| cd | |
| ef | |
| gh | |
| bcegb | roundabout |
When I route I should get
| waypoints | route | turns |
| b,c | bcegb,bcegb | depart,arrive |
| b,e | bcegb,bcegb | depart,arrive |
| b,g | bcegb,bcegb | depart,arrive |
| c,e | bcegb,bcegb | depart,arrive |
| c,g | bcegb,bcegb | depart,arrive |
| c,b | bcegb,bcegb | depart,arrive |
| e,g | bcegb,bcegb | depart,arrive |
| e,b | bcegb,bcegb | depart,arrive |
| e,c | bcegb,bcegb | depart,arrive |
| g,b | bcegb,bcegb | depart,arrive |
| g,c | bcegb,bcegb | depart,arrive |
| g,e | bcegb,bcegb | depart,arrive |
Scenario: Mixed Entry and Exit
Given the node map
| | a | | c | |
| l | | b | | d |
| | k | | e | |
| j | | h | | f |
| | i | | g | |
And the ways
| nodes | junction | oneway |
| abc | | yes |
| def | | yes |
| ghi | | yes |
| jkl | | yes |
| behkb | roundabout | yes |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc,abc | depart,roundabout-exit-1,arrive |
| a,f | abc,def,def | depart,roundabout-exit-2,arrive |
| a,i | abc,ghi,ghi | depart,roundabout-exit-3,arrive |
| a,l | abc,jkl,jkl | depart,roundabout-exit-4,arrive |
| d,f | def,def,def | depart,roundabout-exit-1,arrive |
| d,i | def,ghi,ghi | depart,roundabout-exit-2,arrive |
| d,l | def,jkl,jkl | depart,roundabout-exit-3,arrive |
| d,c | def,abc,abc | depart,roundabout-exit-4,arrive |
| g,i | ghi,ghi,ghi | depart,roundabout-exit-1,arrive |
| g,l | ghi,jkl,jkl | depart,roundabout-exit-2,arrive |
| g,c | ghi,abc,abc | depart,roundabout-exit-3,arrive |
| g,f | ghi,edf,edf | depart,roundabout-exit-4,arrive |
| j,l | jkl,jkl,jkl | depart,roundabout-exit-1,arrive |
| j,c | jkl,abc,abc | depart,roundabout-exit-2,arrive |
| j,f | jkl,def,def | depart,roundabout-exit-3,arrive |
| j,i | jkl,ghi,ghi | depart,roundabout-exit-4,arrive |

View File

@ -13,13 +13,6 @@ Feature: osrm-routed command line options: help
And stdout should contain "--help" And stdout should contain "--help"
And stdout should contain "--trial" And stdout should contain "--trial"
And stdout should contain "Configuration:" And stdout should contain "Configuration:"
And stdout should contain "--hsgrdata arg"
And stdout should contain "--nodesdata arg"
And stdout should contain "--edgesdata arg"
And stdout should contain "--ramindex arg"
And stdout should contain "--fileindex arg"
And stdout should contain "--namesdata arg"
And stdout should contain "--timestamp arg"
And stdout should contain "--ip" And stdout should contain "--ip"
And stdout should contain "--port" And stdout should contain "--port"
And stdout should contain "--threads" And stdout should contain "--threads"
@ -39,13 +32,6 @@ Feature: osrm-routed command line options: help
And stdout should contain "--help" And stdout should contain "--help"
And stdout should contain "--trial" And stdout should contain "--trial"
And stdout should contain "Configuration:" And stdout should contain "Configuration:"
And stdout should contain "--hsgrdata arg"
And stdout should contain "--nodesdata arg"
And stdout should contain "--edgesdata arg"
And stdout should contain "--ramindex arg"
And stdout should contain "--fileindex arg"
And stdout should contain "--namesdata arg"
And stdout should contain "--timestamp arg"
And stdout should contain "--ip" And stdout should contain "--ip"
And stdout should contain "--port" And stdout should contain "--port"
And stdout should contain "--threads" And stdout should contain "--threads"
@ -65,13 +51,6 @@ Feature: osrm-routed command line options: help
And stdout should contain "--help" And stdout should contain "--help"
And stdout should contain "--trial" And stdout should contain "--trial"
And stdout should contain "Configuration:" And stdout should contain "Configuration:"
And stdout should contain "--hsgrdata arg"
And stdout should contain "--nodesdata arg"
And stdout should contain "--edgesdata arg"
And stdout should contain "--ramindex arg"
And stdout should contain "--fileindex arg"
And stdout should contain "--namesdata arg"
And stdout should contain "--timestamp arg"
And stdout should contain "--ip" And stdout should contain "--ip"
And stdout should contain "--port" And stdout should contain "--port"
And stdout should contain "--threads" And stdout should contain "--threads"

View File

@ -13,7 +13,6 @@ Feature: osrm-routed command line options: invalid options
Scenario: osrm-routed - Missing file Scenario: osrm-routed - Missing file
When I run "osrm-routed over-the-rainbow.osrm" When I run "osrm-routed over-the-rainbow.osrm"
Then stdout should contain "over-the-rainbow.osrm" Then stderr should contain "over-the-rainbow.osrm"
And stderr should contain "exception"
And stderr should contain "not found" And stderr should contain "not found"
And it should exit with code 1 And it should exit with code 1

View File

@ -35,12 +35,12 @@ Feature: Raster - weights
When I run "osrm-extract {osm_base}.osm -p {profile}" When I run "osrm-extract {osm_base}.osm -p {profile}"
And I run "osrm-contract {osm_base}.osm" And I run "osrm-contract {osm_base}.osm"
And I route I should get And I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 36 km/h | | a | b | ab,ab | 36 km/h |
| a | c | ab,bc | 36 km/h | | a | c | ab,bc,bc | 36 km/h |
| b | c | bc | 36 km/h | | b | c | bc,bc | 36 km/h |
| a | d | ad | 36 km/h | | a | d | ad,ad | 36 km/h |
| d | c | dc | 36 km/h | | d | c | dc,dc | 36 km/h |
Scenario: Weighting based on raster sources Scenario: Weighting based on raster sources
Given the profile "rasterbot" Given the profile "rasterbot"
@ -48,32 +48,32 @@ Feature: Raster - weights
Then stdout should contain "evaluating segment" Then stdout should contain "evaluating segment"
And I run "osrm-contract {osm_base}.osm" And I run "osrm-contract {osm_base}.osm"
And I route I should get And I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 8 km/h | | a | b | ab,ab | 8 km/h |
| a | c | ad,dc | 15 km/h | | a | c | ad,dc,dc | 15 km/h |
| b | c | bc | 8 km/h | | b | c | bc,bc | 8 km/h |
| a | d | ad | 15 km/h | | a | d | ad,ad | 15 km/h |
| d | c | dc | 15 km/h | | d | c | dc,dc | 15 km/h |
| d | e | de | 10 km/h | | d | e | de,de | 10 km/h |
| e | b | eb | 10 km/h | | e | b | eb,eb | 10 km/h |
| d | f | df | 15 km/h | | d | f | df,df | 15 km/h |
| f | b | fb | 7 km/h | | f | b | fb,fb | 7 km/h |
| d | b | de,eb | 10 km/h | | d | b | de,eb,eb | 10 km/h |
Scenario: Weighting based on raster sources Scenario: Weighting based on raster sources
Given the profile "rasterbot-interp" Given the profile "rasterbotinterp"
When I run "osrm-extract {osm_base}.osm -p {profile}" When I run "osrm-extract {osm_base}.osm -p {profile}"
Then stdout should contain "evaluating segment" Then stdout should contain "evaluating segment"
And I run "osrm-contract {osm_base}.osm" And I run "osrm-contract {osm_base}.osm"
And I route I should get And I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 8 km/h | | a | b | ab,ab | 8 km/h |
| a | c | ad,dc | 15 km/h | | a | c | ad,dc,dc | 15 km/h |
| b | c | bc | 8 km/h | | b | c | bc,bc | 8 km/h |
| a | d | ad | 15 km/h | | a | d | ad,ad | 15 km/h |
| d | c | dc | 15 km/h | | d | c | dc,dc | 15 km/h |
| d | e | de | 10 km/h | | d | e | de,de | 10 km/h |
| e | b | eb | 10 km/h | | e | b | eb,eb | 10 km/h |
| d | f | df | 15 km/h | | d | f | df,df | 15 km/h |
| f | b | fb | 7 km/h | | f | b | fb,fb | 7 km/h |
| d | b | de,eb | 10 km/h | | d | b | de,eb,eb | 10 km/h |

View File

@ -43,14 +43,13 @@ module.exports = function () {
if (err) return callback(err); if (err) return callback(err);
if (!response.body.length) return callback(new Error('Invalid response body')); if (!response.body.length) return callback(new Error('Invalid response body'));
var jsonResult = JSON.parse(response.body), var json = JSON.parse(response.body);
result = jsonResult['distance_table'].map((row) => {
var hashes = {}; var result = json['durations'].map(row => {
row.forEach((c, j) => { var hashes = {};
hashes[tableRows[0][j+1]] = c; row.forEach((v, i) => { hashes[tableRows[0][i+1]] = isNaN(parseInt(v)) ? '' : v; });
}); return hashes;
return hashes; });
});
var testRow = (row, ri, cb) => { var testRow = (row, ri, cb) => {
var ok = true; var ok = true;

View File

@ -5,7 +5,7 @@ module.exports = function () {
this.scenarioTitle = scenario.getName(); this.scenarioTitle = scenario.getName();
this.loadMethod = this.DEFAULT_LOAD_METHOD; this.loadMethod = this.DEFAULT_LOAD_METHOD;
this.queryParams = []; this.queryParams = {};
var d = new Date(); var d = new Date();
this.scenarioTime = util.format('%d-%d-%dT%s:%s:%sZ', d.getFullYear(), d.getMonth()+1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds()); this.scenarioTime = util.format('%d-%d-%dT%s:%s:%sZ', d.getFullYear(), d.getMonth()+1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds());
this.resetData(); this.resetData();

View File

@ -47,12 +47,12 @@ module.exports = function () {
if (headers.has('route')) { if (headers.has('route')) {
if (json.matchings.length != 1) throw new Error('*** Checking route only supported for matchings with one subtrace'); if (json.matchings.length != 1) throw new Error('*** Checking route only supported for matchings with one subtrace');
route = this.wayList(json.matchings[0].instructions); route = this.wayList(json.matchings[0]);
} }
if (headers.has('duration')) { if (headers.has('duration')) {
if (json.matchings.length != 1) throw new Error('*** Checking duration only supported for matchings with one subtrace'); if (json.matchings.length != 1) throw new Error('*** Checking duration only supported for matchings with one subtrace');
duration = json.matchings[0].route_summary.total_time; duration = json.matchings[0].duration;
} }
} }
@ -158,7 +158,7 @@ module.exports = function () {
trace.push(node); trace.push(node);
} }
if (row.timestamps) { if (row.timestamps) {
timestamps = row.timestamps.split(' ').filter(s => !!s).map(t => parseInt(t)); timestamps = row.timestamps.split(' ').filter(s => !!s).map(t => parseInt(t, 10));
} }
got.trace = row.trace; got.trace = row.trace;
this.requestMatching(trace, timestamps, params, afterRequest); this.requestMatching(trace, timestamps, params, afterRequest);

View File

@ -17,7 +17,7 @@ module.exports = function () {
if (response.statusCode === 200 && response.body.length) { if (response.statusCode === 200 && response.body.length) {
var json = JSON.parse(response.body); var json = JSON.parse(response.body);
coord = json.mapped_coordinate; coord = json.waypoints[0].location;
var got = { in: row.in, out: row.out }; var got = { in: row.in, out: row.out };

View File

@ -60,8 +60,8 @@ module.exports = function () {
}); });
this.Given(/^the query options$/, (table, callback) => { this.Given(/^the query options$/, (table, callback) => {
table.raw().forEach((tuple) => { table.raw().forEach(tuple => {
this.queryParams.push(tuple); this.queryParams[tuple[0]] = tuple[1];
}); });
callback(); callback();

View File

@ -3,7 +3,7 @@ var assert = require('assert');
module.exports = function () { module.exports = function () {
this.When(/^I request \/(.*)$/, (path, callback) => { this.When(/^I request \/(.*)$/, (path, callback) => {
this.reprocessAndLoadData(() => { this.reprocessAndLoadData(() => {
this.requestPath(path, [], (err, res, body) => { this.requestPath(path, {}, (err, res, body) => {
this.response = res; this.response = res;
callback(err, res, body); callback(err, res, body);
}); });

View File

@ -5,18 +5,20 @@ var classes = require('../support/data_classes');
module.exports = function () { module.exports = function () {
this.Then(/^routability should be$/, (table, callback) => { this.Then(/^routability should be$/, (table, callback) => {
this.buildWaysFromTable(table, () => { this.buildWaysFromTable(table, () => {
var directions = ['forw','backw','bothw']; var directions = ['forw','backw','bothw'],
headers = new Set(Object.keys(table.hashes()[0]));
if (!directions.some(k => !!table.hashes()[0].hasOwnProperty(k))) { if (!directions.some(k => !!headers.has(k))) {
throw new Error('*** routability table must contain either "forw", "backw" or "bothw" column'); throw new Error('*** routability table must contain either "forw", "backw" or "bothw" column');
} }
this.reprocessAndLoadData(() => { this.reprocessAndLoadData(() => {
var testRow = (row, i, cb) => { var testRow = (row, i, cb) => {
var outputRow = row; var outputRow = row;
testRoutabilityRow(i, (err, result) => { testRoutabilityRow(i, (err, result) => {
if (err) return cb(err); if (err) return cb(err);
directions.filter(d => !!table.hashes()[0][d]).forEach((direction) => { directions.filter(d => headers.has(d)).forEach((direction) => {
var want = this.shortcutsHash[row[direction]] || row[direction]; var want = this.shortcutsHash[row[direction]] || row[direction];
switch (true) { switch (true) {
@ -66,13 +68,13 @@ module.exports = function () {
r.query = this.query; r.query = this.query;
r.json = JSON.parse(body); r.json = JSON.parse(body);
r.status = r.json.status === 200 ? 'x' : null; r.status = res.statusCode === 200 ? 'x' : null;
if (r.status) { if (r.status) {
r.route = this.wayList(r.json.route_instructions); r.route = this.wayList(r.json.routes[0]);
if (r.route === util.format('w%d', i)) { if (r.route.split(',')[0] === util.format('w%d', i)) {
r.time = r.json.route_summary.total_time; r.time = r.json.routes[0].duration;
r.distance = r.json.route_summary.total_distance; r.distance = r.json.routes[0].distance;
r.speed = r.time > 0 ? parseInt(3.6 * r.distance / r.time) : null; r.speed = r.time > 0 ? parseInt(3.6 * r.distance / r.time) : null;
} else { } else {
r.status = null; r.status = null;
@ -83,7 +85,7 @@ module.exports = function () {
}); });
}; };
d3.queue() d3.queue(1)
.defer(testDirection, 'forw') .defer(testDirection, 'forw')
.defer(testDirection, 'backw') .defer(testDirection, 'backw')
.awaitAll((err, res) => { .awaitAll((err, res) => {
@ -96,15 +98,23 @@ module.exports = function () {
}); });
result.bothw = {}; result.bothw = {};
['status', 'time', 'distance', 'speed'].forEach((key) => {
var sq = d3.queue();
var parseRes = (key, scb) => {
if (result.forw[key] === result.backw[key]) { if (result.forw[key] === result.backw[key]) {
result.bothw[key] = result.forw[key]; result.bothw[key] = result.forw[key];
} else { } else {
result.bothw[key] = 'diff'; result.bothw[key] = 'diff';
} }
scb();
};
['status', 'time', 'distance', 'speed'].forEach((key) => {
sq.defer(parseRes, key);
}); });
cb(null, result); sq.awaitAll(() => { cb(null, result); });
}); });
}; };
}; };

View File

@ -44,7 +44,12 @@ module.exports = function () {
var subTrips; var subTrips;
if (res.statusCode === 200) { if (res.statusCode === 200) {
if (headers.has('trips')) { if (headers.has('trips')) {
subTrips = json.trips.filter(t => !!t).map(sub => sub.via_points); subTrips = json.trips.filter(t => !!t).map(t => t.legs).map(tl => Array.prototype.concat.apply([], tl.map((sl, i) => {
var toAdd = [];
if (i === 0) toAdd.push(sl.steps[0].maneuver.location);
toAdd.push(sl.steps[sl.steps.length-1].maneuver.location);
return toAdd;
})));
} }
} }

View File

@ -2,6 +2,11 @@
var builder = require('xmlbuilder'); var builder = require('xmlbuilder');
var ensureDecimal = (i) => {
if (parseInt(i) === i) return i.toFixed(1);
else return i;
};
class DB { class DB {
constructor () { constructor () {
this.nodes = new Array(); this.nodes = new Array();
@ -39,8 +44,8 @@ class DB {
uid: n.OSM_UID, uid: n.OSM_UID,
user: n.OSM_USER, user: n.OSM_USER,
timestamp: n.OSM_TIMESTAMP, timestamp: n.OSM_TIMESTAMP,
lon: n.lon, lon: ensureDecimal(n.lon),
lat: n.lat lat: ensureDecimal(n.lat)
}); });
for (var k in n.tags) { for (var k in n.tags) {

View File

@ -94,13 +94,13 @@ module.exports = function () {
q.awaitAll(callback); q.awaitAll(callback);
}; };
var ensureDecimal = (i) => { this.ensureDecimal = (i) => {
if (parseInt(i) === i) return i.toFixed(1); if (parseInt(i) === i) return i.toFixed(1);
else return i; else return i;
}; };
this.tableCoordToLonLat = (ci, ri) => { this.tableCoordToLonLat = (ci, ri) => {
return [this.origin[0] + ci * this.zoom, this.origin[1] - ri * this.zoom].map(ensureDecimal); return [this.origin[0] + ci * this.zoom, this.origin[1] - ri * this.zoom].map(this.ensureDecimal);
}; };
this.addOSMNode = (name, lon, lat, id) => { this.addOSMNode = (name, lon, lat, id) => {
@ -151,7 +151,6 @@ module.exports = function () {
}; };
this.writeOSM = (callback) => { this.writeOSM = (callback) => {
fs.exists(this.DATA_FOLDER, (exists) => { fs.exists(this.DATA_FOLDER, (exists) => {
var mkDirFn = exists ? (cb) => { cb(); } : fs.mkdir.bind(fs.mkdir, this.DATA_FOLDER); var mkDirFn = exists ? (cb) => { cb(); } : fs.mkdir.bind(fs.mkdir, this.DATA_FOLDER);
mkDirFn((err) => { mkDirFn((err) => {
@ -202,6 +201,7 @@ module.exports = function () {
exec(cmd, (err) => { exec(cmd, (err) => {
if (err) { if (err) {
this.log(util.format('*** Exited with code %d', err.code), 'preprocess'); this.log(util.format('*** Exited with code %d', err.code), 'preprocess');
process.chdir('../');
return callback(this.ExtractError(err.code, util.format('osrm-extract exited with code %d', err.code))); return callback(this.ExtractError(err.code, util.format('osrm-extract exited with code %d', err.code)));
} }
@ -222,7 +222,7 @@ module.exports = function () {
}); });
}; };
['osrm','osrm.names','osrm.restrictions','osrm.ebg','osrm.enw','osrm.edges','osrm.fileIndex','osrm.geometry','osrm.nodes','osrm.ramIndex'].forEach(file => { ['osrm','osrm.names','osrm.restrictions','osrm.ebg','osrm.enw','osrm.edges','osrm.fileIndex','osrm.geometry','osrm.nodes','osrm.ramIndex','osrm.properties'].forEach(file => {
q.defer(rename, file); q.defer(rename, file);
}); });
@ -248,6 +248,7 @@ module.exports = function () {
exec(cmd, (err) => { exec(cmd, (err) => {
if (err) { if (err) {
this.log(util.format('*** Exited with code %d', err.code), 'preprocess'); this.log(util.format('*** Exited with code %d', err.code), 'preprocess');
process.chdir('../');
return callback(this.ContractError(err.code, util.format('osrm-contract exited with code %d', err.code))); return callback(this.ContractError(err.code, util.format('osrm-contract exited with code %d', err.code)));
} }
@ -272,11 +273,11 @@ module.exports = function () {
var q = d3.queue(); var q = d3.queue();
['osrm.hsgr','osrm.fileIndex','osrm.geometry','osrm.nodes','osrm.ramIndex','osrm.core','osrm.edges'].forEach((file) => { ['osrm.hsgr','osrm.fileIndex','osrm.geometry','osrm.nodes','osrm.ramIndex','osrm.core','osrm.edges','osrm.datasource_indexes','osrm.datasource_names','osrm.level'].forEach((file) => {
q.defer(rename, file); q.defer(rename, file);
}); });
['osrm.names','osrm.restrictions','osrm'].forEach((file) => { ['osrm.names','osrm.restrictions','osrm.properties','osrm'].forEach((file) => {
q.defer(copy, file); q.defer(copy, file);
}); });
@ -329,7 +330,7 @@ module.exports = function () {
this.processRowsAndDiff = (table, fn, callback) => { this.processRowsAndDiff = (table, fn, callback) => {
var q = d3.queue(1); var q = d3.queue(1);
table.hashes().forEach((row, i) => q.defer(fn, row, i)); table.hashes().forEach((row, i) => { q.defer(fn, row, i); });
q.awaitAll((err, actual) => { q.awaitAll((err, actual) => {
if (err) return callback(err); if (err) return callback(err);

View File

@ -78,8 +78,8 @@ module.exports = {
} }
matchLocation (got, want) { matchLocation (got, want) {
return this.match(got[0], util.format('%d ~0.0025%', want.lat)) && return this.match(got[0], util.format('%d ~0.0025%', want.lon)) &&
this.match(got[1], util.format('%d ~0.0025%', want.lon)); this.match(got[1], util.format('%d ~0.0025%', want.lat));
} }
} }
}; };

View File

@ -1,7 +1,9 @@
'use strict'; 'use strict';
var util = require('util'); var util = require('util');
var path = require('path');
var fs = require('fs'); var fs = require('fs');
var chalk = require('chalk');
var OSRMError = class extends Error { var OSRMError = class extends Error {
constructor (process, code, msg, log, lines) { constructor (process, code, msg, log, lines) {
@ -17,18 +19,18 @@ var OSRMError = class extends Error {
this.logTail(this.log, this.lines, callback); this.logTail(this.log, this.lines, callback);
} }
toString (callback) { // toString (callback) {
this.extract((tail) => { // this.extract((tail) => {
callback(util.format('*** %s\nLast %s from %s:\n%s\n', this.msg, this.lines, this.log, tail)); // callback(util.format('*** %s\nLast %s from %s:\n%s\n', this.msg, this.lines, this.log, tail));
}); // });
} // }
logTail (path, n, callback) { logTail (logPath, n, callback) {
var expanded = path.resolve(this.TEST_FOLDER, path); var expanded = path.resolve(this.TEST_FOLDER, logPath);
fs.exists(expanded, (exists) => { fs.exists(expanded, (exists) => {
if (exists) { if (exists) {
fs.readFile(expanded, (err, data) => { fs.readFile(expanded, (err, data) => {
var lines = data.trim().split('\n'); var lines = data.toString().trim().split('\n');
callback(lines callback(lines
.slice(lines.length - n) .slice(lines.length - n)
.map(line => util.format(' %s', line)) .map(line => util.format(' %s', line))
@ -100,8 +102,8 @@ module.exports = {
if (rowError) { if (rowError) {
bad++; bad++;
this.diff.push(Object.assign({}, row, {status: 'undefined'})); this.diff.push(Object.assign({}, row, {c_status: 'undefined'}));
this.diff.push(Object.assign({}, actual[i], {status: 'comment'})); this.diff.push(Object.assign({}, actual[i], {c_status: 'comment'}));
} else { } else {
good++; good++;
this.diff.push(row); this.diff.push(row);
@ -117,9 +119,9 @@ module.exports = {
this.diff.forEach((row) => { this.diff.forEach((row) => {
var rowString = '| '; var rowString = '| ';
this.headers.forEach((header) => { this.headers.forEach((header) => {
if (!row.status) rowString += ' ' + row[header] + ' | '; if (!row.c_status) rowString += chalk.green(' ' + row[header] + ' | ');
else if (row.status === 'undefined') rowString += '(-) ' + row[header] + ' | '; else if (row.c_status === 'undefined') rowString += chalk.yellow('(-) ' + row[header] + ' | ');
else rowString += '(+) ' + row[header] + ' | '; else rowString += chalk.red('(+) ' + row[header] + ' | ');
}); });
s.push(rowString); s.push(rowString);
}); });

View File

@ -12,7 +12,7 @@ module.exports = function () {
this.scenarioTitle = scenario.getName(); this.scenarioTitle = scenario.getName();
this.loadMethod = this.DEFAULT_LOAD_METHOD; this.loadMethod = this.DEFAULT_LOAD_METHOD;
this.queryParams = []; this.queryParams = {};
var d = new Date(); var d = new Date();
this.scenarioTime = util.format('%d-%d-%dT%s:%s:%sZ', d.getFullYear(), d.getMonth()+1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds()); this.scenarioTime = util.format('%d-%d-%dT%s:%s:%sZ', d.getFullYear(), d.getMonth()+1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds());
this.resetData(); this.resetData();

View File

@ -2,11 +2,21 @@ var Timeout = require('node-timeout');
var request = require('request'); var request = require('request');
module.exports = function () { module.exports = function () {
// Converts an array [["param","val1"], ["param","val2"]] into param=val1&param=val2
this.paramsToString = (params) => { this.paramsToString = (params) => {
var kvPairs = params.map((kv) => kv[0].toString() + '=' + kv[1].toString()); var paramString = '';
var url = kvPairs.length ? kvPairs.join('&') : ''; if (params.coordinates !== undefined) {
return url.trim(); // FIXME this disables passing the output if its a default
// Remove after #2173 is fixed.
var outputString = (params.output && params.output !== 'json') ? ('.' + params.output) : '';
paramString = params.coordinates.join(';') + outputString;
delete params.coordinates;
delete params.output;
}
if (Object.keys(params).length) {
paramString += '?' + Object.keys(params).map(k => k + '=' + params[k]).join('&');
}
return paramString;
}; };
this.sendRequest = (baseUri, parameters, callback) => { this.sendRequest = (baseUri, parameters, callback) => {
@ -14,16 +24,9 @@ module.exports = function () {
var runRequest = (cb) => { var runRequest = (cb) => {
var params = this.paramsToString(parameters); var params = this.paramsToString(parameters);
this.query = baseUri + (params.length ? '/' + params : '');
this.query = baseUri + (params.length ? '?' + params : ''); request(this.query, (err, res, body) => {
var options = this.httpMethod === 'POST' ? {
method: 'POST',
body: params,
url: baseUri
} : this.query;
request(options, (err, res, body) => {
if (err && err.code === 'ECONNREFUSED') { if (err && err.code === 'ECONNREFUSED') {
throw new Error('*** osrm-routed is not running.'); throw new Error('*** osrm-routed is not running.');
} else if (err && err.statusCode === 408) { } else if (err && err.statusCode === 408) {
@ -41,6 +44,7 @@ module.exports = function () {
else if (err.code === 'ECONNREFUSED') else if (err.code === 'ECONNREFUSED')
return callback(this.RoutedError('*** osrm-routed is not running')); return callback(this.RoutedError('*** osrm-routed is not running'));
} }
//console.log(body+"\n");
return callback(err, res, body); return callback(err, res, body);
})); }));
}; };

View File

@ -20,7 +20,7 @@ var OSRMBaseLoader = class {
}); });
}; };
runLaunch(limit((e) => { if (e) callback(e); callback(); })); runLaunch(limit((e) => { if (e) callback(e); else callback(); }));
} }
shutdown (callback) { shutdown (callback) {
@ -30,7 +30,7 @@ var OSRMBaseLoader = class {
this.osrmDown(cb); this.osrmDown(cb);
}; };
runShutdown(limit((e) => { if (e) callback(e); callback(); })); runShutdown(limit((e) => { if (e) callback(e); else callback(); }));
} }
osrmIsRunning () { osrmIsRunning () {
@ -62,7 +62,7 @@ var OSRMBaseLoader = class {
waitForShutdown (callback) { waitForShutdown (callback) {
var check = () => { var check = () => {
if (!this.osrmIsRunning()) callback(); if (!this.osrmIsRunning()) return callback();
}; };
setTimeout(check, 100); setTimeout(check, 100);
} }
@ -86,7 +86,7 @@ var OSRMDirectLoader = class extends OSRMBaseLoader {
fs.appendFile(this.scope.OSRM_ROUTED_LOG_FILE, data, (err) => { if (err) throw err; }); fs.appendFile(this.scope.OSRM_ROUTED_LOG_FILE, data, (err) => { if (err) throw err; });
}; };
var child = spawn(util.format('%s%s/osrm-routed', this.scope.LOAD_LIBRARIES, this.scope.BIN_PATH), [this.inputFile, util.format('-p%d', this.scope.OSRM_PORT)], {detached: true}); var child = spawn(util.format('%s%s/osrm-routed', this.scope.LOAD_LIBRARIES, this.scope.BIN_PATH), [this.inputFile, util.format('-p%d', this.scope.OSRM_PORT)]);
this.scope.pid = child.pid; this.scope.pid = child.pid;
child.stdout.on('data', writeToLog); child.stdout.on('data', writeToLog);
child.stderr.on('data', writeToLog); child.stderr.on('data', writeToLog);
@ -111,7 +111,7 @@ var OSRMDatastoreLoader = class extends OSRMBaseLoader {
loadData (callback) { loadData (callback) {
this.scope.runBin('osrm-datastore', this.inputFile, (err) => { this.scope.runBin('osrm-datastore', this.inputFile, (err) => {
if (err) return callback(new this.LaunchError(this.exitCode, 'datastore', err)); if (err) return callback(this.scope.LaunchError(this.exitCode, 'datastore', err));
callback(); callback();
}); });
} }
@ -122,7 +122,7 @@ var OSRMDatastoreLoader = class extends OSRMBaseLoader {
fs.appendFile(this.scope.OSRM_ROUTED_LOG_FILE, data, (err) => { if (err) throw err; }); fs.appendFile(this.scope.OSRM_ROUTED_LOG_FILE, data, (err) => { if (err) throw err; });
}; };
var child = spawn(util.format('%s%s/osrm-routed', this.scope.LOAD_LIBRARIES, this.scope.BIN_PATH), ['--shared-memory=1', util.format('-p%d', this.scope.OSRM_PORT)], {detached: true}); var child = spawn(util.format('%s%s/osrm-routed', this.scope.LOAD_LIBRARIES, this.scope.BIN_PATH), ['--shared-memory=1', util.format('-p%d', this.scope.OSRM_PORT)]);
this.child = child; this.child = child;
this.scope.pid = child.pid; this.scope.pid = child.pid;
child.stdout.on('data', writeToLog); child.stdout.on('data', writeToLog);

View File

@ -3,7 +3,13 @@ var request = require('request');
module.exports = function () { module.exports = function () {
this.requestPath = (service, params, callback) => { this.requestPath = (service, params, callback) => {
var uri = [this.HOST, service].join('/'); var uri;
if (service == 'timestamp') {
uri = [this.HOST, service].join('/');
} else {
uri = [this.HOST, service, 'v1', this.profile].join('/');
}
return this.sendRequest(uri, params, callback); return this.sendRequest(uri, params, callback);
}; };
@ -28,133 +34,133 @@ module.exports = function () {
// Overwrites the default values in defaults // Overwrites the default values in defaults
// e.g. [[a, 1], [b, 2]], [[a, 5], [d, 10]] => [[a, 5], [b, 2], [d, 10]] // e.g. [[a, 1], [b, 2]], [[a, 5], [d, 10]] => [[a, 5], [b, 2], [d, 10]]
this.overwriteParams = (defaults, other) => { this.overwriteParams = (defaults, other) => {
var merged = {}; var otherMap = {};
var overwrite = (o) => { for (var key in other) otherMap[key] = other[key];
merged[o[0]] = o[1]; return Object.assign({}, defaults, otherMap);
};
defaults.forEach(overwrite);
other.forEach(overwrite);
return Object.keys(merged).map((key) => [key, merged[key]]);
}; };
var encodeWaypoints = (waypoints) => { var encodeWaypoints = (waypoints) => {
return waypoints.map(w => ['loc', [w.lat, w.lon].join(',')]); return waypoints.map(w => [w.lon, w.lat].map(this.ensureDecimal).join(','));
}; };
this.requestRoute = (waypoints, bearings, userParams, callback) => { this.requestRoute = (waypoints, bearings, userParams, callback) => {
if (bearings.length && bearings.length !== waypoints.length) throw new Error('*** number of bearings does not equal the number of waypoints'); if (bearings.length && bearings.length !== waypoints.length) throw new Error('*** number of bearings does not equal the number of waypoints');
var defaults = [['output','json'], ['instructions','true'], ['alt',false]], var defaults = {
output: 'json',
steps: 'true',
alternatives: 'false'
},
params = this.overwriteParams(defaults, userParams), params = this.overwriteParams(defaults, userParams),
encodedWaypoints = encodeWaypoints(waypoints); encodedWaypoints = encodeWaypoints(waypoints);
params.coordinates = encodedWaypoints;
if (bearings.length) { if (bearings.length) {
var encodedBearings = bearings.map(b => ['b', b.toString()]); params.bearings = bearings.map(b => {
params = Array.prototype.concat.apply(params, encodedWaypoints.map((o, i) => [o, encodedBearings[i]])); var bs = b.split(',');
} else { if (bs.length === 2) return b;
params = params.concat(encodedWaypoints); else return b += ',10';
}).join(';');
} }
return this.requestPath('viaroute', params, callback); return this.requestPath('route', params, callback);
}; };
this.requestNearest = (node, userParams, callback) => { this.requestNearest = (node, userParams, callback) => {
var defaults = [['output', 'json']], var defaults = {
output: 'json'
},
params = this.overwriteParams(defaults, userParams); params = this.overwriteParams(defaults, userParams);
params.push(['loc', [node.lat, node.lon].join(',')]); params.coordinates = [[node.lon, node.lat].join(',')];
return this.requestPath('nearest', params, callback); return this.requestPath('nearest', params, callback);
}; };
this.requestTable = (waypoints, userParams, callback) => { this.requestTable = (waypoints, userParams, callback) => {
var defaults = [['output', 'json']], var defaults = {
output: 'json'
},
params = this.overwriteParams(defaults, userParams); params = this.overwriteParams(defaults, userParams);
params = params.concat(waypoints.map(w => [w.type, [w.coord.lat, w.coord.lon].join(',')]));
params.coordinates = waypoints.map(w => [w.coord.lon, w.coord.lat].join(','));
var srcs = waypoints.map((w, i) => [w.type, i]).filter(w => w[0] === 'src').map(w => w[1]),
dsts = waypoints.map((w, i) => [w.type, i]).filter(w => w[0] === 'dst').map(w => w[1]);
if (srcs.length) params.sources = srcs.join(';');
if (dsts.length) params.destinations = dsts.join(';');
return this.requestPath('table', params, callback); return this.requestPath('table', params, callback);
}; };
this.requestTrip = (waypoints, userParams, callback) => { this.requestTrip = (waypoints, userParams, callback) => {
var defaults = [['output', 'json']], var defaults = {
output: 'json'
},
params = this.overwriteParams(defaults, userParams); params = this.overwriteParams(defaults, userParams);
params = params.concat(encodeWaypoints(waypoints));
params.coordinates = encodeWaypoints(waypoints);
return this.requestPath('trip', params, callback); return this.requestPath('trip', params, callback);
}; };
this.requestMatching = (waypoints, timestamps, userParams, callback) => { this.requestMatching = (waypoints, timestamps, userParams, callback) => {
var defaults = [['output', 'json']], var defaults = {
output: 'json'
},
params = this.overwriteParams(defaults, userParams); params = this.overwriteParams(defaults, userParams);
var encodedWaypoints = encodeWaypoints(waypoints);
params.coordinates = encodeWaypoints(waypoints);
if (timestamps.length) { if (timestamps.length) {
var encodedTimestamps = timestamps.map(t => ['t', t.toString()]); params.timestamps = timestamps.join(';');
params = Array.prototype.concat.apply(params, encodedWaypoints.map((o, i) => [o, encodedTimestamps[i]]));
} else {
params = params.concat(encodedWaypoints);
} }
return this.requestPath('match', params, callback); return this.requestPath('match', params, callback);
}; };
this.extractInstructionList = (instructions, index, postfix) => { this.extractInstructionList = (instructions, keyFinder, postfix) => {
postfix = postfix || null; postfix = postfix || null;
if (instructions) { if (instructions) {
return instructions.filter(r => r[0].toString() !== this.DESTINATION_REACHED.toString()) return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
.map(r => r[index]) .map(keyFinder)
.map(r => (isNaN(parseInt(r)) && (!r || r == '')) ? '""' : '' + r + (postfix || ''))
.join(','); .join(',');
} }
}; };
this.wayList = (instructions) => { this.wayList = (instructions) => {
return this.extractInstructionList(instructions, 1); return this.extractInstructionList(instructions, s => s.name);
};
this.compassList = (instructions) => {
return this.extractInstructionList(instructions, 6);
}; };
this.bearingList = (instructions) => { this.bearingList = (instructions) => {
return this.extractInstructionList(instructions, 7); return this.extractInstructionList(instructions, s => s.maneuver.bearing_after);
}; };
this.turnList = (instructions) => { this.turnList = (instructions) => {
var types = { return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
'0': 'none', .map(v => {
'1': 'straight', switch (v.maneuver.type) {
'2': 'slight_right', case 'depart':
'3': 'right', case 'arrive':
'4': 'sharp_right', return v.maneuver.type;
'5': 'u_turn', case 'roundabout':
'6': 'sharp_left', return 'roundabout-exit-' + v.maneuver.exit;
'7': 'left', // FIXME this is a little bit over-simplistic for merge/fork instructions
'8': 'slight_left', default:
'9': 'via', return v.maneuver.modifier;
'10': 'head', }
'11': 'enter_roundabout', })
'12': 'leave_roundabout', .join(',');
'13': 'stay_roundabout',
'14': 'start_end_of_street',
'15': 'destination',
'16': 'name_changes',
'17': 'enter_contraflow',
'18': 'leave_contraflow'
};
// replace instructions codes with strings, e.g. '11-3' gets converted to 'enter_roundabout-3'
return instructions ? instructions.map(r => r[0].toString().replace(/^(\d*)/, (match, num) => types[num])).join(',') : instructions;
}; };
this.modeList = (instructions) => { this.modeList = (instructions) => {
return this.extractInstructionList(instructions, 8); return this.extractInstructionList(instructions, s => s.mode);
}; };
this.timeList = (instructions) => { this.timeList = (instructions) => {
return this.extractInstructionList(instructions, 4, 's'); return this.extractInstructionList(instructions, s => s.duration + 's');
}; };
this.distanceList = (instructions) => { this.distanceList = (instructions) => {
return this.extractInstructionList(instructions, 2, 'm'); return this.extractInstructionList(instructions, s => s.distance + 'm');
}; };
}; };

View File

@ -26,34 +26,32 @@ module.exports = function () {
var headers = new Set(table.raw()[0]); var headers = new Set(table.raw()[0]);
var requestRow = (row, ri, cb) => { var requestRow = (row, ri, cb) => {
var got, var got;
json;
var afterRequest = (err, res, body) => { var afterRequest = (err, res, body) => {
if (err) return cb(err); if (err) return cb(err);
if (body && body.length) { if (body && body.length) {
var instructions, bearings, compasses, turns, modes, times, distances; var instructions, bearings, turns, modes, times, distances;
json = JSON.parse(body); var json = JSON.parse(body);
var hasRoute = json.status === 200; var hasRoute = json.code === 'ok';
if (hasRoute) { if (hasRoute) {
instructions = this.wayList(json.route_instructions); instructions = this.wayList(json.routes[0]);
bearings = this.bearingList(json.route_instructions); bearings = this.bearingList(json.routes[0]);
compasses = this.compassList(json.route_instructions); turns = this.turnList(json.routes[0]);
turns = this.turnList(json.route_instructions); modes = this.modeList(json.routes[0]);
modes = this.modeList(json.route_instructions); times = this.timeList(json.routes[0]);
times = this.timeList(json.route_instructions); distances = this.distanceList(json.routes[0]);
distances = this.distanceList(json.route_instructions);
} }
if (headers.has('status')) { if (headers.has('status')) {
got.status = json.status.toString(); got.status = res.statusCode.toString();
} }
if (headers.has('message')) { if (headers.has('message')) {
got.message = json.status_message; got.message = json.message || '';
} }
if (headers.has('#')) { if (headers.has('#')) {
@ -70,19 +68,21 @@ module.exports = function () {
} }
if (headers.has('geometry')) { if (headers.has('geometry')) {
got.geometry = json.route_geometry; got.geometry = json.routes[0].geometry;
} }
if (headers.has('route')) { if (headers.has('route')) {
got.route = (instructions || '').trim(); got.route = (instructions || '').trim();
if (headers.has('alternative')) { if (headers.has('alternative')) {
got.alternative = json.found_alternative ? // TODO examine more than first alternative?
this.wayList(json.alternative_instructions[0]) : ''; got.alternative ='';
if (json.routes && json.routes.length > 1)
got.alternative = this.wayList(json.routes[1]);
} }
var distance = hasRoute && json.route_summary.total_distance, var distance = hasRoute && json.routes[0].distance,
time = hasRoute && json.route_summary.total_time; time = hasRoute && json.routes[0].duration;
if (headers.has('distance')) { if (headers.has('distance')) {
if (row.distance.length) { if (row.distance.length) {
@ -116,7 +116,6 @@ module.exports = function () {
}; };
putValue('bearing', bearings); putValue('bearing', bearings);
putValue('compass', compasses);
putValue('turns', turns); putValue('turns', turns);
putValue('modes', modes); putValue('modes', modes);
putValue('times', times); putValue('times', times);

View File

@ -19,5 +19,5 @@ Feature: Support 64bit node IDs
| cdec | | cdec |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| x | y | abc | head,destination | | x | y | abc,abc | depart,arrive |

View File

@ -25,16 +25,16 @@ Feature: Alternative route
Scenario: Enabled alternative Scenario: Enabled alternative
Given the query options Given the query options
| alt | true | | alternatives | true |
When I route I should get When I route I should get
| from | to | route | alternative | | from | to | route | alternative |
| a | z | ab,bc,cd,dz | ag,gh,hi,ij,jz | | a | z | ab,bc,cd,dz,dz | ag,gh,hi,ij,jz,jz |
Scenario: Disabled alternative Scenario: Disabled alternative
Given the query options Given the query options
| alt | false | | alternatives | false |
When I route I should get When I route I should get
| from | to | route | alternative | | from | to | route | alternative |
| a | z | ab,bc,cd,dz | | | a | z | ab,bc,cd,dz,dz | |

View File

@ -19,11 +19,11 @@ Feature: Alternative route
| ca | yes | | ca | yes |
And the query options And the query options
| alt | true | | alternatives | true |
When I route I should get When I route I should get
| from | to | route | alternative | | from | to | route | alternative |
| 1 | 2 | ab,bd,dc,ca,ab | | | 1 | 2 | ab,bd,dc,ca,ab,ab | |
| 3 | 4 | bd,dc,ca,ab,bd | | | 3 | 4 | bd,dc,ca,ab,bd,bd | |
| 5 | 6 | dc,ca,ab,bd,dc | | | 5 | 6 | dc,ca,ab,bd,dc,dc | |
| 7 | 8 | ca,ab,bd,dc,ca | | | 7 | 8 | ca,ab,bd,dc,ca,ca | |

View File

@ -23,8 +23,8 @@ Feature: Handle bad data in a graceful manner
| abcde | yes | | abcde | yes |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| b | d | abcde | | b | d | abcde,abcde |
@todo @todo
Scenario: Start/end point at the same location Scenario: Start/end point at the same location
@ -78,7 +78,7 @@ Feature: Handle bad data in a graceful manner
# | b | c | cd | # | b | c | cd |
# | a | d | cd | # | a | d | cd |
# | c | d | cd | # | c | d | cd |
| d | e | de | | d | e | de,de |
# | k | l | kl | # | k | l | kl |
# | l | m | lm | # | l | m | lm |
# | o | l | lm | # | o | l | lm |

View File

@ -14,9 +14,9 @@ Feature: Basic Routing
| ab | | ab |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| b | a | ab | | b | a | ab,ab |
Scenario: Routing in between two nodes of way Scenario: Routing in between two nodes of way
Given the node map Given the node map
@ -27,9 +27,9 @@ Feature: Basic Routing
| abcd | | abcd |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| 1 | 2 | abcd | | 1 | 2 | abcd,abcd |
| 2 | 1 | abcd | | 2 | 1 | abcd,abcd |
Scenario: Routing between the middle nodes of way Scenario: Routing between the middle nodes of way
Given the node map Given the node map
@ -40,19 +40,19 @@ Feature: Basic Routing
| abcdef | | abcdef |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| b | c | abcdef | | b | c | abcdef,abcdef |
| b | d | abcdef | | b | d | abcdef,abcdef |
| b | e | abcdef | | b | e | abcdef,abcdef |
| c | b | abcdef | | c | b | abcdef,abcdef |
| c | d | abcdef | | c | d | abcdef,abcdef |
| c | e | abcdef | | c | e | abcdef,abcdef |
| d | b | abcdef | | d | b | abcdef,abcdef |
| d | c | abcdef | | d | c | abcdef,abcdef |
| d | e | abcdef | | d | e | abcdef,abcdef |
| e | b | abcdef | | e | b | abcdef,abcdef |
| e | c | abcdef | | e | c | abcdef,abcdef |
| e | d | abcdef | | e | d | abcdef,abcdef |
Scenario: Two ways connected in a straight line Scenario: Two ways connected in a straight line
Given the node map Given the node map
@ -64,13 +64,13 @@ Feature: Basic Routing
| bc | | bc |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | ab,bc | | a | c | ab,bc,bc |
| c | a | bc,ab | | c | a | bc,ab,ab |
| a | b | ab | | a | b | ab,ab |
| b | a | ab | | b | a | ab,ab |
| b | c | bc | | b | c | bc,bc |
| c | b | bc | | c | b | bc,bc |
Scenario: 2 unconnected parallel ways Scenario: 2 unconnected parallel ways
Given the node map Given the node map
@ -83,33 +83,33 @@ Feature: Basic Routing
| def | | def |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abc | | a | b | abc,abc |
| b | a | abc | | b | a | abc,abc |
| b | c | abc | | b | c | abc,abc |
| c | b | abc | | c | b | abc,abc |
| d | e | def | | d | e | def,def |
| e | d | def | | e | d | def,def |
| e | f | def | | e | f | def,def |
| f | e | def | | f | e | def,def |
| a | d | | | a | d | |
| d | a | | | d | a | |
| b | d | | | b | d | |
| d | b | | | d | b | |
| c | d | | | c | d | |
| d | c | | | d | c | |
| a | e | | | a | e | |
| e | a | | | e | a | |
| b | e | | | b | e | |
| e | b | | | e | b | |
| c | e | | | c | e | |
| e | c | | | e | c | |
| a | f | | | a | f | |
| f | a | | | f | a | |
| b | f | | | b | f | |
| f | b | | | f | b | |
| c | f | | | c | f | |
| f | c | | | f | c | |
Scenario: 3 ways connected in a triangle Scenario: 3 ways connected in a triangle
Given the node map Given the node map
@ -124,13 +124,13 @@ Feature: Basic Routing
| ca | | ca |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| a | c | ca | | a | c | ca,ca |
| b | c | bc | | b | c | bc,bc |
| b | a | ab | | b | a | ab,ab |
| c | a | ca | | c | a | ca,ca |
| c | b | bc | | c | b | bc,bc |
Scenario: 3 connected triangles Scenario: 3 connected triangles
Given a grid size of 100 meters Given a grid size of 100 meters
@ -157,12 +157,12 @@ Feature: Basic Routing
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| a | c | ca | | a | c | ca,ca |
| b | c | bc | | b | c | bc,bc |
| b | a | ab | | b | a | ab,ab |
| c | a | ca | | c | a | ca,ca |
| c | b | bc | | c | b | bc,bc |
Scenario: To ways connected at a 45 degree angle Scenario: To ways connected at a 45 degree angle
Given the node map Given the node map
@ -176,13 +176,13 @@ Feature: Basic Routing
| cde | | cde |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| b | d | abc,cde | | b | d | abc,cde,cde |
| a | e | abc,cde | | a | e | abc,cde,cde |
| a | c | abc | | a | c | abc,abc |
| c | a | abc | | c | a | abc,abc |
| c | e | cde | | c | e | cde,cde |
| e | c | cde | | e | c | cde,cde |
Scenario: Grid city center Scenario: Grid city center
Given the node map Given the node map
@ -203,11 +203,11 @@ Feature: Basic Routing
| dhlp | | dhlp |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| f | g | efgh | | f | g | efgh,efgh |
| g | f | efgh | | g | f | efgh,efgh |
| f | j | bfjn | | f | j | bfjn,bfjn |
| j | f | bfjn | | j | f | bfjn,bfjn |
Scenario: Grid city periphery Scenario: Grid city periphery
Given the node map Given the node map
@ -228,11 +228,11 @@ Feature: Basic Routing
| dhlp | | dhlp |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | d | abcd | | a | d | abcd,abcd |
| d | a | abcd | | d | a | abcd,abcd |
| a | m | aeim | | a | m | aeim,aeim |
| m | a | aeim | | m | a | aeim,aeim |
Scenario: Testbot - Triangle challenge Scenario: Testbot - Triangle challenge
Given the node map Given the node map
@ -249,5 +249,5 @@ Feature: Basic Routing
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| d | c | de,ce | | d | c | de,ce,ce |
| e | d | de | | e | d | de,de |

View File

@ -14,8 +14,8 @@ Feature: Compass bearing
| ab | | ab |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | bearing |
| a | b | ab | NW | 315 | | a | b | ab,ab | 315,0 |
Scenario: Bearing when going west Scenario: Bearing when going west
Given the node map Given the node map
@ -26,8 +26,8 @@ Feature: Compass bearing
| ab | | ab |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | bearing |
| a | b | ab | W | 270 | | a | b | ab,ab | 270,0 |
Scenario: Bearing af 45 degree intervals Scenario: Bearing af 45 degree intervals
Given the node map Given the node map
@ -47,15 +47,15 @@ Feature: Compass bearing
| xh | | xh |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | bearing |
| x | a | xa | N | 0 | | x | a | xa,xa | 0,0 |
| x | b | xb | NW | 315 | | x | b | xb,xb | 315,0 |
| x | c | xc | W | 270 | | x | c | xc,xc | 270,0 |
| x | d | xd | SW | 225 | | x | d | xd,xd | 225,0 |
| x | e | xe | S | 180 | | x | e | xe,xe | 180,0 |
| x | f | xf | SE | 135 | | x | f | xf,xf | 135,0 |
| x | g | xg | E | 90 | | x | g | xg,xg | 90,0 |
| x | h | xh | NE | 45 | | x | h | xh,xh | 45,0 |
Scenario: Bearing in a roundabout Scenario: Bearing in a roundabout
Given the node map Given the node map
@ -76,9 +76,9 @@ Feature: Compass bearing
| ha | yes | | ha | yes |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | bearing |
| c | b | cd,de,ef,fg,gh,ha,ab | W,SW,S,SE,E,NE,N | 270,225,180,135,90,45,0 | | c | b | cd,de,ef,fg,gh,ha,ab,ab | 270,225,180,135,90,45,0,0 |
| g | f | gh,ha,ab,bc,cd,de,ef | E,NE,N,NW,W,SW,S | 90,45,0,315,270,225,180 | | g | f | gh,ha,ab,bc,cd,de,ef,ef | 90,45,0,315,270,225,180,0 |
Scenario: Bearing should stay constant when zig-zagging Scenario: Bearing should stay constant when zig-zagging
Given the node map Given the node map
@ -96,8 +96,8 @@ Feature: Compass bearing
| gh | | gh |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | bearing |
| a | h | ab,bc,cd,de,ef,fg,gh | N,SE,N,SE,N,SE,N | 0,135,0,135,0,135,0 | | a | h | ab,bc,cd,de,ef,fg,gh,gh | 0,135,0,135,0,135,0,0 |
Scenario: Bearings on an east-west way. Scenario: Bearings on an east-west way.
Given the node map Given the node map
@ -108,37 +108,37 @@ Feature: Compass bearing
| abcdef | | abcdef |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | bearing |
| a | b | abcdef | E | 90 | | a | b | abcdef,abcdef | 90,0 |
| a | c | abcdef | E | 90 | | a | c | abcdef,abcdef | 90,0 |
| a | d | abcdef | E | 90 | | a | d | abcdef,abcdef | 90,0 |
| a | e | abcdef | E | 90 | | a | e | abcdef,abcdef | 90,0 |
| a | f | abcdef | E | 90 | | a | f | abcdef,abcdef | 90,0 |
| b | a | abcdef | W | 270 | | b | a | abcdef,abcdef | 270,0 |
| b | c | abcdef | E | 90 | | b | c | abcdef,abcdef | 90,0 |
| b | d | abcdef | E | 90 | | b | d | abcdef,abcdef | 90,0 |
| b | e | abcdef | E | 90 | | b | e | abcdef,abcdef | 90,0 |
| b | f | abcdef | E | 90 | | b | f | abcdef,abcdef | 90,0 |
| c | a | abcdef | W | 270 | | c | a | abcdef,abcdef | 270,0 |
| c | b | abcdef | W | 270 | | c | b | abcdef,abcdef | 270,0 |
| c | d | abcdef | E | 90 | | c | d | abcdef,abcdef | 90,0 |
| c | e | abcdef | E | 90 | | c | e | abcdef,abcdef | 90,0 |
| c | f | abcdef | E | 90 | | c | f | abcdef,abcdef | 90,0 |
| d | a | abcdef | W | 270 | | d | a | abcdef,abcdef | 270,0 |
| d | b | abcdef | W | 270 | | d | b | abcdef,abcdef | 270,0 |
| d | c | abcdef | W | 270 | | d | c | abcdef,abcdef | 270,0 |
| d | e | abcdef | E | 90 | | d | e | abcdef,abcdef | 90,0 |
| d | f | abcdef | E | 90 | | d | f | abcdef,abcdef | 90,0 |
| e | a | abcdef | W | 270 | | e | a | abcdef,abcdef | 270,0 |
| e | b | abcdef | W | 270 | | e | b | abcdef,abcdef | 270,0 |
| e | c | abcdef | W | 270 | | e | c | abcdef,abcdef | 270,0 |
| e | d | abcdef | W | 270 | | e | d | abcdef,abcdef | 270,0 |
| e | f | abcdef | E | 90 | | e | f | abcdef,abcdef | 90,0 |
| f | a | abcdef | W | 270 | | f | a | abcdef,abcdef | 270,0 |
| f | b | abcdef | W | 270 | | f | b | abcdef,abcdef | 270,0 |
| f | c | abcdef | W | 270 | | f | c | abcdef,abcdef | 270,0 |
| f | d | abcdef | W | 270 | | f | d | abcdef,abcdef | 270,0 |
| f | e | abcdef | W | 270 | | f | e | abcdef,abcdef | 270,0 |
Scenario: Bearings at high latitudes Scenario: Bearings at high latitudes
# The coordinas below was calculated using http://www.movable-type.co.uk/scripts/latlong.html, # The coordinas below was calculated using http://www.movable-type.co.uk/scripts/latlong.html,
@ -161,19 +161,19 @@ Feature: Compass bearing
| bd | | bd |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | bearing |
| a | b | ab | N | 0 | | a | b | ab,ab | 0,0 |
| b | c | bc | E | 90 | | b | c | bc,bc | 90,0 |
| c | d | cd | S | 180 | | c | d | cd,cd | 180,0 |
| d | a | da | W | 270 | | d | a | da,da | 270,0 |
| b | a | ab | S | 180 | | b | a | ab,ab | 180,0 |
| c | b | bc | W | 270 | | c | b | bc,bc | 270,0 |
| d | c | cd | N | 0 | | d | c | cd,cd | 0,0 |
| a | d | da | E | 90 | | a | d | da,da | 90,0 |
| a | c | ac | NE | 45 | | a | c | ac,ac | 45,0 |
| c | a | ac | SW | 225 | | c | a | ac,ac | 225,0 |
| b | d | bd | SE | 135 | | b | d | bd,bd | 135,0 |
| d | b | bd | NW | 315 | | d | b | bd,bd | 315,0 |
Scenario: Bearings at high negative latitudes Scenario: Bearings at high negative latitudes
# The coordinas below was calculated using http://www.movable-type.co.uk/scripts/latlong.html, # The coordinas below was calculated using http://www.movable-type.co.uk/scripts/latlong.html,
@ -196,16 +196,16 @@ Feature: Compass bearing
| bd | | bd |
When I route I should get When I route I should get
| from | to | route | compass | bearing | | from | to | route | bearing |
| a | b | ab | S | 180 | | a | b | ab,ab | 180,0 |
| b | c | bc | E | 90 | | b | c | bc,bc | 90,0 |
| c | d | cd | N | 0 | | c | d | cd,cd | 0,0 |
| d | a | da | W | 270 | | d | a | da,da | 270,0 |
| b | a | ab | N | 0 | | b | a | ab,ab | 0,0 |
| c | b | bc | W | 270 | | c | b | bc,bc | 270,0 |
| d | c | cd | S | 180 | | d | c | cd,cd | 180,0 |
| a | d | da | E | 90 | | a | d | da,da | 90,0 |
| a | c | ac | SE | 135 | | a | c | ac,ac | 135,0 |
| c | a | ac | NW | 315 | | c | a | ac,ac | 315,0 |
| b | d | bd | NE | 45 | | b | d | bd,bd | 45,0 |
| d | b | bd | SW | 225 | | d | b | bd,bd | 225,0 |

View File

@ -15,11 +15,11 @@ Feature: Bearing parameter
When I route I should get When I route I should get
| from | to | bearings | route | bearing | | from | to | bearings | route | bearing |
| b | c | 90 90 | ad | 90 | | b | c | 90 90 | ad,ad | 90,0 |
| b | c | 180 90 | | | | b | c | 180 90 | | |
| b | c | 80 100 | ad | 90 | | b | c | 80 100 | ad,ad | 90,0 |
| b | c | 79 100 | | | | b | c | 79 100 | | |
| b | c | 79,11 100 | ad | 90 | | b | c | 79,11 100 | ad,ad | 90,0 |
Scenario: Testbot - Intial bearing in simple case Scenario: Testbot - Intial bearing in simple case
Given the node map Given the node map
@ -35,10 +35,10 @@ Feature: Bearing parameter
When I route I should get When I route I should get
| from | to | bearings | route | bearing | | from | to | bearings | route | bearing |
| 0 | c | 0 0 | | | | 0 | c | 0 0 | | |
| 0 | c | 45 45 | bc | 45 ~3% | | 0 | c | 45 45 | bc,bc | 45 ~3% |
| 0 | c | 85 85 | | | | 0 | c | 85 85 | | |
| 0 | c | 95 95 | | | | 0 | c | 95 95 | | |
| 0 | c | 135 135 | ac | 135 ~1% | | 0 | c | 135 135 | ac,ac | 135 ~1% |
| 0 | c | 180 180 | | | | 0 | c | 180 180 | | |
Scenario: Testbot - Initial bearing on split way Scenario: Testbot - Initial bearing on split way
@ -55,19 +55,19 @@ Feature: Bearing parameter
When I route I should get When I route I should get
| from | to | bearings | route | bearing | | from | to | bearings | route | bearing |
| 0 | b | 10 10 | bc | 0 | | 0 | b | 10 10 | bc,bc | 0,0 |
| 0 | b | 90 90 | ab | 90 | | 0 | b | 90 90 | ab,ab | 90,0 |
# The returned bearing is wrong here, it's based on the snapped # The returned bearing is wrong here, it's based on the snapped
# coordinates, not the acutal edge bearing. This should be # coordinates, not the acutal edge bearing. This should be
# fixed one day, but it's only a problem when we snap too vias # fixed one day, but it's only a problem when we snap two vias
# to the same point - DP # to the same point - DP
#| 0 | b | 170 170 | da | 180 | #| 0 | b | 170 170 | da | 180 |
#| 0 | b | 189 189 | da | 180 | #| 0 | b | 189 189 | da | 180 |
| 0 | 1 | 90 270 | ab,bc,cd | 90,0,270 | | 0 | 1 | 90 270 | ab,bc,cd,cd | 90,0,270,0 |
| 1 | d | 10 10 | bc | 0 | | 1 | d | 10 10 | bc,bc | 0,0 |
| 1 | d | 90 90 | ab,bc,cd,da | 90,0,270,180 | | 1 | d | 90 90 | ab,bc,cd,da,da | 90,0,270,180,0 |
| 1 | 0 | 189 189 | da | 180 | | 1 | 0 | 189 189 | da,da | 180,0 |
| 1 | d | 270 270 | cd | 270 | | 1 | d | 270 270 | cd,cd | 270,0 |
| 1 | d | 349 349 | | | | 1 | d | 349 349 | | |
Scenario: Testbot - Initial bearing in all direction Scenario: Testbot - Initial bearing in all direction
@ -100,12 +100,12 @@ Feature: Bearing parameter
| ha | yes | | ha | yes |
When I route I should get When I route I should get
| from | to | bearings | route | bearing | | from | to | bearings | route | bearing |
| 0 | q | 0 90 | ia,ab,bc,cd,de,ef,fg,gh,ha | 0,90,180,180,270,270,0,0,90 | | 0 | q | 0 90 | ia,ab,bc,cd,de,ef,fg,gh,ha,ha | 0,90,180,180,270,270,0,0,90,0 |
| 0 | a | 45 90 | jb,bc,cd,de,ef,fg,gh,ha | 45,180,180,270,270,0,0,90 | | 0 | a | 45 90 | jb,bc,cd,de,ef,fg,gh,ha,ha | 45,180,180,270,270,0,0,90,0 |
| 0 | q | 90 90 | kc,cd,de,ef,fg,gh,ha | 90,180,270,270,0,0,90 | | 0 | q | 90 90 | kc,cd,de,ef,fg,gh,ha,ha | 90,180,270,270,0,0,90,0 |
| 0 | a | 135 90 | ld,de,ef,fg,gh,ha | 135,270,270,0,0,90 | | 0 | a | 135 90 | ld,de,ef,fg,gh,ha,ha | 135,270,270,0,0,90,0 |
| 0 | a | 180 90 | me,ef,fg,gh,ha | 180,270,0,0,90 | | 0 | a | 180 90 | me,ef,fg,gh,ha,ha | 180,270,0,0,90,0 |
| 0 | a | 225 90 | nf,fg,gh,ha | 225,0,0,90 | | 0 | a | 225 90 | nf,fg,gh,ha,ha | 225,0,0,90,0 |
| 0 | a | 270 90 | og,gh,ha | 270,0,90 | | 0 | a | 270 90 | og,gh,ha,ha | 270,0,90,0 |
| 0 | a | 315 90 | ph,ha | 315,90 | | 0 | a | 315 90 | ph,ha,ha | 315,90,0 |

View File

@ -17,6 +17,6 @@ Feature: Geometry Compression
| fg | | fg |
When I route I should get When I route I should get
| from | to | route | distance | speed | | from | to | route | distance | speed |
| b | e | abcdef | 589m | 36 km/h | | b | e | abcdef,abcdef | 589m | 36 km/h |
| e | b | abcdef | 589m | 36 km/h | | e | b | abcdef,abcdef | 589m | 36 km/h |

View File

@ -14,8 +14,8 @@ Feature: Temporary tests related to osrm-datastore
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| b | a | ab | | b | a | ab,ab |
Scenario: Scenaria xy Scenario: Scenaria xy
Given the node map Given the node map
@ -27,5 +27,5 @@ Feature: Temporary tests related to osrm-datastore
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xy | | x | y | xy,xy |
| y | x | xy | | y | x | xy,xy |

View File

@ -15,7 +15,7 @@ Feature: Distance calculation
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | ab | 100m +- 2 | | a | b | ab,ab | 100m +- 2 |
Scenario: Distance should equal sum of segments, leftwinded Scenario: Distance should equal sum of segments, leftwinded
Given the node map Given the node map
@ -28,8 +28,8 @@ Feature: Distance calculation
| abcde | | abcde |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | d | abcde | 300m +-2 | | a | d | abcde,abcde | 300m +-2 |
Scenario: Distance should equal sum of segments, rightwinded Scenario: Distance should equal sum of segments, rightwinded
Given the node map Given the node map
@ -42,8 +42,8 @@ Feature: Distance calculation
| abcde | | abcde |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | d | abcde | 300m +-2 | | a | d | abcde,abcde | 300m +-2 |
Scenario: 10m distances Scenario: 10m distances
Given a grid size of 10 meters Given a grid size of 10 meters
@ -56,13 +56,13 @@ Feature: Distance calculation
| abc | | abc |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | abc | 10m +-2 | | a | b | abc,abc | 10m +-2 |
| b | a | abc | 10m +-2 | | b | a | abc,abc | 10m +-2 |
| b | c | abc | 10m +-2 | | b | c | abc,abc | 10m +-2 |
| c | b | abc | 10m +-2 | | c | b | abc,abc | 10m +-2 |
| a | c | abc | 20m +-4 | | a | c | abc,abc | 20m +-4 |
| c | a | abc | 20m +-4 | | c | a | abc,abc | 20m +-4 |
Scenario: 100m distances Scenario: 100m distances
Given a grid size of 100 meters Given a grid size of 100 meters
@ -75,13 +75,13 @@ Feature: Distance calculation
| abc | | abc |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | abc | 100m +-2 | | a | b | abc,abc | 100m +-2 |
| b | a | abc | 100m +-2 | | b | a | abc,abc | 100m +-2 |
| b | c | abc | 100m +-2 | | b | c | abc,abc | 100m +-2 |
| c | b | abc | 100m +-2 | | c | b | abc,abc | 100m +-2 |
| a | c | abc | 200m +-4 | | a | c | abc,abc | 200m +-4 |
| c | a | abc | 200m +-4 | | c | a | abc,abc | 200m +-4 |
Scenario: 1km distance Scenario: 1km distance
Given a grid size of 1000 meters Given a grid size of 1000 meters
@ -94,13 +94,13 @@ Feature: Distance calculation
| abc | | abc |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | abc | 1000m +-2 | | a | b | abc,abc | 1000m +-2 |
| b | a | abc | 1000m +-2 | | b | a | abc,abc | 1000m +-2 |
| b | c | abc | 1000m +-2 | | b | c | abc,abc | 1000m +-2 |
| c | b | abc | 1000m +-2 | | c | b | abc,abc | 1000m +-2 |
| a | c | abc | 2000m +-4 | | a | c | abc,abc | 2000m +-4 |
| c | a | abc | 2000m +-4 | | c | a | abc,abc | 2000m +-4 |
Scenario: Distance of a winding south-north path Scenario: Distance of a winding south-north path
Given a grid size of 10 meters Given a grid size of 10 meters
@ -115,14 +115,14 @@ Feature: Distance calculation
| abcdefgh | | abcdefgh |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | abcdefgh | 10m +-2 | | a | b | abcdefgh,abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 | | a | c | abcdefgh,abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 | | a | d | abcdefgh,abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 | | a | e | abcdefgh,abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 | | a | f | abcdefgh,abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 | | a | g | abcdefgh,abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 | | a | h | abcdefgh,abcdefgh | 70m +-14 |
Scenario: Distance of a winding east-west path Scenario: Distance of a winding east-west path
Given a grid size of 10 meters Given a grid size of 10 meters
@ -135,14 +135,14 @@ Feature: Distance calculation
| abcdefgh | | abcdefgh |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | abcdefgh | 10m +-2 | | a | b | abcdefgh,abcdefgh | 10m +-2 |
| a | c | abcdefgh | 20m +-4 | | a | c | abcdefgh,abcdefgh | 20m +-4 |
| a | d | abcdefgh | 30m +-6 | | a | d | abcdefgh,abcdefgh | 30m +-6 |
| a | e | abcdefgh | 40m +-8 | | a | e | abcdefgh,abcdefgh | 40m +-8 |
| a | f | abcdefgh | 50m +-10 | | a | f | abcdefgh,abcdefgh | 50m +-10 |
| a | g | abcdefgh | 60m +-12 | | a | g | abcdefgh,abcdefgh | 60m +-12 |
| a | h | abcdefgh | 70m +-14 | | a | h | abcdefgh,abcdefgh | 70m +-14 |
Scenario: Geometric distances Scenario: Geometric distances
Given a grid size of 100 meters Given a grid size of 100 meters
@ -184,30 +184,30 @@ Feature: Distance calculation
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| x | a | xa | 300m +-2 | | x | a | xa,xa | 300m +-2 |
| x | b | xb | 316m +-2 | | x | b | xb,xb | 316m +-2 |
| x | c | xc | 360m +-2 | | x | c | xc,xc | 360m +-2 |
| x | d | xd | 424m +-2 | | x | d | xd,xd | 424m +-2 |
| x | e | xe | 360m +-2 | | x | e | xe,xe | 360m +-2 |
| x | f | xf | 316m +-2 | | x | f | xf,xf | 316m +-2 |
| x | g | xg | 300m +-2 | | x | g | xg,xg | 300m +-2 |
| x | h | xh | 316m +-2 | | x | h | xh,xh | 316m +-2 |
| x | i | xi | 360m +-2 | | x | i | xi,xi | 360m +-2 |
| x | j | xj | 424m +-2 | | x | j | xj,xj | 424m +-2 |
| x | k | xk | 360m +-2 | | x | k | xk,xk | 360m +-2 |
| x | l | xl | 316m +-2 | | x | l | xl,xl | 316m +-2 |
| x | m | xm | 300m +-2 | | x | m | xm,xm | 300m +-2 |
| x | n | xn | 316m +-2 | | x | n | xn,xn | 316m +-2 |
| x | o | xo | 360m +-2 | | x | o | xo,xo | 360m +-2 |
| x | p | xp | 424m +-2 | | x | p | xp,xp | 424m +-2 |
| x | q | xq | 360m +-2 | | x | q | xq,xq | 360m +-2 |
| x | r | xr | 316m +-2 | | x | r | xr,xr | 316m +-2 |
| x | s | xs | 300m +-2 | | x | s | xs,xs | 300m +-2 |
| x | t | xt | 316m +-2 | | x | t | xt,xt | 316m +-2 |
| x | u | xu | 360m +-2 | | x | u | xu,xu | 360m +-2 |
| x | v | xv | 424m +-2 | | x | v | xv,xv | 424m +-2 |
| x | w | xw | 360m +-2 | | x | w | xw,xw | 360m +-2 |
| x | y | xy | 316m +-2 | | x | y | xy,xy | 316m +-2 |
@maze @maze
Scenario: Distance of a maze of short segments Scenario: Distance of a maze of short segments
@ -224,5 +224,5 @@ Feature: Distance calculation
| abcdefghijklmnopqrst | | abcdefghijklmnopqrst |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | t | abcdefghijklmnopqrst | 133m +-2 | | a | t | abcdefghijklmnopqrst,abcdefghijklmnopqrst | 133m +-2 |

View File

@ -16,9 +16,9 @@ Feature: Basic Distance Matrix
| ab | | ab |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | a | b | | | a | b |
| a | 0 | 100 | | a | 0 | 10 |
| b | 100 | 0 | | b | 10 | 0 |
Scenario: Testbot - Travel time matrix with different way speeds Scenario: Testbot - Travel time matrix with different way speeds
Given the node map Given the node map
@ -31,11 +31,11 @@ Feature: Basic Distance Matrix
| cd | tertiary | | cd | tertiary |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | a | b | c | d | | | a | b | c | d |
| a | 0 | 100 | 300 | 600 | | a | 0 | 10 | 30 | 60 |
| b | 100 | 0 | 200 | 500 | | b | 10 | 0 | 20 | 50 |
| c | 300 | 200 | 0 | 300 | | c | 30 | 20 | 0 | 30 |
| d | 600 | 500 | 300 | 0 | | d | 60 | 50 | 30 | 0 |
Scenario: Testbot - Travel time matrix with fuzzy match Scenario: Testbot - Travel time matrix with fuzzy match
Given the node map Given the node map
@ -47,8 +47,8 @@ Feature: Basic Distance Matrix
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | a | b | | | a | b |
| a | 0 | 95 +- 10 | | a | 0 | 9 +- 2 |
| b | 95 ~10% | 0 | | b | 9 ~15% | 0 |
Scenario: Testbot - Travel time matrix of small grid Scenario: Testbot - Travel time matrix of small grid
Given the node map Given the node map
@ -64,11 +64,11 @@ Feature: Basic Distance Matrix
| cf | | cf |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | a | b | e | f | | | a | b | e | f |
| a | 0 | 100 | 200 | 300 | | a | 0 | 10 | 20 | 30 |
| b | 100 | 0 | 100 | 200 | | b | 10 | 0 | 10 | 20 |
| e | 200 | 100 | 0 | 100 | | e | 20 | 10 | 0 | 10 |
| f | 300 | 200 | 100 | 0 | | f | 30 | 20 | 10 | 0 |
Scenario: Testbot - Travel time matrix of network with unroutable parts Scenario: Testbot - Travel time matrix of network with unroutable parts
Given the node map Given the node map
@ -79,9 +79,9 @@ Feature: Basic Distance Matrix
| ab | yes | | ab | yes |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | a | b | | | a | b |
| a | 0 | 100 | | a | 0 | 10 |
| b | | 0 | | b | | 0 |
Scenario: Testbot - Travel time matrix of network with oneways Scenario: Testbot - Travel time matrix of network with oneways
Given the node map Given the node map
@ -95,11 +95,11 @@ Feature: Basic Distance Matrix
| by | | | by | |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | x | y | d | e | | | x | y | d | e |
| x | 0 | 300 | 400 | 300 | | x | 0 | 30 | 40 | 30 |
| y | 500 | 0 | 300 | 200 | | y | 50 | 0 | 30 | 20 |
| d | 200 | 300 | 0 | 300 | | d | 20 | 30 | 0 | 30 |
| e | 300 | 400 | 100 | 0 | | e | 30 | 40 | 10 | 0 |
Scenario: Testbot - Travel time matrix and with only one source Scenario: Testbot - Travel time matrix and with only one source
Given the node map Given the node map
@ -115,8 +115,8 @@ Feature: Basic Distance Matrix
| cf | | cf |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | a | b | e | f | | | a | b | e | f |
| a | 0 | 100 | 200 | 300 | | a | 0 | 10 | 20 | 30 |
Scenario: Testbot - Travel time 3x2 matrix Scenario: Testbot - Travel time 3x2 matrix
Given the node map Given the node map
@ -132,9 +132,9 @@ Feature: Basic Distance Matrix
| cf | | cf |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | b | e | f | | | b | e | f |
| a | 100 | 200 | 300 | | a | 10 | 20 | 30 |
| b | 0 | 100 | 200 | | b | 0 | 10 | 20 |
Scenario: Testbot - All coordinates are from same small component Scenario: Testbot - All coordinates are from same small component
Given a grid size of 300 meters Given a grid size of 300 meters
@ -152,9 +152,9 @@ Feature: Basic Distance Matrix
| fg | | fg |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | f | g | | | f | g |
| f | 0 | 300 | | f | 0 | 30 |
| g | 300 | 0 | | g | 30 | 0 |
Scenario: Testbot - Coordinates are from different small component and snap to big CC Scenario: Testbot - Coordinates are from different small component and snap to big CC
Given a grid size of 300 meters Given a grid size of 300 meters
@ -173,11 +173,11 @@ Feature: Basic Distance Matrix
| hi | | hi |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | f | g | h | i | | | f | g | h | i |
| f | 0 | 300 | 0 | 300 | | f | 0 | 30 | 0 | 30 |
| g | 300 | 0 | 300 | 0 | | g | 30 | 0 | 30 | 0 |
| h | 0 | 300 | 0 | 300 | | h | 0 | 30 | 0 | 30 |
| i | 300 | 0 | 300 | 0 | | i | 30 | 0 | 30 | 0 |
Scenario: Testbot - Travel time matrix with loops Scenario: Testbot - Travel time matrix with loops
Given the node map Given the node map
@ -192,8 +192,8 @@ Feature: Basic Distance Matrix
| da | yes | | da | yes |
When I request a travel time matrix I should get When I request a travel time matrix I should get
| | 1 | 2 | 3 | 4 | | | 1 | 2 | 3 | 4 |
| 1 | 0 | 100 +-1 | 400 +-1 | 500 +-1 | | 1 | 0 | 10 +-1 | 40 +-1 | 50 +-1 |
| 2 | 700 +-1 | 0 | 300 +-1 | 400 +-1 | | 2 | 70 +-1 | 0 | 30 +-1 | 40 +-1 |
| 3 | 400 +-1 | 500 +-1 | 0 | 100 +-1 | | 3 | 40 +-1 | 50 +-1 | 0 | 10 +-1 |
| 4 | 300 +-1 | 400 +-1 | 700 +-1 | 0 | | 4 | 30 +-1 | 40 +-1 | 70 +-1 | 0 |

View File

@ -20,11 +20,11 @@ Feature: Durations
When I route I should get When I route I should get
| from | to | route | distance | time | | from | to | route | distance | time |
| a | b | ab | 100m +-1 | 60s +-1 | | a | b | ab,ab | 100m +-1 | 60s +-1 |
| b | c | bc | 200m +-1 | 600s +-1 | | b | c | bc,bc | 200m +-1 | 600s +-1 |
| c | d | cd | 300m +-1 | 3600s +-1 | | c | d | cd,cd | 300m +-1 | 3600s +-1 |
| d | e | de | 141m +-2 | 36000s +-1 | | d | e | de,de | 141m +-2 | 36000s +-1 |
| e | f | ef | 224m +-2 | 3723s +-1 | | e | f | ef,ef | 224m +-2 | 3723s +-1 |
@todo @todo
Scenario: Partial duration of ways Scenario: Partial duration of ways
@ -36,7 +36,7 @@ Feature: Durations
| abc | primary | 0:01 | | abc | primary | 0:01 |
When I route I should get When I route I should get
| from | to | route | distance | time | | from | to | route | distance | time |
| a | c | abc | 300m +-1 | 60s +-1 | | a | c | abc,abc | 300m +-1 | 60s +-1 |
| a | b | ab | 100m +-1 | 20s +-1 | | a | b | ab,ab | 100m +-1 | 20s +-1 |
| b | c | bc | 200m +-1 | 40s +-1 | | b | c | bc,bc | 200m +-1 | 40s +-1 |

View File

@ -20,18 +20,18 @@ Feature: Testbot - Walkthrough
| de | primary | | | de | primary | |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abc | | a | b | abc,abc |
| a | c | abc | | a | c | abc,abc |
| a | d | abc,cd | | a | d | abc,cd,cd |
| a | e | abc,ce | | a | e | abc,ce,ce |
| b | a | abc | | b | a | abc,abc |
| b | c | abc | | b | c | abc,abc |
| b | d | abc,cd | | b | d | abc,cd,cd |
| b | e | abc,ce | | b | e | abc,ce,ce |
| d | a | de,ce,abc | | d | a | de,ce,abc,abc |
| d | b | de,ce,abc | | d | b | de,ce,abc,abc |
| d | e | de | | d | e | de,de |
| e | a | ce,abc | | e | a | ce,abc,abc |
| e | b | ce,abc | | e | b | ce,abc,abc |
| e | c | ce | | e | c | ce,ce |

View File

@ -18,9 +18,9 @@ Feature: Choosing fastest route
| asb | primary | | asb | primary |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xa,atb,by | | x | y | xa,atb,by,by |
| y | x | by,atb,xa | | y | x | by,atb,xa,xa |
Scenario: Pick the fastest route, even when it's longer Scenario: Pick the fastest route, even when it's longer
Given the node map Given the node map
@ -33,6 +33,6 @@ Feature: Choosing fastest route
| asb | secondary | | asb | secondary |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | apb | | a | b | apb,apb |
| b | a | apb | | b | a | apb,apb |

View File

@ -32,11 +32,11 @@ Feature: Testbot - Handle ferry routes
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| b | c | bc | 60s +-1 | | b | c | bc,bc | 60s +-1 |
| f | g | fg | 600s +-1 | | f | g | fg,fg | 600s +-1 |
| j | k | jk | 3600s +-1 | | j | k | jk,jk | 3600s +-1 |
| n | o | no | 86400s +-1 | | n | o | no,no | 86400s +-1 |
| r | s | rs | 345600s +-1 | | r | s | rs,rs | 345600s +-1 |
@todo @todo
Scenario: Testbot - Week long ferry routes Scenario: Testbot - Week long ferry routes
@ -59,9 +59,9 @@ Feature: Testbot - Handle ferry routes
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| b | c | bc | 86400s +-1 | | b | c | bc,bc | 86400s +-1 |
| f | g | fg | 604800s +-1 | | f | g | fg,fg | 604800s +-1 |
| j | k | jk | 259200s +-1 | | j | k | jk,jk | 259200s +-1 |
Scenario: Testbot - Ferry duration, multiple nodes Scenario: Testbot - Ferry duration, multiple nodes
Given the node map Given the node map
@ -76,8 +76,8 @@ Feature: Testbot - Handle ferry routes
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | d | ad | 3600s +-1 | | a | d | ad,ad | 3600s +-1 |
| d | a | ad | 3600s +-1 | | d | a | ad,ad | 3600s +-1 |
@todo @todo
Scenario: Testbot - Ferry duration, individual parts, fast Scenario: Testbot - Ferry duration, individual parts, fast
@ -95,11 +95,11 @@ Feature: Testbot - Handle ferry routes
| abcd | | ferry | 0:06 | | abcd | | ferry | 0:06 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | d | abcd | 360s +-1 | | a | d | abcd,abcd | 360s +-1 |
| a | b | abcd | 60s +-1 | | a | b | abcd,abcd | 60s +-1 |
| b | c | abcd | 120s +-1 | | b | c | abcd,abcd | 120s +-1 |
| c | d | abcd | 180s +-1 | | c | d | abcd,abcd | 180s +-1 |
@todo @todo
Scenario: Testbot - Ferry duration, individual parts, slow Scenario: Testbot - Ferry duration, individual parts, slow
@ -116,11 +116,11 @@ Feature: Testbot - Handle ferry routes
| abcd | | ferry | 1:00 | | abcd | | ferry | 1:00 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | d | abcd | 3600s ~1% | | a | d | abcd,abcd | 3600s ~1% |
| a | b | abcd | 600s ~1% | | a | b | abcd,abcd | 600s ~1% |
| b | c | abcd | 1200s ~1% | | b | c | abcd,abcd | 1200s ~1% |
| c | d | abcd | 1800s ~1% | | c | d | abcd,abcd | 1800s ~1% |
Scenario: Testbot - Ferry duration, connected routes Scenario: Testbot - Ferry duration, connected routes
Given the node map Given the node map
@ -135,9 +135,9 @@ Feature: Testbot - Handle ferry routes
| defg | | ferry | 0:30 | | defg | | ferry | 0:30 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | g | abcd,defg | 3600s +-1 | | a | g | abcd,defg,defg | 3600s +-1 |
| g | a | defg,abcd | 3600s +-1 | | g | a | defg,abcd,abcd | 3600s +-1 |
Scenario: Testbot - Prefer road when faster than ferry Scenario: Testbot - Prefer road when faster than ferry
Given the node map Given the node map
@ -154,9 +154,9 @@ Feature: Testbot - Handle ferry routes
| defg | | ferry | 0:01 | | defg | | ferry | 0:01 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | g | xa,xy,yg | 60s +-25% | | a | g | xa,xy,yg,yg | 60s +-25% |
| g | a | yg,xy,xa | 60s +-25% | | g | a | yg,xy,xa,xa | 60s +-25% |
Scenario: Testbot - Long winding ferry route Scenario: Testbot - Long winding ferry route
Given the node map Given the node map
@ -170,9 +170,9 @@ Feature: Testbot - Handle ferry routes
| abcdefg | | ferry | 6:30 | | abcdefg | | ferry | 6:30 |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | g | abcdefg | 23400s +-2 | | a | g | abcdefg,abcdefg | 23400s +-2 |
| g | a | abcdefg | 23400s +-2 | | g | a | abcdefg,abcdefg | 23400s +-2 |
@todo @todo
Scenario: Testbot - Ferry duration formats Scenario: Testbot - Ferry duration formats
@ -194,12 +194,12 @@ Feature: Testbot - Handle ferry routes
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | ab | 60s +-1 | | a | b | ab,ab | 60s +-1 |
| c | d | cd | 60s +-1 | | c | d | cd,cd | 60s +-1 |
| e | f | ef | 3600s +-1 | | e | f | ef,ef | 3600s +-1 |
| g | h | gh | 3600s +-1 | | g | h | gh,gh | 3600s +-1 |
| i | j | ij | 8400s +-1 | | i | j | ij,ij | 8400s +-1 |
| k | l | kl | 36000s +-1 | | k | l | kl,kl | 36000s +-1 |
| m | n | mn | 360000s +-1 | | m | n | mn,mn | 360000s +-1 |
| o | p | mn | 3600000s +-1 | | o | p | mn,mn | 3600000s +-1 |
| q | r | mn | 36000000s +-1 | | q | r | mn,mn | 36000000s +-1 |

View File

@ -22,5 +22,5 @@ Feature: Fixed bugs, kept to check for regressions
| cdec | | cdec |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route |
| x | y | abc | head,destination | | x | y | abc,abc |

View File

@ -21,10 +21,8 @@ Feature: Retrieve geometry
| cd | | cd |
When I route I should get When I route I should get
| from | to | route | geometry | | from | to | route | geometry |
| a | c | ab,bc | _c`\|@_upzA_c`\|@_c`\|@_c`\|@_c`\|@ | | a | c | ab,bc,bc | _ibE_~cH_seK_seK |
| b | d | bc,cd | _gayB_yqwC_c`\|@_c`\|@_c`\|@_c`\|@ | | b | d | bc,cd,cd | _seK_hgN_seK_seK |
# Mind the \ before the pipes # Mind the \ before the pipes
# polycodec.rb decode2 '_c`|@_upzA_c`|@_c`|@_c`|@_c`|@' [[1.0, 1.5], [2.0, 2.5], [3.0, 3.5]]
# polycodec.rb decode2 '_gayB_yqwC_c`|@_c`|@_c`|@_c`|@' [[2.0, 2.5], [3.0, 3.5], [4.0, 4.5]]

View File

@ -17,8 +17,8 @@ Feature: Basic Routing
| dce | | dce |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | e | abc,dce | | a | e | abc,dce,dce |
Scenario: Turn instructions on compressed road network geometry Scenario: Turn instructions on compressed road network geometry
Given the node map Given the node map
@ -36,5 +36,5 @@ Feature: Basic Routing
| fy | last | | fy | last |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| x | y | first,compr,last | head,straight,straight,destination | | x | y | first,compr,last,last | depart,right,left,arrive |

View File

@ -17,8 +17,8 @@ Feature: Ways of loading data
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| b | a | ab | | b | a | ab,ab |
Scenario: Load data directly - st Scenario: Load data directly - st
Given data is loaded directly Given data is loaded directly
@ -31,8 +31,8 @@ Feature: Ways of loading data
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| s | t | st | | s | t | st,st |
| t | s | st | | t | s | st,st |
Scenario: Load data datastore - xy Scenario: Load data datastore - xy
Given data is loaded with datastore Given data is loaded with datastore
@ -45,8 +45,8 @@ Feature: Ways of loading data
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | y | xy | | x | y | xy,xy |
| y | x | xy | | y | x | xy,xy |
Scenario: Load data directly - cd Scenario: Load data directly - cd
Given data is loaded directly Given data is loaded directly
@ -59,5 +59,5 @@ Feature: Ways of loading data
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| c | d | cd | | c | d | cd,cd |
| d | c | cd | | d | c | cd,cd |

View File

@ -4,7 +4,7 @@ Feature: Avoid weird loops caused by rounding errors
Background: Background:
Given the profile "testbot" Given the profile "testbot"
Scenario: Weired sidestreet loops Scenario: Weird sidestreet loops
Given the node map Given the node map
| a | 1 | b | 2 | c | 3 | d | | a | 1 | b | 2 | c | 3 | d |
| | | | | | | | | | | | | | | |
@ -18,10 +18,10 @@ Feature: Avoid weird loops caused by rounding errors
| cg | | cg |
When I route I should get When I route I should get
| waypoints | route | turns | | waypoints | route |
| a,1,d | abcd,abcd | head,via,destination | | a,1,d | abcd,abcd,abcd,abcd |
| a,2,d | abcd,abcd | head,via,destination | | a,2,d | abcd,abcd,abcd,abcd |
| a,3,d | abcd,abcd | head,via,destination | | a,3,d | abcd,abcd,abcd,abcd |
Scenario: Avoid weird loops 1 Scenario: Avoid weird loops 1
Given the node locations Given the node locations
@ -47,8 +47,8 @@ Feature: Avoid weird loops caused by rounding errors
| ie | | ie |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route |
| x | y | hfgd | head,destination | | x | y | hfgd,hfgd |
Scenario: Avoid weird loops 2 Scenario: Avoid weird loops 2
Given the node locations Given the node locations
@ -67,8 +67,8 @@ Feature: Avoid weird loops caused by rounding errors
| cdec | | cdec |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route |
| x | y | abc | head,destination | | x | y | abc,abc |
@412 @412
Scenario: Avoid weird loops 3 Scenario: Avoid weird loops 3
@ -92,6 +92,6 @@ Feature: Avoid weird loops caused by rounding errors
| cf | primary | | cf | primary |
When I route I should get When I route I should get
| waypoints | route | turns | | waypoints | route |
| a,2,d | ab,be,ef,ef,cf,cd | head,left,straight,via,straight,left,destination | | a,2,d | ab,be,ef,ef,ef,cf,cd,cd |
| a,1,d | ab,be,ef,ef,cf,cd | head,left,straight,via,straight,left,destination | | a,1,d | ab,be,ef,ef,ef,cf,cd,cd |

View File

@ -5,6 +5,23 @@ Feature: Basic Map Matching
Given the profile "testbot" Given the profile "testbot"
Given a grid size of 10 meters Given a grid size of 10 meters
Scenario: Testbot - Map matching with outlier that has no candidate
Given a grid size of 100 meters
Given the node map
| a | b | c | d |
| | | | |
| | | | |
| | | | |
| | | 1 | |
And the ways
| nodes | oneway |
| abcd | no |
When I match I should get
| trace | timestamps | matchings |
| ab1d | 0 1 2 3 | abcd |
Scenario: Testbot - Map matching with trace splitting Scenario: Testbot - Map matching with trace splitting
Given the node map Given the node map
| a | b | c | d | | a | b | c | d |

View File

@ -1,105 +0,0 @@
@routing @turns @testbot
Feature: Turn directions/codes
Background:
Given the profile "testbot"
Scenario: Turn directions
Given the query options
| instructions | true |
Given the node map
| o | p | a | b | c |
| n | | | | d |
| m | | x | | e |
| l | | | | f |
| k | j | i | h | g |
And the ways
| nodes |
| xa |
| xc |
| xe |
| xg |
| xi |
| xk |
| xm |
| xo |
When I match I should get
| trace | route | turns | matchings |
| im | xi,xm | head,left,destination | im |
| io | xi,xo | head,slight_left,destination | io |
| ia | xi,xa | head,straight,destination | ia |
| ic | xi,xc | head,slight_right,destination | ic |
| ie | xi,xe | head,right,destination | ie |
| ko | xk,xo | head,left,destination | ko |
| ka | xk,xa | head,slight_left,destination | ka |
| kc | xk,xc | head,straight,destination | kc |
| ke | xk,xe | head,slight_right,destination | ke |
| kg | xk,xg | head,right,destination | kg |
| ma | xm,xa | head,left,destination | ma |
| mc | xm,xc | head,slight_left,destination | mc |
| me | xm,xe | head,straight,destination | me |
| mg | xm,xg | head,slight_right,destination | mg |
| mi | xm,xi | head,right,destination | mi |
| oc | xo,xc | head,left,destination | oc |
| oe | xo,xe | head,slight_left,destination | oe |
| og | xo,xg | head,straight,destination | og |
| oi | xo,xi | head,slight_right,destination | oi |
| ok | xo,xk | head,right,destination | ok |
| ae | xa,xe | head,left,destination | ae |
| ag | xa,xg | head,slight_left,destination | ag |
| ai | xa,xi | head,straight,destination | ai |
| ak | xa,xk | head,slight_right,destination | ak |
| am | xa,xm | head,right,destination | am |
| cg | xc,xg | head,left,destination | cg |
| ci | xc,xi | head,slight_left,destination | ci |
| ck | xc,xk | head,straight,destination | ck |
| cm | xc,xm | head,slight_right,destination | cm |
| co | xc,xo | head,right,destination | co |
| ei | xe,xi | head,left,destination | ei |
| ek | xe,xk | head,slight_left,destination | ek |
| em | xe,xm | head,straight,destination | em |
| eo | xe,xo | head,slight_right,destination | eo |
| ea | xe,xa | head,right,destination | ea |
| gk | xg,xk | head,left,destination | gk |
| gm | xg,xm | head,slight_left,destination | gm |
| go | xg,xo | head,straight,destination | go |
| ga | xg,xa | head,slight_right,destination | ga |
| gc | xg,xc | head,right,destination | gc |
Scenario: Turn directions
Given the query options
| instructions | true |
Given the node map
| o | p | a | b | c |
| n | | | | d |
| m | | x | | e |
| l | | | | f |
| k | j | i | h | g |
And the ways
| nodes |
| xa |
| xc |
| xe |
| xg |
| xi |
| xk |
| xm |
| xo |
When I match I should get
| trace | route | turns | matchings | duration |
| im | xi,xm | head,left,destination | im | 80 |
| io | xi,xo | head,slight_left,destination | io | 88 |
| ia | xi,xa | head,straight,destination | ia | 80 |
| ic | xi,xc | head,slight_right,destination | ic | 88 |
| ie | xi,xe | head,right,destination | ie | 60 |

View File

@ -2,7 +2,7 @@
Feature: Testbot - Travel mode Feature: Testbot - Travel mode
# testbot modes: # testbot modes:
# 1 normal # 1 driving
# 2 route # 2 route
# 3 river downstream # 3 river downstream
# 4 river upstream # 4 river upstream
@ -12,6 +12,7 @@ Feature: Testbot - Travel mode
Background: Background:
Given the profile "testbot" Given the profile "testbot"
@mokob @2166
Scenario: Testbot - Always announce mode change Scenario: Testbot - Always announce mode change
Given the node map Given the node map
| a | b | c | d | | a | b | c | d |
@ -23,10 +24,11 @@ Feature: Testbot - Travel mode
| cd | residential | foo | | cd | residential | foo |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | d | foo,foo,foo | 1,3,1 | | a | d | foo,foo,foo,foo | driving,river downstream,driving,driving |
| b | d | foo,foo | 3,1 | | b | d | foo,foo,foo | river downstream,driving,driving |
@mokob @2166
Scenario: Testbot - Compressed Modes Scenario: Testbot - Compressed Modes
Given the node map Given the node map
| a | b | c | d | e | f | g | | a | b | c | d | e | f | g |
@ -38,10 +40,11 @@ Feature: Testbot - Travel mode
| efg | residential | solid | | efg | residential | solid |
When I route I should get When I route I should get
| from | to | route | modes | turns | | from | to | route | modes |
| a | g | road,liquid,solid | 1,3,1 | head,straight,straight,destination | | a | g | road,liquid,solid,solid | driving,river downstream,driving,driving |
| c | g | liquid,solid | 3,1 | head,straight,destination | | c | g | liquid,solid,solid | river downstream,driving,driving |
@mokob @2166
Scenario: Testbot - Modes in each direction, different forward/backward speeds Scenario: Testbot - Modes in each direction, different forward/backward speeds
Given the node map Given the node map
| | 0 | 1 | | | | 0 | 1 | |
@ -52,15 +55,15 @@ Feature: Testbot - Travel mode
| ab | river | | | ab | river | |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | 0 | ab | 3 | | a | 0 | ab,ab | river downstream,river downstream |
| a | b | ab | 3 | | a | b | ab,ab | river downstream,river downstream |
| 0 | 1 | ab | 3 | | 0 | 1 | ab,ab | river downstream,river downstream |
| 0 | b | ab | 3 | | 0 | b | ab,ab | river downstream,river downstream |
| b | 1 | ab | 4 | | b | 1 | ab,ab | river upstream,river upstream |
| b | a | ab | 4 | | b | a | ab,ab | river upstream,river upstream |
| 1 | 0 | ab | 4 | | 1 | 0 | ab,ab | river upstream,river upstream |
| 1 | a | ab | 4 | | 1 | a | ab,ab | river upstream,river upstream |
Scenario: Testbot - Modes in each direction, same forward/backward speeds Scenario: Testbot - Modes in each direction, same forward/backward speeds
Given the node map Given the node map
@ -72,11 +75,11 @@ Feature: Testbot - Travel mode
| ab | steps | | ab | steps |
When I route I should get When I route I should get
| from | to | route | modes | time | | from | to | route | modes | time |
| 0 | 1 | ab | 5 | 60s +-1 | | 0 | 1 | ab,ab | steps down,steps down | 60s +-1 |
| 1 | 0 | ab | 6 | 60s +-1 | | 1 | 0 | ab,ab | steps up,steps up | 60s +-1 |
@oneway @oneway @mokob @2166
Scenario: Testbot - Modes for oneway, different forward/backward speeds Scenario: Testbot - Modes for oneway, different forward/backward speeds
Given the node map Given the node map
| a | b | | a | b |
@ -86,9 +89,9 @@ Feature: Testbot - Travel mode
| ab | river | yes | | ab | river | yes |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | b | ab | 3 | | a | b | ab,ab | river downstream,river downstream |
| b | a | | | | b | a | | |
@oneway @oneway
Scenario: Testbot - Modes for oneway, same forward/backward speeds Scenario: Testbot - Modes for oneway, same forward/backward speeds
@ -100,11 +103,11 @@ Feature: Testbot - Travel mode
| ab | steps | yes | | ab | steps | yes |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | b | ab | 5 | | a | b | ab,ab | steps down,steps down |
| b | a | | | | b | a | | |
@oneway @oneway @mokob @2166
Scenario: Testbot - Modes for reverse oneway, different forward/backward speeds Scenario: Testbot - Modes for reverse oneway, different forward/backward speeds
Given the node map Given the node map
| a | b | | a | b |
@ -114,9 +117,9 @@ Feature: Testbot - Travel mode
| ab | river | -1 | | ab | river | -1 |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | b | | | | a | b | | |
| b | a | ab | 4 | | b | a | ab,ab | river upstream,river upstream |
@oneway @oneway
Scenario: Testbot - Modes for reverse oneway, same forward/backward speeds Scenario: Testbot - Modes for reverse oneway, same forward/backward speeds
@ -128,11 +131,11 @@ Feature: Testbot - Travel mode
| ab | steps | -1 | | ab | steps | -1 |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | b | | | | a | b | | |
| b | a | ab | 6 | | b | a | ab,ab | steps up,steps up |
@via @via @mokob @2166
Scenario: Testbot - Mode should be set at via points Scenario: Testbot - Mode should be set at via points
Given the node map Given the node map
| a | 1 | b | | a | 1 | b |
@ -142,10 +145,11 @@ Feature: Testbot - Travel mode
| ab | river | | ab | river |
When I route I should get When I route I should get
| waypoints | route | modes | turns | | waypoints | route | modes |
| a,1,b | ab,ab | 3,3 | head,via,destination | | a,1,b | ab,ab,ab,ab | river downstream,river downstream,river downstream,river downstream |
| b,1,a | ab,ab | 4,4 | head,via,destination | | b,1,a | ab,ab,ab,ab | river upstream,river upstream,river upstream,river upstream |
@mokob @2166
Scenario: Testbot - Starting at a tricky node Scenario: Testbot - Starting at a tricky node
Given the node map Given the node map
| | a | | | | | | a | | | |
@ -157,9 +161,10 @@ Feature: Testbot - Travel mode
| bc | primary | | bc | primary |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| b | a | ab | 4 | | b | a | ab,ab | river upstream,river upstream |
@mokob @2166
Scenario: Testbot - Mode changes on straight way without name change Scenario: Testbot - Mode changes on straight way without name change
Given the node map Given the node map
| a | 1 | b | 2 | c | | a | 1 | b | 2 | c |
@ -170,11 +175,11 @@ Feature: Testbot - Travel mode
| bc | river | Avenue | | bc | river | Avenue |
When I route I should get When I route I should get
| from | to | route | modes | turns | | from | to | route | modes |
| a | c | Avenue,Avenue | 1,3 | head,straight,destination | | a | c | Avenue,Avenue,Avenue | driving,river downstream,river downstream |
| c | a | Avenue,Avenue | 4,1 | head,straight,destination | | c | a | Avenue,Avenue,Avenue | river upstream,driving,driving |
| 1 | 2 | Avenue,Avenue | 1,3 | head,straight,destination | | 1 | 2 | Avenue,Avenue,Avenue | driving,river downstream,river downstream |
| 2 | 1 | Avenue,Avenue | 4,1 | head,straight,destination | | 2 | 1 | Avenue,Avenue,Avenue | river upstream,driving,driving |
Scenario: Testbot - Mode for routes Scenario: Testbot - Mode for routes
Given the node map Given the node map
@ -190,15 +195,16 @@ Feature: Testbot - Travel mode
| ef | primary | | | | ef | primary | | |
When I route I should get When I route I should get
| from | to | route | turns | modes | | from | to | route | modes |
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 | | a | d | ab,bc,cd,cd | driving,route,driving,driving |
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 | | d | a | cd,bc,ab,ab | driving,route,driving,driving |
| c | a | bc,ab | head,left,destination | 2,1 | | c | a | bc,ab,ab | route,driving,driving |
| d | b | cd,bc | head,right,destination | 1,2 | | d | b | cd,bc,bc | driving,route,route |
| a | c | ab,bc | head,right,destination | 1,2 | | a | c | ab,bc,bc | driving,route,route |
| b | d | bc,cd | head,left,destination | 2,1 | | b | d | bc,cd,cd | route,driving,driving |
| a | f | ab,bc,cd,de,ef | head,right,left,straight,straight,destination | 1,2,1,1,1 | | a | f | ab,bc,cd,de,ef,ef | driving,route,driving,driving,driving,driving |
@mokob @2166
Scenario: Testbot - Modes, triangle map Scenario: Testbot - Modes, triangle map
Given the node map Given the node map
| | | | | | | d | | | | | | | | d |
@ -217,22 +223,23 @@ Feature: Testbot - Travel mode
| de | primary | | | de | primary | |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| 0 | 1 | abc,ce,de | 1,3,1 | | 0 | 1 | abc,ce,de,de | driving,river downstream,driving,driving |
| 1 | 0 | de,ce,abc | 1,4,1 | | 1 | 0 | de,ce,abc,abc | driving,river upstream,driving,driving |
| 0 | 2 | abc,cd | 1,1 | | 0 | 2 | abc,cd,cd | driving,driving,driving |
| 2 | 0 | cd,de,ce,abc | 1,1,4,1 | | 2 | 0 | cd,de,ce,abc,abc | driving,driving,river upstream,driving,driving |
| 0 | 3 | abc,ce | 1,3 | | 0 | 3 | abc,ce,ce | driving,river downstream,river downstream |
| 3 | 0 | ce,abc | 4,1 | | 3 | 0 | ce,abc,abc | river upstream,driving,driving |
| 4 | 3 | ce | 3 | | 4 | 3 | ce,ce | river downstream,river downstream |
| 3 | 4 | ce | 4 | | 3 | 4 | ce,ce | river upstream,river upstream |
| 3 | 1 | ce,de | 3,1 | | 3 | 1 | ce,de,de | river downstream,driving,driving |
| 1 | 3 | de,ce | 1,4 | | 1 | 3 | de,ce,ce | driving,river upstream,river upstream |
| a | e | abc,ce | 1,3 | | a | e | abc,ce,ce | driving,river downstream,river downstream |
| e | a | ce,abc | 4,1 | | e | a | ce,abc,abc | river upstream,driving,driving |
| a | d | abc,cd | 1,1 | | a | d | abc,cd,cd | driving,driving,driving |
| d | a | de,ce,abc | 1,4,1 | | d | a | de,ce,abc,abc | driving,river upstream,driving,driving |
@mokob @2166
Scenario: Testbot - River in the middle Scenario: Testbot - River in the middle
Given the node map Given the node map
| a | b | c | | | | a | b | c | | |
@ -246,12 +253,12 @@ Feature: Testbot - Travel mode
| efg | primary | | efg | primary |
When I route I should get When I route I should get
| from | to | route | modes | | from | to | route | modes |
| a | g | abc,cde,efg | 1,3,1 | | a | g | abc,cde,efg,efg | driving,river downstream,driving,driving |
| b | f | abc,cde,efg | 1,3,1 | | b | f | abc,cde,efg,efg | driving,river downstream,driving,driving |
| e | c | cde | 4 | | e | c | cde,cde | river upstream,river upstream |
| e | b | cde,abc | 4,1 | | e | b | cde,abc,abc | river upstream,driving,driving |
| e | a | cde,abc | 4,1 | | e | a | cde,abc,abc | river upstream,driving,driving |
| c | e | cde | 3 | | c | e | cde,cde | river downstream,river downstream |
| c | f | cde,efg | 3,1 | | c | f | cde,efg,efg | river downstream,driving,driving |
| c | g | cde,efg | 3,1 | | c | g | cde,efg,efg | river downstream,driving,driving |

View File

@ -29,23 +29,23 @@ Feature: Testbot - oneways
| xe | yes | | xe | yes |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| b | c | bc | | b | c | bc,bc |
| c | d | cd | | c | d | cd,cd |
| d | e | de | | d | e | de,de |
| e | f | ef | | e | f | ef,ef |
| f | g | fg | | f | g | fg,fg |
| g | h | gh | | g | h | gh,gh |
| h | a | ha | | h | a | ha,ha |
| b | a | bc,cd,de,ef,fg,gh,ha | | b | a | bc,cd,de,ef,fg,gh,ha,ha |
| c | b | cd,de,ef,fg,gh,ha,ab | | c | b | cd,de,ef,fg,gh,ha,ab,ab |
| d | c | de,ef,fg,gh,ha,ab,bc | | d | c | de,ef,fg,gh,ha,ab,bc,bc |
| e | d | ef,fg,gh,ha,ab,bc,cd | | e | d | ef,fg,gh,ha,ab,bc,cd,cd |
| f | e | fg,gh,ha,ab,bc,cd,de | | f | e | fg,gh,ha,ab,bc,cd,de,de |
| g | f | gh,ha,ab,bc,cd,de,ef | | g | f | gh,ha,ab,bc,cd,de,ef,ef |
| h | g | ha,ab,bc,cd,de,ef,fg | | h | g | ha,ab,bc,cd,de,ef,fg,fg |
| a | h | ab,bc,cd,de,ef,fg,gh | | a | h | ab,bc,cd,de,ef,fg,gh,gh |
Scenario: Testbot - Simple oneway Scenario: Testbot - Simple oneway
Then routability should be Then routability should be
@ -70,9 +70,9 @@ Feature: Testbot - oneways
| da | | no | | da | | no |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| b | a | bc,cd,da | | b | a | bc,cd,da,da |
Scenario: Testbot - Handle various oneway tag values Scenario: Testbot - Handle various oneway tag values
Then routability should be Then routability should be
@ -98,5 +98,5 @@ Feature: Testbot - oneways
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | ab,bc | | a | c | ab,bc,bc |

View File

@ -13,6 +13,6 @@ Feature: Separate settings for forward/backward direction
| abcd | river | | abcd | river |
When I route I should get When I route I should get
| from | to | route | distance | speed | | from | to | route | distance | speed |
| a | d | abcd | 300 +- 1m | 36 km/h | | a | d | abcd,abcd | 300 +- 1m | 36 km/h |
| d | a | abcd | 300 +- 1m | 16 km/h +- 1 | | d | a | abcd,abcd | 300 +- 1m | 16 km/h +- 1 |

View File

@ -17,9 +17,9 @@ Feature: Routing close to the [0,0] origin
| abcd | yes | | abcd | yes |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| b | c | abcd | 100m +-1 | | b | c | abcd,abcd | 100m +-1 |
| c | b | | | | c | b | | |
Scenario: North-south oneways close to the origin Scenario: North-south oneways close to the origin
Given the node locations Given the node locations
@ -34,9 +34,9 @@ Feature: Routing close to the [0,0] origin
| abcd | yes | | abcd | yes |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| b | c | abcd | 100m +-1 | | b | c | abcd,abcd | 100m +-1 |
| c | b | | | | c | b | | |
Scenario: East-west oneways crossing the origin Scenario: East-west oneways crossing the origin
Given the node locations Given the node locations
@ -52,9 +52,9 @@ Feature: Routing close to the [0,0] origin
| abcde | yes | | abcde | yes |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| b | d | abcde | 200m +-2 | | b | d | abcde,abcde | 200m +-2 |
| d | b | | | | d | b | | |
Scenario: North-south oneways crossing the origin Scenario: North-south oneways crossing the origin
Given the node locations Given the node locations
@ -70,6 +70,6 @@ Feature: Routing close to the [0,0] origin
| abcde | yes | | abcde | yes |
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| b | d | abcde | 200m +-2 | | b | d | abcde,abcde | 200m +-2 |
| d | b | | | | d | b | | |

View File

@ -20,9 +20,9 @@ Feature: Penalties
| def | | def |
When I route I should get When I route I should get
| from | to | route | time | distance | | from | to | route | time | distance |
| a | c | abc | 20s +-1 | 200m +-1 | | a | c | abc,abc | 20s +-1 | 200m +-1 |
| d | f | def | 27s +-1 | 200m +-1 | | d | f | def,def | 27s +-1 | 200m +-1 |
Scenario: Signal penalty should not depend on way type Scenario: Signal penalty should not depend on way type
Given the node map Given the node map
@ -43,10 +43,10 @@ Feature: Penalties
| ghi | tertiary | | ghi | tertiary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | c | abc | 27s +-1 | | a | c | abc,abc | 27s +-1 |
| d | f | def | 47s +-1 | | d | f | def,def | 47s +-1 |
| g | i | ghi | 67s +-1 | | g | i | ghi,ghi | 67s +-1 |
Scenario: Passing multiple traffic signals should incur a accumulated delay Scenario: Passing multiple traffic signals should incur a accumulated delay
Given the node map Given the node map
@ -63,8 +63,8 @@ Feature: Penalties
| abcde | | abcde |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | e | abcde | 61s +-1 | | a | e | abcde,abcde | 61s +-1 |
@todo @todo
Scenario: Signal penalty should not depend on way type Scenario: Signal penalty should not depend on way type
@ -86,13 +86,13 @@ Feature: Penalties
| ghi | tertiary | | ghi | tertiary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | abc | 10s +-1 | | a | b | abc,abc | 10s +-1 |
| a | c | abc | 27s +-1 | | a | c | abc,abc | 27s +-1 |
| d | e | def | 20s +-1 | | d | e | def,def | 20s +-1 |
| d | f | def | 47s +-1 | | d | f | def,def | 47s +-1 |
| g | h | ghi | 30s +-1 | | g | h | ghi,ghi | 30s +-1 |
| g | i | ghi | 67s +-1 | | g | i | ghi,ghi | 67s +-1 |
Scenario: Passing multiple traffic signals should incur a accumulated delay Scenario: Passing multiple traffic signals should incur a accumulated delay
Given the node map Given the node map
@ -109,8 +109,8 @@ Feature: Penalties
| abcde | | abcde |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | e | abcde | 61s +-1 | | a | e | abcde,abcde | 61s +-1 |
@todo @todo
Scenario: Starting or ending at a traffic signal should not incur a delay Scenario: Starting or ending at a traffic signal should not incur a delay
@ -144,9 +144,9 @@ Feature: Penalties
| abcd | primary | | abcd | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| b | c | abcd | 10s +-1 | | b | c | abcd,abcd | 10s +-1 |
| c | b | abcd | 10s +-1 | | c | b | abcd,abcd | 10s +-1 |
Scenario: Prefer faster route without traffic signals Scenario: Prefer faster route without traffic signals
Given a grid size of 50 meters Given a grid size of 50 meters
@ -164,5 +164,5 @@ Feature: Penalties
| adc | primary | | adc | primary |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | adc | | a | c | adc,adc |

View File

@ -13,7 +13,7 @@ Feature: Distance calculation
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | ab | 8905559m ~0.1% | | a | b | ab,ab | 8905559m ~0.1% |
Scenario: Approximated Longitudinal distances at latitude 45 Scenario: Approximated Longitudinal distances at latitude 45
Given the node locations Given the node locations
@ -27,7 +27,7 @@ Feature: Distance calculation
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| c | d | cd | 6028844m ~4.5% | | c | d | cd,cd | 6028844m ~4.5% |
Scenario: Approximated Longitudinal distances at latitude 80 Scenario: Approximated Longitudinal distances at latitude 80
Given the node locations Given the node locations
@ -41,7 +41,7 @@ Feature: Distance calculation
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| c | d | cd | 1431469m ~9.5% | | c | d | cd,cd | 1431469m ~9.5% |
Scenario: Approximated Latitudinal distances at longitude 0 Scenario: Approximated Latitudinal distances at longitude 0
Given the node locations Given the node locations
@ -55,7 +55,7 @@ Feature: Distance calculation
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | ab | 8905559m ~0.1% | | a | b | ab,ab | 8905559m ~0.1% |
Scenario: Approximated Latitudinal distances at longitude 45 Scenario: Approximated Latitudinal distances at longitude 45
Given the node locations Given the node locations
@ -69,7 +69,7 @@ Feature: Distance calculation
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | ab | 8905559m ~0.1% | | a | b | ab,ab | 8905559m ~0.1% |
Scenario: Approximated Latitudinal distances at longitude 80 Scenario: Approximated Latitudinal distances at longitude 80
Given the node locations Given the node locations
@ -83,4 +83,4 @@ Feature: Distance calculation
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| a | b | ab | 8905559m ~0.1% | | a | b | ab,ab | 8905559m ~0.1% |

View File

@ -1,83 +0,0 @@
@post @testbot
Feature: POST request
Background:
Given the profile "testbot"
And the HTTP method "POST"
Scenario: Testbot - viaroute POST request
Given the node locations
| node | lat | lon |
| a | 55.68740 | 12.52430 |
| b | 55.68745 | 12.52409 |
| c | 55.68711 | 12.52383 |
| x | -55.68740 | 12.52430 |
| y | -55.68745 | 12.52409 |
| z | -55.68711 | 12.52383 |
And the ways
| nodes |
| ab |
| bc |
| xy |
| yz |
When I route I should get
| from | to | route | turns |
| a | c | ab,bc | head,straight,destination |
| c | a | bc,ab | head,straight,destination |
| x | z | xy,yz | head,straight,destination |
| z | x | yz,xy | head,straight,destination |
Scenario: Testbot - match POST request
Given a grid size of 10 meters
Given the node map
| a | b | c | d |
| e | f | g | h |
And the ways
| nodes | oneway |
| abcd | yes |
| hgfe | yes |
When I match I should get
| trace | matchings |
| dcba | hgfe |
Scenario: Testbot - table POST request
Given the node map
| x | a | b | y |
| | d | e | |
And the ways
| nodes | oneway |
| abeda | yes |
| xa | |
| by | |
When I request a travel time matrix I should get
| | x | y | d | e |
| x | 0 | 300 | 400 | 300 |
| y | 500 | 0 | 300 | 200 |
| d | 200 | 300 | 0 | 300 |
| e | 300 | 400 | 100 | 0 |
Scenario: Testbot - nearest POST request
Given the node locations
| node | lat | lon |
| a | -85 | -180 |
| b | -85 | -160 |
| c | -85 | -140 |
| x | -84.999 | -180 |
| y | -84.999 | -160 |
| z | -84.999 | -140 |
And the ways
| nodes |
| abc |
When I request nearest I should get
| in | out |
| x | a |
| y | b |
| z | c |

View File

@ -23,16 +23,16 @@ Feature: Projection to nearest point on road
Scenario: Projection onto way at high latitudes, 1km distance Scenario: Projection onto way at high latitudes, 1km distance
When I route I should get When I route I should get
| from | to | route | compass | bearing | distance | | from | to | route | bearing | distance |
| b | a | abc | SW | 225 | 1000m +-7 | | b | a | abc,abc | 225,0 +-1 | 1000m +- 7 |
| b | c | abc | NE | 45 | 1000m +-7 | | b | c | abc,abc | 45,0 +-1 | 1000m +- 7 |
| a | d | abc | NE | 45 | 1000m +-7 | | a | d | abc,abc | 45,0 +-1 | 1000m +- 7 |
| d | a | abc | SW | 225 | 1000m +-7 | | d | a | abc,abc | 225,0 +-1 | 1000m +- 7 |
| c | d | abc | SW | 225 | 1000m +-8 | | c | d | abc,abc | 225,0 +-1 | 1000m +- 8 |
| d | c | abc | NE | 45 +-5 | 1000m +-8 | | d | c | abc,abc | 45 +-1 | 1000m +- 8 |
Scenario: Projection onto way at high latitudes, no distance Scenario: Projection onto way at high latitudes, no distance
When I route I should get When I route I should get
| from | to | route | distance | | from | to | route | distance |
| d | b | abc | 0m +-5 | | d | b | abc,abc | 0m +-5 |
| b | d | abc | 0m +-5 | | b | d | abc,abc | 0m +-5 |

View File

@ -21,19 +21,19 @@ Feature: Roundabout Instructions
| abcda | roundabout | | abcda | roundabout |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| s | t | sa,tb | head,enter_roundabout-1,destination | | s | t | sa,tb,tb | depart,roundabout-exit-1,arrive |
| s | u | sa,uc | head,enter_roundabout-2,destination | | s | u | sa,uc,uc | depart,roundabout-exit-2,arrive |
| s | v | sa,vd | head,enter_roundabout-3,destination | | s | v | sa,vd,vd | depart,roundabout-exit-3,arrive |
| t | u | tb,uc | head,enter_roundabout-1,destination | | t | u | tb,uc,uc | depart,roundabout-exit-1,arrive |
| t | v | tb,vd | head,enter_roundabout-2,destination | | t | v | tb,vd,vd | depart,roundabout-exit-2,arrive |
| t | s | tb,sa | head,enter_roundabout-3,destination | | t | s | tb,sa,sa | depart,roundabout-exit-3,arrive |
| u | v | uc,vd | head,enter_roundabout-1,destination | | u | v | uc,vd,vd | depart,roundabout-exit-1,arrive |
| u | s | uc,sa | head,enter_roundabout-2,destination | | u | s | uc,sa,sa | depart,roundabout-exit-2,arrive |
| u | t | uc,tb | head,enter_roundabout-3,destination | | u | t | uc,tb,tb | depart,roundabout-exit-3,arrive |
| v | s | vd,sa | head,enter_roundabout-1,destination | | v | s | vd,sa,sa | depart,roundabout-exit-1,arrive |
| v | t | vd,tb | head,enter_roundabout-2,destination | | v | t | vd,tb,tb | depart,roundabout-exit-2,arrive |
| v | u | vd,uc | head,enter_roundabout-3,destination | | v | u | vd,uc,uc | depart,roundabout-exit-3,arrive |
Scenario: Testbot - Roundabout with oneway links Scenario: Testbot - Roundabout with oneway links
Given the node map Given the node map
@ -57,20 +57,20 @@ Feature: Roundabout Instructions
| abcdefgha | roundabout | | | abcdefgha | roundabout | |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| j | k | jb,ck | head,enter_roundabout-1,destination | | j | k | jb,ck,ck | depart,roundabout-exit-1,arrive |
| j | m | jb,em | head,enter_roundabout-2,destination | | j | m | jb,em,em | depart,roundabout-exit-2,arrive |
| j | o | jb,go | head,enter_roundabout-3,destination | | j | o | jb,go,go | depart,roundabout-exit-3,arrive |
| j | i | jb,ai | head,enter_roundabout-4,destination | | j | i | jb,ai,ai | depart,roundabout-exit-4,arrive |
| l | m | ld,em | head,enter_roundabout-1,destination | | l | m | ld,em,em | depart,roundabout-exit-1,arrive |
| l | o | ld,go | head,enter_roundabout-2,destination | | l | o | ld,go,go | depart,roundabout-exit-2,arrive |
| l | i | ld,ai | head,enter_roundabout-3,destination | | l | i | ld,ai,ai | depart,roundabout-exit-3,arrive |
| l | k | ld,ck | head,enter_roundabout-4,destination | | l | k | ld,ck,ck | depart,roundabout-exit-4,arrive |
| n | o | nf,go | head,enter_roundabout-1,destination | | n | o | nf,go,go | depart,roundabout-exit-1,arrive |
| n | i | nf,ai | head,enter_roundabout-2,destination | | n | i | nf,ai,ai | depart,roundabout-exit-2,arrive |
| n | k | nf,ck | head,enter_roundabout-3,destination | | n | k | nf,ck,ck | depart,roundabout-exit-3,arrive |
| n | m | nf,em | head,enter_roundabout-4,destination | | n | m | nf,em,em | depart,roundabout-exit-4,arrive |
| p | i | ph,ai | head,enter_roundabout-1,destination | | p | i | ph,ai,ai | depart,roundabout-exit-1,arrive |
| p | k | ph,ck | head,enter_roundabout-2,destination | | p | k | ph,ck,ck | depart,roundabout-exit-2,arrive |
| p | m | ph,em | head,enter_roundabout-3,destination | | p | m | ph,em,em | depart,roundabout-exit-3,arrive |
| p | o | ph,go | head,enter_roundabout-4,destination | | p | o | ph,go,go | depart,roundabout-exit-4,arrive |

View File

@ -21,14 +21,14 @@ Feature: Snap start/end point to the nearest way
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| 1 | c | nc | | 1 | c | nc,nc |
| 2 | c | nc | | 2 | c | nc,nc |
| 3 | c | ec | | 3 | c | ec,ec |
| 4 | c | ec | | 4 | c | ec,ec |
| 5 | c | sc | | 5 | c | sc,sc |
| 6 | c | sc | | 6 | c | sc,sc |
| 7 | c | wc | | 7 | c | wc,wc |
| 8 | c | wc | | 8 | c | wc,wc |
Scenario: Snap to nearest edge of a square Scenario: Snap to nearest edge of a square
Given the node map Given the node map
@ -43,11 +43,11 @@ Feature: Snap start/end point to the nearest way
| adb | | adb |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| 1 | b | adb | | 1 | b | adb,adb |
| 2 | b | adb | | 2 | b | adb,adb |
| 6 | b | aub | | 6 | b | aub,aub |
| 7 | b | aub | | 7 | b | aub,aub |
Scenario: Snap to edge right under start/end point Scenario: Snap to edge right under start/end point
Given the node map Given the node map
@ -64,17 +64,17 @@ Feature: Snap start/end point to the nearest way
| jkla | | jkla |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abcd | | a | b | abcd,abcd |
| a | c | abcd | | a | c | abcd,abcd |
| a | d | abcd | | a | d | abcd,abcd |
| a | e | abcd,defg | | a | e | abcd,defg,defg |
| a | f | abcd,defg | | a | f | abcd,defg,defg |
| a | h | jkla,ghij | | a | h | jkla,ghij,ghij |
| a | i | jkla,ghij | | a | i | jkla,ghij,ghij |
| a | j | jkla | | a | j | jkla,jkla |
| a | k | jkla | | a | k | jkla,jkla |
| a | l | jkla | | a | l | jkla,jkla |
Scenario: Snapping in viaroute Scenario: Snapping in viaroute
Given the extract extra arguments "--small-component-size 4" Given the extract extra arguments "--small-component-size 4"
@ -92,9 +92,9 @@ Feature: Snap start/end point to the nearest way
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| a | d | cd | | a | d | cd,cd |
| c | d | cd | | c | d | cd,cd |
Scenario: Snap to correct way at large scales Scenario: Snap to correct way at large scales
Given a grid size of 1000 meters Given a grid size of 1000 meters
@ -111,12 +111,12 @@ Feature: Snap start/end point to the nearest way
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | a | xa | | x | a | xa,xa |
| x | b | xb | | x | b | xb,xb |
| x | c | xc | | x | c | xc,xc |
| a | x | xa | | a | x | xa,xa |
| b | x | xb | | b | x | xb,xb |
| c | x | xc | | c | x | xc,xc |
Scenario: Find edges within 100m, and the same from 1km Scenario: Find edges within 100m, and the same from 1km
Given a grid size of 100 meters Given a grid size of 100 meters
@ -152,19 +152,19 @@ Feature: Snap start/end point to the nearest way
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| x | 1 | xa | | x | 1 | xa,xa |
| x | 2 | xb | | x | 2 | xb,xb |
| x | 3 | xc | | x | 3 | xc,xc |
| x | 4 | xd | | x | 4 | xd,xd |
| x | 5 | xe | | x | 5 | xe,xe |
| x | 6 | xf | | x | 6 | xf,xf |
| x | 7 | xg | | x | 7 | xg,xg |
| x | 8 | xh | | x | 8 | xh,xh |
| x | i | xa | | x | i | xa,xa |
| x | j | xb | | x | j | xb,xb |
| x | k | xc | | x | k | xc,xc |
| x | l | xd | | x | l | xd,xd |
| x | m | xe | | x | m | xe,xe |
| x | n | xf | | x | n | xf,xf |
| x | o | xg | | x | o | xg,xg |
| x | p | xh | | x | p | xh,xh |

View File

@ -26,6 +26,6 @@ Feature: Testbot - speeds
| ab | river | | ab | river |
When I route I should get When I route I should get
| from | to | route | speed | time | distance | | from | to | route | speed | time | distance |
| a | b | ab | 36 km/h | 10s | 100m | | a | b | ab,ab | 36 km/h | 10s +-1 | 100m +- 1 |
| b | a | ab | 16 km/h +- 1 | 23s | 100m | | b | a | ab,ab | 16 km/h +- 1 | 23s +-1 | 100m +- 1 |

View File

@ -14,8 +14,8 @@ Feature: Status messages
When I route I should get When I route I should get
| from | to | route | status | message | | from | to | route | status | message |
| a | b | ab | 200 | Found route between points | | a | b | ab,ab | 200 | |
| b | a | ab | 200 | Found route between points | | b | a | ab,ab | 200 | |
Scenario: No route found Scenario: No route found
Given the node map Given the node map
@ -30,38 +30,38 @@ Feature: Status messages
When I route I should get When I route I should get
| from | to | route | status | message | | from | to | route | status | message |
| a | b | ab | 200 | Found route between points | | a | b | ab,ab | 200 | |
| c | d | cd | 200 | Found route between points | | c | d | cd,cd | 200 | |
| a | c | | 207 | Impossible route between points | | a | c | | 400 | Impossible route between points |
| b | d | | 207 | Impossible route between points | | b | d | | 400 | Impossible route between points |
Scenario: Malformed requests Scenario: Malformed requests
Given the node locations Given the node locations
| node | lat | lon | | node | lat | lon |
| a | 1.00 | 1.00 | | a | 1.00 | 1.00 |
| b | 1.01 | 1.00 | | b | 2.00 | 1.00 |
And the ways And the ways
| nodes | | nodes |
| ab | | ab |
When I route I should get When I route I should get
| request | status | message | | request | status | message |
| viaroute?loc=1,1&loc=1.01,1 | 200 | Found route between points | | route/v1/driving/1,1;1,2 | 200 | |
| nonsense | 400 | Service not found | | nonsense | 400 | URL string malformed close to position 0: "/no" |
| nonsense?loc=1,1&loc=1.01,1 | 400 | Service not found | | nonsense/v1/driving/1,1;1,2 | 400 | Service nonsense not found! |
| | 400 | Query string malformed close to position 0 | | | 400 | URL string malformed close to position 0: "/" |
| / | 400 | Query string malformed close to position 0 | | / | 400 | URL string malformed close to position 0: "//" |
| ? | 400 | Query string malformed close to position 0 | | ? | 400 | URL string malformed close to position 0: "/?" |
| viaroute?loc= | 400 | Query string malformed close to position 9 | | route/v1/driving | 400 | URL string malformed close to position 0: "/ro" |
| viaroute?loc=1 | 400 | Query string malformed close to position 9 | | route/v1/driving/ | 400 | URL string malformed close to position 0: "/ro" |
| viaroute?loc=1,1 | 400 | Invalid coordinates | | route/v1/driving/1 | 400 | Query string malformed close to position 0 |
| viaroute?loc=1,1,1 | 400 | Query string malformed close to position 17 | | route/v1/driving/1,1 | 400 | Number of coordinates needs to be at least two. |
| viaroute?loc=x | 400 | Query string malformed close to position 9 | | route/v1/driving/1,1,1 | 400 | Query string malformed close to position 3 |
| viaroute?loc=x,y | 400 | Query string malformed close to position 9 | | route/v1/driving/x | 400 | Query string malformed close to position 0 |
| viaroute?loc=1,1&loc= | 400 | Query string malformed close to position 17 | | route/v1/driving/x,y | 400 | Query string malformed close to position 0 |
| viaroute?loc=1,1&loc=1 | 400 | Query string malformed close to position 17 | | route/v1/driving/1,1; | 400 | Query string malformed close to position 3 |
| viaroute?loc=1,1&loc=1,1 | 200 | Found route between points | | route/v1/driving/1,1;1 | 400 | Query string malformed close to position 3 |
| viaroute?loc=1,1&loc=1,1,1 | 400 | Query string malformed close to position 25 | | route/v1/driving/1,1;1,1,1 | 400 | Query string malformed close to position 7 |
| viaroute?loc=1,1&loc=x | 400 | Query string malformed close to position 17 | | route/v1/driving/1,1;x | 400 | Query string malformed close to position 3 |
| viaroute?loc=1,1&loc=x,y | 400 | Query string malformed close to position 17 | | route/v1/driving/1,1;x,y | 400 | Query string malformed close to position 3 |

View File

@ -27,15 +27,15 @@ Feature: Estimation of travel time
| xh | primary | | xh | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| x | a | xa | 1s +-1 | | x | a | xa,xa | 1s +-1 |
| x | b | xb | 1s +-1 | | x | b | xb,xb | 1s +-1 |
| x | c | xc | 1s +-1 | | x | c | xc,xc | 1s +-1 |
| x | d | xd | 1s +-1 | | x | d | xd,xd | 1s +-1 |
| x | e | xe | 1s +-1 | | x | e | xe,xe | 1s +-1 |
| x | f | xf | 1s +-1 | | x | f | xf,xf | 1s +-1 |
| x | g | xg | 1s +-1 | | x | g | xg,xg | 1s +-1 |
| x | h | xh | 1s +-1 | | x | h | xh,xh | 1s +-1 |
Scenario: Basic travel time, 100m scale Scenario: Basic travel time, 100m scale
Given a grid size of 100 meters Given a grid size of 100 meters
@ -56,15 +56,15 @@ Feature: Estimation of travel time
| xh | primary | | xh | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| x | a | xa | 10s +-1 | | x | a | xa,xa | 10s +-1 |
| x | b | xb | 14s +-1 | | x | b | xb,xb | 14s +-1 |
| x | c | xc | 10s +-1 | | x | c | xc,xc | 10s +-1 |
| x | d | xd | 14s +-1 | | x | d | xd,xd | 14s +-1 |
| x | e | xe | 10s +-1 | | x | e | xe,xe | 10s +-1 |
| x | f | xf | 14s +-1 | | x | f | xf,xf | 14s +-1 |
| x | g | xg | 10s +-1 | | x | g | xg,xg | 10s +-1 |
| x | h | xh | 14s +-1 | | x | h | xh,xh | 14s +-1 |
Scenario: Basic travel time, 1km scale Scenario: Basic travel time, 1km scale
Given a grid size of 1000 meters Given a grid size of 1000 meters
@ -85,15 +85,15 @@ Feature: Estimation of travel time
| xh | primary | | xh | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| x | a | xa | 100s +-1 | | x | a | xa,xa | 100s +-1 |
| x | b | xb | 141s +-1 | | x | b | xb,xb | 141s +-1 |
| x | c | xc | 100s +-1 | | x | c | xc,xc | 100s +-1 |
| x | d | xd | 141s +-1 | | x | d | xd,xd | 141s +-1 |
| x | e | xe | 100s +-1 | | x | e | xe,xe | 100s +-1 |
| x | f | xf | 141s +-1 | | x | f | xf,xf | 141s +-1 |
| x | g | xg | 100s +-1 | | x | g | xg,xg | 100s +-1 |
| x | h | xh | 141s +-1 | | x | h | xh,xh | 141s +-1 |
Scenario: Basic travel time, 10km scale Scenario: Basic travel time, 10km scale
Given a grid size of 10000 meters Given a grid size of 10000 meters
@ -114,15 +114,15 @@ Feature: Estimation of travel time
| xh | primary | | xh | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| x | a | xa | 1000s +-1 | | x | a | xa,xa | 1000s +-1 |
| x | b | xb | 1414s +-1 | | x | b | xb,xb | 1414s +-1 |
| x | c | xc | 1000s +-1 | | x | c | xc,xc | 1000s +-1 |
| x | d | xd | 1414s +-1 | | x | d | xd,xd | 1414s +-1 |
| x | e | xe | 1000s +-1 | | x | e | xe,xe | 1000s +-1 |
| x | f | xf | 1414s +-1 | | x | f | xf,xf | 1414s +-1 |
| x | g | xg | 1000s +-1 | | x | g | xg,xg | 1000s +-1 |
| x | h | xh | 1414s +-1 | | x | h | xh,xh | 1414s +-1 |
Scenario: Time of travel depending on way type Scenario: Time of travel depending on way type
Given the node map Given the node map
@ -138,10 +138,10 @@ Feature: Estimation of travel time
| ace | something | | ace | something |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | ab | 10s +-1 | | a | b | ab,ab | 10s +-1 |
| c | d | cd | 20s +-1 | | c | d | cd,cd | 20s +-1 |
| e | f | ef | 30s +-1 | | e | f | ef,ef | 30s +-1 |
Scenario: Time of travel on a series of ways Scenario: Time of travel on a series of ways
Given the node map Given the node map
@ -155,10 +155,10 @@ Feature: Estimation of travel time
| cd | primary | | cd | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | ab | 10s +-1 | | a | b | ab,ab | 10s +-1 |
| a | c | ab,bc | 20s +-1 | | a | c | ab,bc,bc | 20s +-1 |
| a | d | ab,bc,cd | 30s +-1 | | a | d | ab,bc,cd,cd | 30s +-1 |
Scenario: Time of travel on a winding way Scenario: Time of travel on a winding way
Given the node map Given the node map
@ -171,10 +171,10 @@ Feature: Estimation of travel time
| abcdefghi | primary | | abcdefghi | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| a | b | abcdefghi | 10s +-1 | | a | b | abcdefghi,abcdefghi | 10s +-1 |
| a | e | abcdefghi | 40s +-1 | | a | e | abcdefghi,abcdefghi | 40s +-1 |
| a | i | abcdefghi | 80s +-1 | | a | i | abcdefghi,abcdefghi | 80s +-1 |
Scenario: Time of travel on combination of road types Scenario: Time of travel on combination of road types
Given the node map Given the node map
@ -188,11 +188,11 @@ Feature: Estimation of travel time
| cde | tertiary | | cde | tertiary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| b | c | abc | 10s +-1 | | b | c | abc,abc | 10s +-1 |
| c | e | cde | 60s +-1 | | c | e | cde,cde | 60s +-1 |
| b | d | abc,cde | 40s +-1 | | b | d | abc,cde,cde | 40s +-1 |
| a | e | abc,cde | 80s +-1 | | a | e | abc,cde,cde | 80s +-1 |
Scenario: Time of travel on part of a way Scenario: Time of travel on part of a way
Given the node map Given the node map
@ -206,13 +206,13 @@ Feature: Estimation of travel time
| ab | primary | | ab | primary |
When I route I should get When I route I should get
| from | to | route | time | | from | to | route | time |
| 1 | 2 | ab | 10s +-1 | | 1 | 2 | ab,ab | 10s +-1 |
| 1 | 3 | ab | 20s +-1 | | 1 | 3 | ab,ab | 20s +-1 |
| 1 | 4 | ab | 30s +-1 | | 1 | 4 | ab,ab | 30s +-1 |
| 4 | 3 | ab | 10s +-1 | | 4 | 3 | ab,ab | 10s +-1 |
| 4 | 2 | ab | 20s +-1 | | 4 | 2 | ab,ab | 20s +-1 |
| 4 | 1 | ab | 30s +-1 | | 4 | 1 | ab,ab | 30s +-1 |
Scenario: Total travel time should match sum of times of individual ways Scenario: Total travel time should match sum of times of individual ways
Given a grid size of 1000 meters Given a grid size of 1000 meters
@ -228,10 +228,10 @@ Feature: Estimation of travel time
| cd | primary | | cd | primary |
When I route I should get When I route I should get
| from | to | route | distances | distance | times | time | | from | to | route | distances | distance | times | time |
| a | b | ab | 1000m +-1 | 1000m +-1 | 100s +-1 | 100s +-1 | | a | b | ab,ab | 1000m +-1 | 1000m +-1 | 100s +-1 | 100s +-1 |
| b | c | bc | 2000m +-1 | 2000m +-1 | 200s +-1 | 200s +-1 | | b | c | bc,bc | 2000m +-1 | 2000m +-1 | 200s +-1 | 200s +-1 |
| c | d | cd | 3000m +-1 | 3000m +-1 | 300s +-1 | 300s +-1 | | c | d | cd,cd | 3000m +-1 | 3000m +-1 | 300s +-1 | 300s +-1 |
| a | c | ab,bc | 1000m,2000m +-1 | 3000m +-1 | 100s,200s +-1 | 300s +-1 | | a | c | ab,bc,bc | 1000m,2000m +-1 | 3000m +-1 | 100s,200s +-1 | 300s +-1 |
| b | d | bc,cd | 2000m,3000m +-1 | 5000m +-1 | 200s,300s +-1 | 500s +-1 | | b | d | bc,cd,cd | 2000m,3000m +-1 | 5000m +-1 | 200s,300s +-1 | 500s +-1 |
| a | d | ab,bc,cd | 1000m,2000m,3000m +-1 | 6000m +-1 | 100s,200s,300s +-1 | 600s +-1 | | a | d | ab,bc,cd,cd | 1000m,2000m,3000m +-1 | 6000m +-1 | 100s,200s,300s +-1 | 600s +-1 |

View File

@ -20,8 +20,8 @@ Feature: Via points
| ehijk | yes | | ehijk | yes |
When I route I should get When I route I should get
| from | to | route | distance | turns | | from | to | route | distance | turns |
| a | k | abcdefg,ehijk | 34m +-1 | head,right,destination | | a | k | abcdefg,ehijk,ehijk | 34m +-1 | depart,right,arrive |
Scenario: Slight Turn Scenario: Slight Turn
Given the node map Given the node map
@ -36,8 +36,8 @@ Feature: Via points
| ehijk | yes | | ehijk | yes |
When I route I should get When I route I should get
| from | to | route | distance | turns | | from | to | route | distance | turns |
| a | k | abcdefg,ehijk | 34m +-1 | head,slight_right,destination | | a | k | abcdefg,ehijk,ehijk | 35m +-1 | depart,slight right,arrive |
Scenario: Nearly Slight Turn Scenario: Nearly Slight Turn
Given the node map Given the node map
@ -53,8 +53,8 @@ Feature: Via points
| ehijk | yes | | ehijk | yes |
When I route I should get When I route I should get
| from | to | route | distance | turns | | from | to | route | distance | turns |
| a | k | abcdefg,ehijk | 37m +-1 | head,right,destination | | a | k | abcdefg,ehijk,ehijk | 37m +-1 | depart,right,arrive |
Scenario: Nearly Slight Turn (Variation) Scenario: Nearly Slight Turn (Variation)
Given the node map Given the node map
@ -70,5 +70,5 @@ Feature: Via points
| ehijk | yes | | ehijk | yes |
When I route I should get When I route I should get
| from | to | route | distance | turns | | from | to | route | distance | turns |
| a | k | abcdefg,ehijk | 37m +-1 | head,right,destination | | a | k | abcdefg,ehijk,ehijk | 37m +-1 | depart,right,arrive |

View File

@ -24,70 +24,70 @@ Feature: Turn directions/codes
| xg | | xg |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| i | k | xi,xk | head,sharp_left,destination | | i | k | xi,xk,xk | depart,sharp left,arrive |
| i | m | xi,xm | head,left,destination | | i | m | xi,xm,xm | depart,left,arrive |
| i | o | xi,xo | head,slight_left,destination | | i | o | xi,xo,xo | depart,slight left,arrive |
| i | a | xi,xa | head,straight,destination | | i | a | xi,xa,xa | depart,straight,arrive |
| i | c | xi,xc | head,slight_right,destination | | i | c | xi,xc,xc | depart,slight right,arrive |
| i | e | xi,xe | head,right,destination | | i | e | xi,xe,xe | depart,right,arrive |
| i | g | xi,xg | head,sharp_right,destination | | i | g | xi,xg,xg | depart,sharp right,arrive |
| k | m | xk,xm | head,sharp_left,destination | | k | m | xk,xm,xm | depart,sharp left,arrive |
| k | o | xk,xo | head,left,destination | | k | o | xk,xo,xo | depart,left,arrive |
| k | a | xk,xa | head,slight_left,destination | | k | a | xk,xa,xa | depart,slight left,arrive |
| k | c | xk,xc | head,straight,destination | | k | c | xk,xc,xc | depart,straight,arrive |
| k | e | xk,xe | head,slight_right,destination | | k | e | xk,xe,xe | depart,slight right,arrive |
| k | g | xk,xg | head,right,destination | | k | g | xk,xg,xg | depart,right,arrive |
| k | i | xk,xi | head,sharp_right,destination | | k | i | xk,xi,xi | depart,sharp right,arrive |
| m | o | xm,xo | head,sharp_left,destination | | m | o | xm,xo,xo | depart,sharp left,arrive |
| m | a | xm,xa | head,left,destination | | m | a | xm,xa,xa | depart,left,arrive |
| m | c | xm,xc | head,slight_left,destination | | m | c | xm,xc,xc | depart,slight left,arrive |
| m | e | xm,xe | head,straight,destination | | m | e | xm,xe,xe | depart,straight,arrive |
| m | g | xm,xg | head,slight_right,destination | | m | g | xm,xg,xg | depart,slight right,arrive |
| m | i | xm,xi | head,right,destination | | m | i | xm,xi,xi | depart,right,arrive |
| m | k | xm,xk | head,sharp_right,destination | | m | k | xm,xk,xk | depart,sharp right,arrive |
| o | a | xo,xa | head,sharp_left,destination | | o | a | xo,xa,xa | depart,sharp left,arrive |
| o | c | xo,xc | head,left,destination | | o | c | xo,xc,xc | depart,left,arrive |
| o | e | xo,xe | head,slight_left,destination | | o | e | xo,xe,xe | depart,slight left,arrive |
| o | g | xo,xg | head,straight,destination | | o | g | xo,xg,xg | depart,straight,arrive |
| o | i | xo,xi | head,slight_right,destination | | o | i | xo,xi,xi | depart,slight right,arrive |
| o | k | xo,xk | head,right,destination | | o | k | xo,xk,xk | depart,right,arrive |
| o | m | xo,xm | head,sharp_right,destination | | o | m | xo,xm,xm | depart,sharp right,arrive |
| a | c | xa,xc | head,sharp_left,destination | | a | c | xa,xc,xc | depart,sharp left,arrive |
| a | e | xa,xe | head,left,destination | | a | e | xa,xe,xe | depart,left,arrive |
| a | g | xa,xg | head,slight_left,destination | | a | g | xa,xg,xg | depart,slight left,arrive |
| a | i | xa,xi | head,straight,destination | | a | i | xa,xi,xi | depart,straight,arrive |
| a | k | xa,xk | head,slight_right,destination | | a | k | xa,xk,xk | depart,slight right,arrive |
| a | m | xa,xm | head,right,destination | | a | m | xa,xm,xm | depart,right,arrive |
| a | o | xa,xo | head,sharp_right,destination | | a | o | xa,xo,xo | depart,sharp right,arrive |
| c | e | xc,xe | head,sharp_left,destination | | c | e | xc,xe,xe | depart,sharp left,arrive |
| c | g | xc,xg | head,left,destination | | c | g | xc,xg,xg | depart,left,arrive |
| c | i | xc,xi | head,slight_left,destination | | c | i | xc,xi,xi | depart,slight left,arrive |
| c | k | xc,xk | head,straight,destination | | c | k | xc,xk,xk | depart,straight,arrive |
| c | m | xc,xm | head,slight_right,destination | | c | m | xc,xm,xm | depart,slight right,arrive |
| c | o | xc,xo | head,right,destination | | c | o | xc,xo,xo | depart,right,arrive |
| c | a | xc,xa | head,sharp_right,destination | | c | a | xc,xa,xa | depart,sharp right,arrive |
| e | g | xe,xg | head,sharp_left,destination | | e | g | xe,xg,xg | depart,sharp left,arrive |
| e | i | xe,xi | head,left,destination | | e | i | xe,xi,xi | depart,left,arrive |
| e | k | xe,xk | head,slight_left,destination | | e | k | xe,xk,xk | depart,slight left,arrive |
| e | m | xe,xm | head,straight,destination | | e | m | xe,xm,xm | depart,straight,arrive |
| e | o | xe,xo | head,slight_right,destination | | e | o | xe,xo,xo | depart,slight right,arrive |
| e | a | xe,xa | head,right,destination | | e | a | xe,xa,xa | depart,right,arrive |
| e | c | xe,xc | head,sharp_right,destination | | e | c | xe,xc,xc | depart,sharp right,arrive |
| g | i | xg,xi | head,sharp_left,destination | | g | i | xg,xi,xi | depart,sharp left,arrive |
| g | k | xg,xk | head,left,destination | | g | k | xg,xk,xk | depart,left,arrive |
| g | m | xg,xm | head,slight_left,destination | | g | m | xg,xm,xm | depart,slight left,arrive |
| g | o | xg,xo | head,straight,destination | | g | o | xg,xo,xo | depart,straight,arrive |
| g | a | xg,xa | head,slight_right,destination | | g | a | xg,xa,xa | depart,slight right,arrive |
| g | c | xg,xc | head,right,destination | | g | c | xg,xc,xc | depart,right,arrive |
| g | e | xg,xe | head,sharp_right,destination | | g | e | xg,xe,xe | depart,sharp right,arrive |
Scenario: Turn instructions at high latitude Scenario: Turn instructions at high latitude
# https://github.com/DennisOSRM/Project-OSRM/issues/532 # https://github.com/DennisOSRM/Project-OSRM/issues/532
@ -108,8 +108,8 @@ Feature: Turn directions/codes
| yz | | yz |
When I route I should get When I route I should get
| from | to | route | turns | | from | to | route | turns |
| a | c | ab,bc | head,straight,destination | | a | c | ab,bc,bc | depart,left,arrive |
| c | a | bc,ab | head,straight,destination | | c | a | bc,ab,ab | depart,right,arrive |
| x | z | xy,yz | head,straight,destination | | x | z | xy,yz,yz | depart,right,arrive |
| z | x | yz,xy | head,straight,destination | | z | x | yz,xy,xy | depart,left,arrive |

View File

@ -15,7 +15,7 @@ Feature: Handling of UTF characters
| cd | Cyrillic Москва | | cd | Cyrillic Москва |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | Scandinavian København | | a | b | Scandinavian København,Scandinavian København |
| b | c | Japanese | | b | c | Japanese ,Japanese |
| c | d | Cyrillic Москва | | c | d | Cyrillic Москва,Cyrillic Москва |

Some files were not shown because too many files have changed in this diff Show More