Compare commits
671 Commits
v5.6.1
...
v5.9.0-rc.2
| Author | SHA1 | Date | |
|---|---|---|---|
| bae21f0d5d | |||
| 305df1fb6e | |||
| 9ab0fca31c | |||
| e2e398edc5 | |||
| b87366132b | |||
| f4ef4b022e | |||
| 81d479304e | |||
| 92b53e5be0 | |||
| cc73e753bd | |||
| 725dc396c7 | |||
| 890f0d8d7e | |||
| c9017090a2 | |||
| e7061591e3 | |||
| 5ede5577d1 | |||
| 0bfbe5ad16 | |||
| 54ceb05420 | |||
| fef0344be0 | |||
| b12fee5c0a | |||
| 1ef75c7a61 | |||
| 8c5ac84f0c | |||
| 44739f2dc3 | |||
| d52d530cbe | |||
| 5fb00ff7bf | |||
| 4c7aa8f1c0 | |||
| 2522f70f86 | |||
| e47e8ed335 | |||
| 2927b491c3 | |||
| ba2a0b3566 | |||
| 98caa0bcd9 | |||
| 4a2a100569 | |||
| 3073f4c0d1 | |||
| 7d900e3b5a | |||
| 6d78c11fd2 | |||
| 1bee82e288 | |||
| a41caf0efb | |||
| a3e0eb03db | |||
| 34f62b4894 | |||
| b28077a437 | |||
| 359ab2b56e | |||
| e42c23686b | |||
| d98f1a2632 | |||
| aa736dbe3a | |||
| 3534203083 | |||
| 517cb5f094 | |||
| b910ab9bcb | |||
| 5a29e29535 | |||
| 0fd71260d3 | |||
| 54367bfa98 | |||
| 1e9806f872 | |||
| 1e704aa7f2 | |||
| 8a404ea850 | |||
| e2e279bc85 | |||
| c914afdbf1 | |||
| 49a057ebc0 | |||
| d660c1609c | |||
| 74bc8966a8 | |||
| 9d8a3e3c97 | |||
| a308b86056 | |||
| 1b540fe0ba | |||
| 929e5a4de6 | |||
| df4f0d043a | |||
| 09df8d47a5 | |||
| c8b75c9046 | |||
| dd8f5ac01d | |||
| 22479ff5d8 | |||
| 688b1f8bef | |||
| e5464526c8 | |||
| 37b8d3acd4 | |||
| 4f13208ce8 | |||
| 383640caaf | |||
| 42f3401dd7 | |||
| 7fb57c924f | |||
| 97592e5bc3 | |||
| 9922c0f4f7 | |||
| f27434f2fb | |||
| 32d39b7b49 | |||
| 5c20c7b295 | |||
| df000debe9 | |||
| 31511416ed | |||
| 99b02cedfb | |||
| 4136bf2808 | |||
| 93d6fd05a9 | |||
| 73c4bc1411 | |||
| dc9b4bcfec | |||
| e3276324b9 | |||
| f80e5db346 | |||
| 35550d8c0a | |||
| b68d79407e | |||
| 27ed69b08f | |||
| cd8fb82215 | |||
| 5c8e2b6f78 | |||
| 9d30817294 | |||
| 5ee3c4de9f | |||
| afbcb3d38c | |||
| de1d5f199f | |||
| 9158f69ea0 | |||
| 2cfd9c8d01 | |||
| 5026741652 | |||
| 3d77714c36 | |||
| 03e83ec6a0 | |||
| 9315dc1c73 | |||
| b8bb12b2e2 | |||
| bd1532847c | |||
| 3602b58517 | |||
| d7035291ea | |||
| 6b0bcb5171 | |||
| 6b8f3c7fef | |||
| 0d12d2fd28 | |||
| 10460fc2fb | |||
| 6c7f0edf50 | |||
| 51bf9c4ff2 | |||
| 0266c9d969 | |||
| 879de346ea | |||
| 50d9c4b34a | |||
| a195d7dfd3 | |||
| 1c3cb897c1 | |||
| 0e39320a77 | |||
| 1b162c1962 | |||
| f497201322 | |||
| 65746edd2d | |||
| 91e1ac83d9 | |||
| 63ea75612b | |||
| f9a650792a | |||
| 564a29141e | |||
| c937d20e48 | |||
| ca353eb7db | |||
| f268163ea0 | |||
| 6f41e3faf1 | |||
| aed2c0124a | |||
| f5564c9275 | |||
| 632ce270fa | |||
| 93dac6b246 | |||
| a92674022a | |||
| ceaf065d0e | |||
| a58139dfb5 | |||
| 9bd2b0deaa | |||
| d262c4dfaa | |||
| dd009322de | |||
| 858ec2e655 | |||
| 5d4ab4100a | |||
| 43ddc63d67 | |||
| b5d1565dec | |||
| 6658bb7d51 | |||
| eb2db4994f | |||
| d88e5ddf20 | |||
| f3558260b6 | |||
| 0317bbb35d | |||
| a4a6ed7e38 | |||
| 15a1e10487 | |||
| 98ad9d8b61 | |||
| c573cdb0ae | |||
| 82a149eb87 | |||
| 089c98a107 | |||
| 17a73e3979 | |||
| f65299d665 | |||
| f782dfbfd9 | |||
| ec7934ea33 | |||
| 2de17f3fd0 | |||
| ba2bf4f78e | |||
| 8a54e6a0ec | |||
| 8e70c87e64 | |||
| 579a1ed42e | |||
| a544935e7d | |||
| 7eab227ab1 | |||
| 382a5cebab | |||
| 6d2353c302 | |||
| 45ee096260 | |||
| c21a476b00 | |||
| 25c870dc57 | |||
| 4605c35101 | |||
| 8655c61ec2 | |||
| 314cf3f31a | |||
| 1d26deb0be | |||
| ac35757616 | |||
| 47f2f17987 | |||
| a63b43c259 | |||
| 14582fea5f | |||
| 862ec14e06 | |||
| 570d81c6dd | |||
| 4964d0dcbd | |||
| 5c00fc9769 | |||
| 3599d1db8e | |||
| 5c61f00ffa | |||
| aef3ff3e7b | |||
| a971c2ef37 | |||
| c757f70b97 | |||
| 403db7cc84 | |||
| 7a4c5a64fa | |||
| c535e74a65 | |||
| e605917083 | |||
| 14db5f8d1f | |||
| 3546abc30e | |||
| e4b58c1258 | |||
| 5e2e1d4c96 | |||
| 1a7cd785f2 | |||
| 65de940882 | |||
| 26702920b4 | |||
| 373087d74f | |||
| ca6b1b39b7 | |||
| 8934167e76 | |||
| 9972b5f1f9 | |||
| d8877abf26 | |||
| bce3b68281 | |||
| 7d42e18479 | |||
| 4294295242 | |||
| 16f492026a | |||
| 7d58f0ec53 | |||
| 6bd724fe24 | |||
| 26a208529e | |||
| 3fbdb19956 | |||
| ea9d5eca0f | |||
| 0f66278532 | |||
| b9206ef017 | |||
| 9d8f1d9dbf | |||
| e064a9334b | |||
| e12c7756d9 | |||
| f8002480c2 | |||
| 799a677e7a | |||
| 12f47708cd | |||
| 9358aa1128 | |||
| a44b63fbb9 | |||
| e2b7e8a4da | |||
| a5bfcd876f | |||
| 2f02384d22 | |||
| 3de8613843 | |||
| ccb8a07dc7 | |||
| 6484fed190 | |||
| 6b103c6d0b | |||
| 669ac058b8 | |||
| e92967167f | |||
| f3de2c9b94 | |||
| 21cd1a44e8 | |||
| 6ca46795aa | |||
| 35d7b7ceaf | |||
| faa2094488 | |||
| e6d776699f | |||
| 200e90ad43 | |||
| c66f67ac07 | |||
| 334a7b50cd | |||
| a9d3e61884 | |||
| 88082c48cf | |||
| 40d0297885 | |||
| be1acae20c | |||
| f1e4349c82 | |||
| 1f701341db | |||
| 2a24468267 | |||
| f531a956f5 | |||
| 1aea10010b | |||
| 2cf6010665 | |||
| 2402d60429 | |||
| 19494984eb | |||
| 07c7cb3c6c | |||
| 358aebec4d | |||
| 05826150f6 | |||
| 5827358a1e | |||
| 9334cc463d | |||
| 5532ee627f | |||
| 2021c30805 | |||
| 0e39aa9488 | |||
| 8ec0745883 | |||
| c446b017ef | |||
| a68435d856 | |||
| 814324146b | |||
| 11d8b2ba5a | |||
| d6c6a262d8 | |||
| 5c4f96e4bc | |||
| 9974b8b1da | |||
| c81baae1b9 | |||
| e96545be2e | |||
| 609801ae99 | |||
| a66918a303 | |||
| e85c4f87e9 | |||
| 8ff5a22799 | |||
| 4929d1297e | |||
| b830a8f942 | |||
| 0c388a5264 | |||
| e4eb18cf4e | |||
| 5b4f432cba | |||
| 15f7257645 | |||
| 12c11f1d48 | |||
| a196d5ced3 | |||
| 802af08179 | |||
| 85ec50552d | |||
| 8da96f8d94 | |||
| 5b9d858f57 | |||
| 023242ec03 | |||
| 683e53e950 | |||
| df0ee955e8 | |||
| 771834793f | |||
| 3915c1286b | |||
| b422b636d3 | |||
| 5bbc675c6b | |||
| addf4d90e9 | |||
| 721e5e7947 | |||
| dea3144c4d | |||
| 1080d25fcf | |||
| afb553a31e | |||
| e2c231234d | |||
| 103f7117ed | |||
| 59b70c4d11 | |||
| f96bae40ac | |||
| ba974c73bf | |||
| e498ad3ee7 | |||
| 1de031ed06 | |||
| d6ac924b94 | |||
| ee24473cbb | |||
| c19a3cec1c | |||
| f3694be1a0 | |||
| 306d86ce58 | |||
| 2c001b63a5 | |||
| e162dda836 | |||
| 10c532bd4c | |||
| c8a7bc1d6a | |||
| 9ca3c69b49 | |||
| d1cf8c1fd5 | |||
| 018742f50f | |||
| b82d21f856 | |||
| cfaadf198f | |||
| 6698b5e07e | |||
| 37794a5e8a | |||
| a88fef2937 | |||
| da474a16a9 | |||
| 59bbfeb67f | |||
| 4e9e2ed5bd | |||
| e0593c7ca2 | |||
| 1f69df0d89 | |||
| 05706879a0 | |||
| 7e49b36198 | |||
| 56bcb491d3 | |||
| f4e2bd848d | |||
| 0cf96314a3 | |||
| 91e24cab9e | |||
| 288155ead0 | |||
| 85454857d3 | |||
| fe50f6590a | |||
| 2da5da3f16 | |||
| 446c865415 | |||
| 0072bf0c59 | |||
| 4ec7ca29f1 | |||
| d94017dfae | |||
| dce0ce0e17 | |||
| d61102e255 | |||
| 7f6e0c478b | |||
| 786a3d8919 | |||
| ef3fcdc6e6 | |||
| 90c194fc81 | |||
| 5ed686a17b | |||
| 4e3009260c | |||
| c87ce2dede | |||
| 99a87b4c83 | |||
| 3f5fc1e897 | |||
| 97d1de1beb | |||
| d7e1c9c09c | |||
| 865111bca9 | |||
| 08d62cd5e3 | |||
| 603e2ee7de | |||
| 98948989d0 | |||
| 1aa8cc3b65 | |||
| c487d1307e | |||
| 604f4957f7 | |||
| 7726576bb7 | |||
| cf17a3a4c3 | |||
| 0972ec9115 | |||
| f660ae30dc | |||
| 2766c24b42 | |||
| cab83555e1 | |||
| 48a098a9c7 | |||
| a1fa1c610c | |||
| 905ca69301 | |||
| d66cc125aa | |||
| 3fc0fc65f9 | |||
| 8c64b01d67 | |||
| 2566f64c34 | |||
| 8cd40b9e90 | |||
| 45df8568b6 | |||
| 0da041477b | |||
| 272ea9b92e | |||
| 571681d019 | |||
| 9b614c6057 | |||
| 721f319909 | |||
| a3621f3655 | |||
| 789311abd6 | |||
| 091a495632 | |||
| 16665aeb00 | |||
| d6e56c38d5 | |||
| 87874006c7 | |||
| 703588b684 | |||
| b21ee1b63b | |||
| 427437d49b | |||
| 01deefc3bc | |||
| 157ca9161f | |||
| 266e65e6d2 | |||
| 70b3962c35 | |||
| e568b600f0 | |||
| 273fd689ce | |||
| 0363d64722 | |||
| d200507424 | |||
| fc84f605af | |||
| 927dea37bb | |||
| de98ae57b7 | |||
| 614398ed6c | |||
| 2cd4ba9a0a | |||
| 57d3f71bf9 | |||
| 8f8df969a2 | |||
| e39dc3c464 | |||
| dbc6535221 | |||
| e262cac3e8 | |||
| 4ab3165ae3 | |||
| 7a1a209168 | |||
| ac6f07a744 | |||
| dac929f8df | |||
| ebd938a8fc | |||
| 5ba54a62d6 | |||
| 827a595b6c | |||
| c03f74d8b0 | |||
| f5393f44f7 | |||
| ad6e834992 | |||
| 3439b21177 | |||
| 730c809395 | |||
| 5a2da798c8 | |||
| c0e7f6e9f4 | |||
| ed83d3ed13 | |||
| aa1dff3fc4 | |||
| c1901e9689 | |||
| c6e6d9fa94 | |||
| 88eabb98b9 | |||
| 3dcc7132b6 | |||
| 379380abd8 | |||
| 497709da13 | |||
| b95a58591d | |||
| 5727b1387e | |||
| 221cd00b1a | |||
| cce4f6344c | |||
| a49c6f433b | |||
| ef308ac53a | |||
| 2fab696bb3 | |||
| 836a5066c2 | |||
| 69422cc4e7 | |||
| e9c0987e8a | |||
| bd9eb76a2d | |||
| 441eae9df2 | |||
| bfc272f3e8 | |||
| 215489286d | |||
| c772210cc0 | |||
| 934f87bcdd | |||
| ff872b4009 | |||
| 7278f88aa9 | |||
| 16621f00c1 | |||
| 0c9eb8e16c | |||
| 78cd460395 | |||
| 2351b5a084 | |||
| ff238c2724 | |||
| 810e3c6a66 | |||
| 98529ee071 | |||
| e902ab4693 | |||
| b085add973 | |||
| 2b397942fe | |||
| 655ca803d8 | |||
| 58681fa7ea | |||
| 78a199e2fb | |||
| 851fcf0758 | |||
| 7379be90f9 | |||
| af65ccd054 | |||
| 79ef204e1f | |||
| f1b88adebe | |||
| 0c6ce6ce08 | |||
| 5e40b12450 | |||
| a75fd560d7 | |||
| 152f77b665 | |||
| c39690195e | |||
| 20c6b4682f | |||
| 97c442482d | |||
| 6586737835 | |||
| fe5d1a6e74 | |||
| 81771a3bfd | |||
| c648711f30 | |||
| 6829f46c31 | |||
| 43a7e8e08a | |||
| c370ddd89a | |||
| 57c6c6e51c | |||
| bf6698f4cc | |||
| 44757729b7 | |||
| eb2e4d0aaf | |||
| 4684a498c4 | |||
| 864543b023 | |||
| ed143b503d | |||
| 809d8a7d03 | |||
| 5ab882759d | |||
| acbaecf45d | |||
| 1f238fedd8 | |||
| 5828f4400d | |||
| 4e2b157db3 | |||
| 8f9b4fcdbb | |||
| 23c74af2b5 | |||
| 2cc22ce098 | |||
| 2df02aa301 | |||
| cec1f223e9 | |||
| 17f8339aa6 | |||
| 35c4c2a256 | |||
| 3c81baa26e | |||
| 0a917a77f5 | |||
| 583699c84d | |||
| 0f7218c0c4 | |||
| 2d66fec174 | |||
| 3cae315a76 | |||
| d661f3f31e | |||
| 907f933a54 | |||
| c6e9cc8024 | |||
| 40094ceeab | |||
| 24c70e3c8e | |||
| a636e8cc13 | |||
| ffd6311e7d | |||
| 260a84b94b | |||
| fb552fd751 | |||
| 94e2a8598d | |||
| 4986f5ea2d | |||
| 1b5ab37dfd | |||
| 83820bf82c | |||
| 20e028c47b | |||
| 89c62bf67f | |||
| bc43229055 | |||
| e43a8ca528 | |||
| c7fc36a61b | |||
| e705ff16e3 | |||
| 0a13390ab0 | |||
| bf6b571455 | |||
| e13ba8ba11 | |||
| 5aba239fc1 | |||
| dff8c48842 | |||
| ec3cda32fa | |||
| faaf82c837 | |||
| 3f6ae245f6 | |||
| bc2e06502e | |||
| aa1c4eb262 | |||
| 264cec12e9 | |||
| e423aa5511 | |||
| 9b5458840a | |||
| fae1c737a3 | |||
| 6f9aea4e56 | |||
| d575561d39 | |||
| f42136637d | |||
| 53b0417e36 | |||
| 5bb933dd84 | |||
| 821351f56e | |||
| a92fa257af | |||
| c29391636a | |||
| c8bd01caae | |||
| 1f39d936c5 | |||
| 36ab848aba | |||
| 6cb401b1ff | |||
| fc9b5938e6 | |||
| 8ad9a0aa9a | |||
| 8f9e980945 | |||
| b2f3b901e0 | |||
| 517b27bfc3 | |||
| 00d01946cd | |||
| 694bf9d8b1 | |||
| ef71cc0d12 | |||
| 5f73ac1eda | |||
| 108fce896b | |||
| ff0a98196f | |||
| 757e7ca936 | |||
| 74b382d881 | |||
| a725fb4655 | |||
| ee076e6156 | |||
| 65669f23a1 | |||
| 172b1ff9d1 | |||
| 596890a0f4 | |||
| 0770d8b8cf | |||
| cc3a4899a2 | |||
| 93cdd8bb46 | |||
| c2a5cc034a | |||
| e737700c7b | |||
| a32f8a6a59 | |||
| ed00965d18 | |||
| 3f485ac09b | |||
| a901bda41e | |||
| 0ac1f99f9c | |||
| 30ff0fa977 | |||
| 7da86b5984 | |||
| 922e155763 | |||
| 436b34ffea | |||
| 2fa8d0f534 | |||
| 71e95c92b6 | |||
| fbf7521769 | |||
| 7c911b3891 | |||
| 9f61f72ee8 | |||
| d32ebd57e6 | |||
| 8e43c8cbce | |||
| 7632c20ddf | |||
| 4fa3a5c362 | |||
| 886421b43a | |||
| e20cbf673f | |||
| 54c35710f6 | |||
| 748ade5fea | |||
| f5e9c7df07 | |||
| 1541d32a42 | |||
| ed7438b9ba | |||
| e8cca36369 | |||
| d473acb56d | |||
| b5d63e5ed5 | |||
| c712fafae3 | |||
| e589ab814d | |||
| 5015e12d59 | |||
| 3e409bea26 | |||
| e0665856b0 | |||
| f71d742b5e | |||
| 299d071e9d | |||
| 075f69acc2 | |||
| be41e8b321 | |||
| 739ad73ae9 | |||
| b62b09e5f6 | |||
| b789da45bd | |||
| e316dad1cb | |||
| c3cc79f798 | |||
| b9ed20bb9b | |||
| 786be6f570 | |||
| dd60ae31ae | |||
| db7adfa77b | |||
| dd3f351874 | |||
| d56db500d3 | |||
| 07221f5a48 | |||
| 421d336b0f | |||
| 5be6f8959a | |||
| f7b8e06c3a | |||
| 18a50d357f | |||
| 6c3390f14d | |||
| 8d83c3adbb | |||
| cd1a73dde6 | |||
| 4161181a6c | |||
| 82acd59a8e | |||
| 438aa66b4c | |||
| 5739c27ef4 | |||
| b59295e55e | |||
| 49862d1bcd | |||
| 544e54894f | |||
| 046d3128c4 | |||
| 1ad1ff5fc1 | |||
| e06ffabf21 | |||
| b2b5e2bb4d | |||
| c2727f2029 | |||
| a0e7bab598 | |||
| 67ae86882a | |||
| e52a8e060b | |||
| 1bc8dbf139 | |||
| 73b1a46d15 | |||
| 7ecf3410bf | |||
| 03bb6dc161 | |||
| a45b9e07fc | |||
| 6567e79ec5 | |||
| 224848fc11 | |||
| 6468a1ba79 | |||
| ce1141982b | |||
| 6e18af2267 | |||
| 73ce44028f | |||
| 335362315c | |||
| e75278f9c2 | |||
| a31f401995 | |||
| 6446257a93 | |||
| 1bace1288d | |||
| 23b07c9197 | |||
| a61b1a3623 | |||
| 7f39c9fcb0 | |||
| 921ff43acf | |||
| 1ed1bae249 | |||
| 38a1edfe3c | |||
| dc1d491c15 | |||
| e4d500f451 | |||
| d52ea86cb9 | |||
| b906f2a628 | |||
| 2b00d92463 |
@@ -0,0 +1,15 @@
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.cpp text
|
||||
*.hpp text
|
||||
|
||||
# Declare files that will always have CRLF line endings on checkout.
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
*.ps1 text eol=crlf
|
||||
|
||||
# Declare files that will always have LF line endings on checkout.
|
||||
*.sh text eol=lf
|
||||
+14
-2
@@ -7,6 +7,8 @@
|
||||
#############################
|
||||
osrm-deps
|
||||
|
||||
.ycm_extra_conf.py
|
||||
|
||||
# Compiled source #
|
||||
###################
|
||||
*.com
|
||||
@@ -47,6 +49,9 @@ Thumbs.db
|
||||
/build/
|
||||
/example/build/
|
||||
/test/data/monaco*
|
||||
/test/data/ch
|
||||
/test/data/corech
|
||||
/test/data/mld
|
||||
/cmake/postinst
|
||||
|
||||
# Eclipse related files #
|
||||
@@ -56,6 +61,11 @@ Thumbs.db
|
||||
.cproject
|
||||
.project
|
||||
|
||||
# Visual Studio (Code) related files #
|
||||
######################################
|
||||
/.vs*
|
||||
/*.local.bat
|
||||
|
||||
# stxxl related files #
|
||||
#######################
|
||||
.stxxl
|
||||
@@ -86,7 +96,6 @@ stxxl.errlog
|
||||
/test/cache
|
||||
/test/speeds.csv
|
||||
/test/penalties.csv
|
||||
/test/data/monaco.*
|
||||
node_modules
|
||||
|
||||
# Deprecated config file #
|
||||
@@ -96,4 +105,7 @@ node_modules
|
||||
*.swp
|
||||
|
||||
# local lua debugging file
|
||||
debug.lua
|
||||
debug.lua
|
||||
|
||||
# node-osrm artifacts
|
||||
lib/binding
|
||||
|
||||
+235
-62
@@ -7,14 +7,22 @@ git:
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
node_js:
|
||||
- "4"
|
||||
- "6"
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
# enable building tags
|
||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||
- "5.9"
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
ccache: true
|
||||
apt: true
|
||||
directories:
|
||||
@@ -22,12 +30,16 @@ cache:
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "hk+32aXXF5t1ApaM2Wjqooz3dx1si907L87WRMkO47WlpJmUUU/Ye+MJk9sViH8MdhOcceocVAmdYl5/WFWOIbDWNlBya9QvXDZyIu2KIre/0QyOCTZbrsif8paBXKIO5O/R4OTvIZ8rvWZsadBdmAT9GSbDhih6FzqXAEgeIYQ="
|
||||
- secure: "VE+cFkseFwW4jK6XwkP0yW3h4DixPJ8+Eb3yKcchGZ5iIJxlZ/8i1vKHYxadgPRwSYwPSB14tF70xj2OmiT2keGzZUfphmPXinBaLEhYk+Bde+GZZkoSl5ND109I/LcyNr0nG9dDgtV6pkvFchgchpyP9JnVOOS0+crEZlAz0RE="
|
||||
- CCACHE_TEMPDIR=/tmp/.ccache-temp
|
||||
- CCACHE_COMPRESS=1
|
||||
- CASHER_TIME_OUT=599 # one second less than 10m to avoid 10m timeout error: https://github.com/Project-OSRM/osrm-backend/issues/2742
|
||||
- CCACHE_VERSION=3.3.1
|
||||
- CMAKE_VERSION=3.6.2
|
||||
- MASON="$(pwd)/third_party/mason/mason"
|
||||
- CMAKE_VERSION=3.7.2
|
||||
- MASON="$(pwd)/scripts/mason.sh"
|
||||
- ENABLE_NODE_BINDINGS=On
|
||||
- NODE="4"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
@@ -37,26 +49,58 @@ matrix:
|
||||
|
||||
# Debug Builds
|
||||
- os: linux
|
||||
compiler: "gcc-6-debug"
|
||||
compiler: "format-taginfo-docs"
|
||||
env: NODE=6
|
||||
sudo: false
|
||||
before_install:
|
||||
install:
|
||||
- source $NVM_DIR/nvm.sh
|
||||
- nvm install $NODE
|
||||
- nvm use $NODE
|
||||
- npm --version
|
||||
- npm install --ignore-scripts
|
||||
- npm link --ignore-scripts
|
||||
script:
|
||||
- ./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||
- ${MASON} install clang-format 3.8.1
|
||||
- PATH=$(${MASON} prefix clang-format 3.8.1)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh
|
||||
# See issue 4043
|
||||
#- npm run docs && ./scripts/error_on_dirty.sh
|
||||
after_success:
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-6-debug-cov"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=ON BUILD_COMPONENTS=ON
|
||||
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' ENABLE_COVERAGE=ON CUCUMBER_TIMEOUT=20000
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
- os: linux
|
||||
compiler: "clang-3.9-debug"
|
||||
addons: &clang38
|
||||
compiler: "gcc-6-debug-asan"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: CLANG_VERSION='3.9.1' BUILD_TYPE='Debug' BUILD_COMPONENTS=ON CUCUMBER_TIMEOUT=60000
|
||||
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_SANITIZER=ON CUCUMBER_TIMEOUT=20000
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode8.2
|
||||
compiler: "mason-osx-release"
|
||||
# we use the xcode provides clang and don't install our own
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON
|
||||
- os: linux
|
||||
compiler: "clang-4.0-debug"
|
||||
addons: &clang40
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' CUCUMBER_TIMEOUT=60000
|
||||
|
||||
- os: linux
|
||||
compiler: "mason-linux-debug-asan"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_SANITIZER=ON
|
||||
|
||||
# Release Builds
|
||||
- os: linux
|
||||
@@ -65,38 +109,54 @@ matrix:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='3.9.1' BUILD_TYPE='Release' ENABLE_MASON=ON RUN_CLANG_FORMAT=ON
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON RUN_CLANG_FORMAT=ON ENABLE_LTO=ON
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-6-release"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' BUILD_COMPONENTS=ON
|
||||
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-6-release-i686"
|
||||
env: >
|
||||
TARGET_ARCH='i686' CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
|
||||
CFLAGS='-m32 -msse2 -mfpmath=sse' CXXFLAGS='-m32 -msse2 -mfpmath=sse' CHECK_HEADERS=yes
|
||||
CFLAGS='-m32 -msse2 -mfpmath=sse' CXXFLAGS='-m32 -msse2 -mfpmath=sse'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-6-stxxl"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' ENABLE_STXXL=On
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-4.9-release"
|
||||
addons: &gcc49
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-4.9', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
|
||||
packages: ['g++-4.9', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev', 'ccache']
|
||||
env: CCOMPILER='gcc-4.9' CXXCOMPILER='g++-4.9' BUILD_TYPE='Release'
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode8.2
|
||||
compiler: "mason-osx-release"
|
||||
# we use the xcode provides clang and don't install our own
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
# Disabled because of CI slowness
|
||||
#- os: linux
|
||||
#- compiler: clang
|
||||
#- addons: &clang38
|
||||
#- addons: &clang40
|
||||
#- apt:
|
||||
#- sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test']
|
||||
#- packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
#- env: CCOMPILER='clang-3.8' CXXCOMPILER='clang++-3.8' BUILD_TYPE='Release'
|
||||
#- sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
|
||||
#- packages: ['clang-4.0', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||
#- env: CCOMPILER='clang-4.0' CXXCOMPILER='clang++-4.0' BUILD_TYPE='Release'
|
||||
|
||||
# Shared Library
|
||||
- os: linux
|
||||
@@ -104,62 +164,178 @@ matrix:
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON BUILD_COMPONENTS=ON
|
||||
packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
# Disabled because CI slowness
|
||||
#- os: linux
|
||||
#- compiler: clang
|
||||
#- addons: &clang38
|
||||
#- addons: &clang40
|
||||
#- apt:
|
||||
#- sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test']
|
||||
#- packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
#- env: CCOMPILER='clang-3.8' CXXCOMPILER='clang++-3.8' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
#- sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
|
||||
#- packages: ['clang-4.0', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libboost-all-dev']
|
||||
#- env: CCOMPILER='clang-4.0' CXXCOMPILER='clang++-4.0' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
# Node build jobs. These skip running the tests.
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-4-mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-4-mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-6-mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="6"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: linux
|
||||
sudo: false
|
||||
compiler: "node-6-mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="6"
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
script:
|
||||
- npm run nodejs-tests
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
before_install:
|
||||
- source $NVM_DIR/nvm.sh
|
||||
- nvm install $NODE
|
||||
- nvm use $NODE
|
||||
- node --version
|
||||
- if [[ ! -z $TARGET_ARCH ]] ; then source ./scripts/travis/before_install.$TARGET_ARCH.sh ; fi
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
export JOBS=$((`nproc` + 1))
|
||||
fi
|
||||
- |
|
||||
if [ -n "${RUN_CLANG_FORMAT}" ]; then
|
||||
${MASON} install clang-format 3.8.1 && PATH=$(${MASON} prefix clang-format 3.8.1)/bin:${PATH} ./scripts/format.sh
|
||||
if [[ -z $JOBS ]]; then
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
export JOBS=$((`nproc` + 1))
|
||||
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
||||
export JOBS=$((`sysctl -n hw.ncpu` + 1))
|
||||
fi
|
||||
fi
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
||||
export JOBS=$((`sysctl -n hw.ncpu` + 1))
|
||||
sudo mdutil -i off /
|
||||
fi
|
||||
- |
|
||||
if [[ ! -f $(which yarn) ]]; then
|
||||
npm install -g yarn
|
||||
fi
|
||||
- export PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
|
||||
- export PUBLISH=$([[ "${TRAVIS_TAG:-}" == "v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off")
|
||||
- echo "Using ${JOBS} jobs"
|
||||
- source ./scripts/install_node.sh 4
|
||||
- npm install -g "npm@>=3" # Upgrade to npm >v2 to reduce size of downloaded dependencies
|
||||
- npm install
|
||||
- yarn install --ignore-scripts
|
||||
- yarn check --ignore-scripts --integrity
|
||||
# Bootstrap cmake to be able to run mason
|
||||
- CMAKE_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/cmake/${CMAKE_VERSION}.tar.gz"
|
||||
- CMAKE_DIR="mason_packages/${TRAVIS_OS_NAME}-x86_64/cmake/${CMAKE_VERSION}"
|
||||
- mkdir -p ${CMAKE_DIR}
|
||||
- travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR} || travis_terminate 1
|
||||
- export PATH=${CMAKE_DIR}/bin:${PATH}
|
||||
- ${MASON} install tbb 2017_20161128 && export LD_LIBRARY_PATH=$(${MASON} prefix tbb 2017_20161128)/lib/:${LD_LIBRARY_PATH}
|
||||
- ${MASON} install ccache ${CCACHE_VERSION} && export PATH=$(${MASON} prefix ccache ${CCACHE_VERSION})/bin:${PATH}
|
||||
- ${MASON} install cmake ${CMAKE_VERSION} && export PATH=$(${MASON} prefix cmake ${CMAKE_VERSION})/bin:${PATH}
|
||||
- |
|
||||
if [[ ! -z ${CLANG_VERSION} ]]; then
|
||||
export CCOMPILER='clang'
|
||||
export CXXCOMPILER='clang++'
|
||||
${MASON} install clang++ ${CLANG_VERSION} && export PATH=$(${MASON} prefix clang++ ${CLANG_VERSION})/bin:${PATH}
|
||||
${MASON} install clang++ ${CLANG_VERSION} && export PATH=$(${MASON} prefix clang++ ${CLANG_VERSION})/bin:${PATH} || travis_terminate 1
|
||||
# we only enable lto for release builds
|
||||
# and therefore don't need to us ld.gold or llvm tools for linking
|
||||
# for debug builds
|
||||
if [[ ${BUILD_TYPE} == 'Release' ]]; then
|
||||
${MASON} install binutils 2.27 && export PATH=$(${MASON} prefix binutils 2.27)/bin:${PATH}
|
||||
${MASON} install binutils 2.27 && export PATH=$(${MASON} prefix binutils 2.27)/bin:${PATH} || travis_terminate 1
|
||||
fi
|
||||
fi
|
||||
- ccache --max-size=256M # limiting the cache's size to roughly the previous job's object sizes
|
||||
- export OSRM_INSTALL_DIR="$(pwd)/install-osrm"
|
||||
- export OSRM_BUILD_DIR="$(pwd)/build-osrm"
|
||||
- export CC=${CCOMPILER} CXX=${CXXCOMPILER}
|
||||
- mkdir ${OSRM_BUILD_DIR}
|
||||
|
||||
install:
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||
fi
|
||||
- export OSRM_BUILD_DIR="$(pwd)/build-osrm"
|
||||
- mkdir ${OSRM_BUILD_DIR} && pushd ${OSRM_BUILD_DIR}
|
||||
- export CC=${CCOMPILER} CXX=${CXXCOMPILER}
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_MASON=${ENABLE_MASON:-OFF} -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} -DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} -DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} -DBUILD_TOOLS=ON -DBUILD_COMPONENTS=${BUILD_COMPONENTS:-OFF} -DENABLE_CCACHE=ON
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||
-DENABLE_MASON=${ENABLE_MASON:-OFF} \
|
||||
-DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} \
|
||||
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} \
|
||||
-DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} \
|
||||
-DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \
|
||||
-DENABLE_STXXL=${ENABLE_STXXL:-OFF} \
|
||||
-DBUILD_TOOLS=ON \
|
||||
-DENABLE_CCACHE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
|
||||
- echo "travis_fold:start:MAKE"
|
||||
- make --jobs=${JOBS}
|
||||
- make tests --jobs=${JOBS}
|
||||
@@ -169,34 +345,31 @@ install:
|
||||
- sudo make install
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
sudo ldconfig
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OSRM_INSTALL_DIR}/lib
|
||||
fi
|
||||
- if [[ ${CHECK_HEADERS} == yes ]] ; then make check-headers ; fi
|
||||
- popd
|
||||
- mkdir example/build && pushd example/build
|
||||
- export PKG_CONFIG_PATH=${OSRM_INSTALL_DIR}/lib/pkgconfig
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
- npm run build-api-docs
|
||||
|
||||
script:
|
||||
- if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi
|
||||
- echo "travis_fold:start:BENCHMARK"
|
||||
- make -C test/data benchmark
|
||||
- echo "travis_fold:end:BENCHMARK"
|
||||
- ./example/build/osrm-example test/data/monaco.osrm
|
||||
- ./example/build/osrm-example test/data/ch/monaco.osrm
|
||||
# All tests assume to be run from the build directory
|
||||
- pushd ${OSRM_BUILD_DIR}
|
||||
- ./unit_tests/library-tests ../test/data/monaco.osrm
|
||||
- ./unit_tests/library-tests
|
||||
- ./unit_tests/extractor-tests
|
||||
- ./unit_tests/engine-tests
|
||||
- ./unit_tests/util-tests
|
||||
- ./unit_tests/server-tests
|
||||
- popd
|
||||
- npm test
|
||||
|
||||
after_success:
|
||||
- ./unit_tests/partition-tests
|
||||
- |
|
||||
if [ -n "${ENABLE_COVERAGE}" ]; then
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
if [ -z "${ENABLE_SANITIZER}" ] && [ "$TARGET_ARCH" != "i686" ]; then
|
||||
npm run nodejs-tests
|
||||
fi
|
||||
- |
|
||||
- popd
|
||||
- yarn test
|
||||
|
||||
@@ -1,3 +1,99 @@
|
||||
# 5.9.0 RC2
|
||||
- Changes from 5.8:
|
||||
- Algorithm:
|
||||
- Multi-Level Dijkstra:
|
||||
- Plugins supported: `table`
|
||||
- Adds alternative routes support (see [#4047](https://github.com/Project-OSRM/osrm-backend/pull/4047) and [3905](https://github.com/Project-OSRM/osrm-backend/issues/3905)): provides reasonably looking alternative routes (many, if possible) with reasonable query times.
|
||||
- API:
|
||||
- Exposes `alternatives=Number` parameter overload in addition to the boolean flag.
|
||||
- Support for exits numbers and names. New member `exits` in `RouteStep`, based on `junction:ref` on ways
|
||||
- `RouteStep` now has new parameter `classes` that can be set in the profile on each way.
|
||||
- Profiles:
|
||||
- `result.exits` allows you to set a way's exit numbers and names, see [`junction:ref`](http://wiki.openstreetmap.org/wiki/Proposed_features/junction_details)
|
||||
- `ExtractionWay` now as new property `forward_classes` and `backward_classes` that can set in the `way_function`.
|
||||
The maximum number of classes is 8.
|
||||
- Node.js Bindings:
|
||||
- Exposes `alternatives=Number` parameter overload in addition to the boolean flag
|
||||
- Tools:
|
||||
- Exposes engine limit on number of alternatives to generate `--max-alternatives` in `osrm-routed` (3 by default)
|
||||
- Infrastructure
|
||||
- STXXL is not required to build OSRM and is an optional dependency for back-compatibility (ENABLE_STXXL=On)
|
||||
|
||||
# 5.8.0
|
||||
- Changes from 5.7
|
||||
- API:
|
||||
- polyline6 support in request string
|
||||
- new parameter `approaches` for `route`, `table`, `trip` and `nearest` requests. This parameter keep waypoints on the curb side.
|
||||
'approaches' accepts both 'curb' and 'unrestricted' values.
|
||||
Note : the curb side depend on the `ProfileProperties::left_hand_driving`, it's a global property set once by the profile. If you are working with a planet dataset, the api will be wrong in some countries, and right in others.
|
||||
- NodeJs Bindings
|
||||
- new parameter `approaches` for `route`, `table`, `trip` and `nearest` requests.
|
||||
- Tools
|
||||
- `osrm-partition` now ensures it is called before `osrm-contract` and removes inconsitent .hsgr files automatically.
|
||||
- Features
|
||||
- Added conditional restriction support with `parse-conditional-restrictions=true|false` to osrm-extract. This option saves conditional turn restrictions to the .restrictions file for parsing by contract later. Added `parse-conditionals-from-now=utc time stamp` and `--time-zone-file=/path/to/file` to osrm-contract
|
||||
- Command-line tools (osrm-extract, osrm-contract, osrm-routed, etc) now return error codes and legible error messages for common problem scenarios, rather than ugly C++ crashes
|
||||
- Speed up pre-processing by only running the Lua `node_function` for nodes that have tags. Cuts OSM file parsing time in half.
|
||||
- osrm-extract now performs generation of edge-expanded-edges using all available CPUs, which should make osrm-extract significantly faster on multi-CPU machines
|
||||
- Files
|
||||
- .osrm.nodes file was renamed to .nbg_nodes and .ebg_nodes was added
|
||||
- Guidance
|
||||
- #4075 Changed counting of exits on service roundabouts
|
||||
- Debug Tiles
|
||||
- added support for visualising turn penalties to the MLD plugin
|
||||
- added support for showing the rate (reciprocal of weight) on each edge when used
|
||||
- added support for turn weights in addition to turn durations in debug tiles
|
||||
- Bugfixes
|
||||
- Fixed a copy/paste issue assigning wrong directions in similar turns (left over right)
|
||||
- #4074: fixed a bug that would announce entering highway ramps as u-turns
|
||||
- #4122: osrm-routed/libosrm should throw exception when a dataset incompatible with the requested algorithm is loaded
|
||||
- Avoid collapsing u-turns into combined turn instructions
|
||||
|
||||
# 5.7.1
|
||||
- Bugfixes
|
||||
- #4030 Roundabout edge-case crashes post-processing
|
||||
|
||||
# 5.7.0
|
||||
- Changes from 5.6
|
||||
- Algorithm:
|
||||
- OSRM object has new option `algorithm` that allows the selection of a routing algorithm.
|
||||
- New experimental algorithm: Multi-Level Dijkstra with new toolchain:
|
||||
- Allows for fast metric updates in below a minute on continental sized networks (osrm-customize)
|
||||
- Plugins supported: `match` and `route`
|
||||
- Quickstart: `osrm-extract data.osm.pbf`, `osrm-partition data.osrm`, `osrm-customize data.osrm`, `osrm-routed --algorithm=MLD data.osrm`
|
||||
- NodeJs Bindings
|
||||
- Merged https://github.com/Project-OSRM/node-osrm into repository. Build via `cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DENABLE_MASON=On`.
|
||||
- `OSRM` object has new option `algorihtm="CH","CoreCH","MLD"`
|
||||
- Internals
|
||||
- Shared memory notification via conditional variables on Linux or semaphore queue on OS X and Windows with a limit of 128 OSRM Engine instances
|
||||
- Files
|
||||
- .osrm.datasource_index file was removed. Data is now part of .osrm.geometries.
|
||||
- .osrm.edge_lookup was removed. The option `--generate-edge-lookup` does nothing now.
|
||||
- `osrm-contract` does not depend on the `.osrm.fileIndex` file anymore
|
||||
- `osrm-extract` creates new file `.osrm.cnbg` and `.cnbg_to_ebg`
|
||||
- `osrm-partition` creates new file `.osrm.partition` and `.osrm.cells`
|
||||
- `osrm-customize` creates new file `.osrm.mldgr`
|
||||
- Profiles
|
||||
- Added `force_split_edges` flag to global properties. True value guarantees that segment_function will be called for all segments, but also could double memory consumption
|
||||
- Map Matching:
|
||||
- new option `gaps=split|ignore` to enable/disbale track splitting
|
||||
- new option `tidy=true|false` to simplify traces automatically
|
||||
|
||||
# 5.6.3
|
||||
- Changes from 5.6.0
|
||||
- Bugfixes
|
||||
- #3790 Fix incorrect speed values in tile plugin
|
||||
|
||||
# 5.6.2
|
||||
- Changes from 5.6.0
|
||||
- Bugfixes
|
||||
- Fix incorrect forward datasources getter in facade
|
||||
|
||||
# 5.6.1
|
||||
- Changes from 5.6.0
|
||||
- Bugfixes
|
||||
- Fix #3754 add restricted penalty on NoTurn turns
|
||||
|
||||
# 5.6.0
|
||||
- Changes from 5.5
|
||||
- Bugfixes
|
||||
|
||||
+139
-44
@@ -21,18 +21,23 @@ option(BUILD_PACKAGE "Build OSRM package" OFF)
|
||||
option(ENABLE_ASSERTIONS "Use assertions in release mode" OFF)
|
||||
option(ENABLE_COVERAGE "Build with coverage instrumentalisation" OFF)
|
||||
option(ENABLE_SANITIZER "Use memory sanitizer for Debug build" OFF)
|
||||
option(ENABLE_STXXL "Use STXXL library" ON)
|
||||
option(ENABLE_LTO "Use LTO if available" OFF)
|
||||
option(ENABLE_FUZZING "Fuzz testing using LLVM's libFuzzer" OFF)
|
||||
option(ENABLE_GOLD_LINKER "Use GNU gold linker if available" ON)
|
||||
option(ENABLE_NODE_BINDINGS "Build NodeJs bindings" OFF)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
if(ENABLE_MASON)
|
||||
# versions in use
|
||||
set(MASON_BOOST_VERSION "1.63.0")
|
||||
set(MASON_STXXL_VERSION "1.4.1")
|
||||
set(MASON_STXXL_VERSION "1.4.1-1")
|
||||
set(MASON_EXPAT_VERSION "2.2.0")
|
||||
set(MASON_LUA_VERSION "5.2.4")
|
||||
set(MASON_BZIP2_VERSION "1.0.6")
|
||||
set(MASON_TBB_VERSION "43_20150316")
|
||||
set(MASON_TBB_VERSION "2017_20161128")
|
||||
set(MASON_LIBSHP_VERSION "1.3.0")
|
||||
|
||||
message(STATUS "Enabling mason")
|
||||
|
||||
@@ -41,8 +46,7 @@ if(ENABLE_MASON)
|
||||
message(FATAL_ERROR "curl command required with -DENABLE_MASON")
|
||||
endif()
|
||||
|
||||
set(MASON_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/third_party/mason/mason)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/third_party/mason/mason.cmake)
|
||||
include(mason)
|
||||
endif()
|
||||
|
||||
# be compatible with version handling before cmake 3.x
|
||||
@@ -51,7 +55,7 @@ if (POLICY CMP0048)
|
||||
endif()
|
||||
project(OSRM C CXX)
|
||||
set(OSRM_VERSION_MAJOR 5)
|
||||
set(OSRM_VERSION_MINOR 5)
|
||||
set(OSRM_VERSION_MINOR 9)
|
||||
set(OSRM_VERSION_PATCH 0)
|
||||
set(OSRM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
|
||||
|
||||
@@ -63,9 +67,11 @@ add_definitions(-DOSRM_PROJECT_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
# include_directories and add_definitions for both
|
||||
# this build and for sharing externally via pkg-config
|
||||
|
||||
function(add_dependency_includes includes)
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS "${includes}")
|
||||
set(DEPENDENCIES_INCLUDE_DIRS "${DEPENDENCIES_INCLUDE_DIRS}" PARENT_SCOPE)
|
||||
function(add_dependency_includes)
|
||||
if(${ARGC} GREATER 0)
|
||||
list(APPEND DEPENDENCIES_INCLUDE_DIRS "${ARGV}")
|
||||
set(DEPENDENCIES_INCLUDE_DIRS "${DEPENDENCIES_INCLUDE_DIRS}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction(add_dependency_includes)
|
||||
|
||||
function(add_dependency_defines defines)
|
||||
@@ -78,8 +84,6 @@ include(CheckCXXCompilerFlag)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
set(bitness 32)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(bitness 64)
|
||||
@@ -116,14 +120,21 @@ configure_file(
|
||||
)
|
||||
file(GLOB UtilGlob src/util/*.cpp src/util/*/*.cpp)
|
||||
file(GLOB ExtractorGlob src/extractor/*.cpp src/extractor/*/*.cpp)
|
||||
file(GLOB PartitionerGlob src/partition/*.cpp)
|
||||
file(GLOB CustomizerGlob src/customize/*.cpp)
|
||||
file(GLOB ContractorGlob src/contractor/*.cpp)
|
||||
file(GLOB UpdaterGlob src/updater/*.cpp)
|
||||
file(GLOB StorageGlob src/storage/*.cpp)
|
||||
file(GLOB ServerGlob src/server/*.cpp src/server/**/*.cpp)
|
||||
file(GLOB EngineGlob src/engine/*.cpp src/engine/**/*.cpp)
|
||||
file(GLOB ErrorcodesGlob src/osrm/errorcodes.cpp)
|
||||
|
||||
add_library(UTIL OBJECT ${UtilGlob})
|
||||
add_library(EXTRACTOR OBJECT ${ExtractorGlob})
|
||||
add_library(PARTITIONER OBJECT ${PartitionerGlob})
|
||||
add_library(CUSTOMIZER OBJECT ${CustomizerGlob})
|
||||
add_library(CONTRACTOR OBJECT ${ContractorGlob})
|
||||
add_library(UPDATER OBJECT ${UpdaterGlob})
|
||||
add_library(STORAGE OBJECT ${StorageGlob})
|
||||
add_library(ENGINE OBJECT ${EngineGlob})
|
||||
add_library(SERVER OBJECT ${ServerGlob})
|
||||
@@ -131,12 +142,17 @@ add_library(SERVER OBJECT ${ServerGlob})
|
||||
set_target_properties(UTIL PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(osrm-extract src/tools/extract.cpp)
|
||||
add_executable(osrm-partition src/tools/partition.cpp)
|
||||
add_executable(osrm-customize src/tools/customize.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-datastore src/tools/store.cpp $<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_contract $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_contract src/osrm/contractor.cpp $<TARGET_OBJECTS:CONTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_extract src/osrm/extractor.cpp $<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_partition $<TARGET_OBJECTS:PARTITIONER> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_customize $<TARGET_OBJECTS:CUSTOMIZER> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_update $<TARGET_OBJECTS:UPDATER> $<TARGET_OBJECTS:UTIL>)
|
||||
add_library(osrm_store $<TARGET_OBJECTS:STORAGE> $<TARGET_OBJECTS:UTIL>)
|
||||
|
||||
if(ENABLE_GOLD_LINKER)
|
||||
@@ -159,6 +175,13 @@ if(ENABLE_GOLD_LINKER)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Disable LTO when mason+gcc is detected before testing for / setting any flags.
|
||||
# Mason builds libraries with Clang, mixing does not work in the context of lto.
|
||||
if(ENABLE_MASON AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND ENABLE_LTO)
|
||||
set(ENABLE_LTO OFF)
|
||||
message(WARNING "Mason and GCC's LTO not work together. Disabling LTO.")
|
||||
endif()
|
||||
|
||||
# Explicitly set the build type to Release if no other type is specified
|
||||
# on the command line. Without this, cmake defaults to an unoptimized,
|
||||
# non-debug build, which almost nobody wants.
|
||||
@@ -282,11 +305,13 @@ endif()
|
||||
if (ENABLE_SANITIZER)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
set(OSRM_CXXFLAGS "${OSRM_CXXFLAGS} -fsanitize=address")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
|
||||
# Configuring compilers
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wuninitialized -Wunreachable-code -Wstrict-overflow=2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -fcolor-diagnostics -ftemplate-depth=1024")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wuninitialized -Wunreachable-code -Wstrict-overflow=2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -fcolor-diagnostics -ftemplate-depth=1024 -Wno-unused-command-line-argument")
|
||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
set(COLOR_FLAG "-fdiagnostics-color=auto")
|
||||
check_cxx_compiler_flag("-fdiagnostics-color=auto" HAS_COLOR_FLAG)
|
||||
@@ -299,12 +324,21 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
add_dependency_defines(-DWIN32)
|
||||
set(OPTIONAL_SOCKET_LIBS ws2_32 wsock32)
|
||||
endif()
|
||||
|
||||
# -fpermissive is required for parallel_do Intel TBB internal issue with GCC < 5
|
||||
# https://github.com/Project-OSRM/osrm-backend/pull/3603#issuecomment-277688589
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||
message(STATUS "Adding -fpermissive for GCC version < 5 bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51048). See #3603.")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
|
||||
endif()
|
||||
|
||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
|
||||
# using Intel C++
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel -wd10237 -Wall -ipo -fPIC")
|
||||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} zlib)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # avoid compiler error C1128 from scripting_environment_lua.cpp
|
||||
add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC)
|
||||
add_dependency_defines(-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_dependency_defines(-DNOMINMAX) # avoid min and max macros that can break compilation
|
||||
@@ -395,9 +429,12 @@ if(ENABLE_MASON)
|
||||
mason_use(boost_libsystem VERSION ${MASON_BOOST_VERSION})
|
||||
set(Boost_SYSTEM_LIBRARY ${MASON_PACKAGE_boost_libsystem_STATIC_LIBS})
|
||||
|
||||
mason_use(stxxl VERSION ${MASON_STXXL_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_stxxl_INCLUDE_DIRS})
|
||||
set(STXXL_LIBRARY ${MASON_PACKAGE_stxxl_STATIC_LIBS})
|
||||
if (ENABLE_STXXL)
|
||||
mason_use(stxxl VERSION ${MASON_STXXL_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_stxxl_INCLUDE_DIRS})
|
||||
set(MAYBE_STXXL_LIBRARY ${MASON_PACKAGE_stxxl_STATIC_LIBS})
|
||||
add_definitions(-DUSE_STXXL_LIBRARY)
|
||||
endif()
|
||||
|
||||
mason_use(expat VERSION ${MASON_EXPAT_VERSION})
|
||||
add_dependency_includes(${MASON_PACKAGE_expat_INCLUDE_DIRS})
|
||||
@@ -441,6 +478,8 @@ if(ENABLE_MASON)
|
||||
# expat and bzip2 are used from mason rather than the system
|
||||
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include)
|
||||
|
||||
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/third_party/rapidjson/include)
|
||||
|
||||
else()
|
||||
|
||||
find_package(Boost 1.54 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||
@@ -458,8 +497,16 @@ else()
|
||||
find_package(EXPAT REQUIRED)
|
||||
add_dependency_includes(${EXPAT_INCLUDE_DIRS})
|
||||
|
||||
find_package(STXXL REQUIRED)
|
||||
add_dependency_includes(${STXXL_INCLUDE_DIR})
|
||||
if (ENABLE_STXXL)
|
||||
find_package(STXXL)
|
||||
if (STXXL_FOUND)
|
||||
add_dependency_includes(${STXXL_INCLUDE_DIR})
|
||||
set(MAYBE_STXXL_LIBRARY ${STXXL_LIBRARY})
|
||||
add_definitions(-DUSE_STXXL_LIBRARY)
|
||||
else()
|
||||
MESSAGE(STATUS "STXXL was requested but not found, default STL will be used")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(BZip2 REQUIRED)
|
||||
add_dependency_includes(${BZIP2_INCLUDE_DIR})
|
||||
@@ -504,10 +551,15 @@ else()
|
||||
|
||||
# note libosmium depends on expat and bzip2
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/cmake")
|
||||
set(OSMIUM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include")
|
||||
if(NOT OSMIUM_INCLUDE_DIR)
|
||||
set(OSMIUM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include")
|
||||
endif()
|
||||
find_package(Osmium REQUIRED COMPONENTS io)
|
||||
include_directories(SYSTEM ${OSMIUM_INCLUDE_DIR})
|
||||
|
||||
set(RAPIDJSON_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/rapidjson/include")
|
||||
include_directories(SYSTEM ${RAPIDJSON_INCLUDE_DIR})
|
||||
|
||||
endif()
|
||||
|
||||
# prefix compilation with ccache by default if available and on clang or gcc
|
||||
@@ -564,6 +616,8 @@ set(BOOST_ENGINE_LIBRARIES
|
||||
# Binaries
|
||||
target_link_libraries(osrm-datastore osrm_store ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(osrm-extract osrm_extract ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(osrm-partition osrm_partition ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(osrm-customize osrm_customize ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(osrm-contract osrm_contract ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(osrm-routed osrm ${Boost_PROGRAM_OPTIONS_LIBRARY} ${OPTIONAL_SOCKET_LIBS} ${ZLIB_LIBRARY})
|
||||
|
||||
@@ -575,15 +629,35 @@ set(EXTRACTOR_LIBRARIES
|
||||
${EXPAT_LIBRARIES}
|
||||
${USED_LUA_LIBRARIES}
|
||||
${OSMIUM_LIBRARIES}
|
||||
${STXXL_LIBRARY}
|
||||
${MAYBE_STXXL_LIBRARY}
|
||||
${TBB_LIBRARIES}
|
||||
${ZLIB_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(PARTITIONER_LIBRARIES
|
||||
${BOOST_ENGINE_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES}
|
||||
${ZLIB_LIBRARY})
|
||||
set(CUSTOMIZER_LIBRARIES
|
||||
${BOOST_ENGINE_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
set(UPDATER_LIBRARIES
|
||||
${BOOST_BASE_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES}
|
||||
${ZLIB_LIBRARY})
|
||||
set(CONTRACTOR_LIBRARIES
|
||||
${BOOST_BASE_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${USED_LUA_LIBRARIES}
|
||||
${STXXL_LIBRARY}
|
||||
${MAYBE_STXXL_LIBRARY}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_RT_LIBRARY}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
@@ -603,18 +677,22 @@ set(STORAGE_LIBRARIES
|
||||
set(UTIL_LIBRARIES
|
||||
${BOOST_BASE_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${STXXL_LIBRARY}
|
||||
${MAYBE_STXXL_LIBRARY}
|
||||
${TBB_LIBRARIES}
|
||||
${MAYBE_COVERAGE_LIBRARIES})
|
||||
|
||||
# Libraries
|
||||
target_link_libraries(osrm ${ENGINE_LIBRARIES})
|
||||
target_link_libraries(osrm_contract ${CONTRACTOR_LIBRARIES})
|
||||
target_link_libraries(osrm_update ${UPDATER_LIBRARIES})
|
||||
target_link_libraries(osrm_contract ${CONTRACTOR_LIBRARIES} osrm_update)
|
||||
target_link_libraries(osrm_extract ${EXTRACTOR_LIBRARIES})
|
||||
target_link_libraries(osrm_partition ${PARTITIONER_LIBRARIES})
|
||||
target_link_libraries(osrm_customize ${CUSTOMIZER_LIBRARIES} osrm_update)
|
||||
target_link_libraries(osrm_store ${STORAGE_LIBRARIES})
|
||||
|
||||
# BUILD_COMPONENTS
|
||||
add_executable(osrm-components src/tools/components.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
target_link_libraries(osrm-components ${TBB_LIBRARIES} ${BOOST_BASE_LIBRARIES})
|
||||
target_link_libraries(osrm-components ${TBB_LIBRARIES} ${BOOST_BASE_LIBRARIES} ${UTIL_LIBRARIES})
|
||||
install(TARGETS osrm-components DESTINATION bin)
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
@@ -624,11 +702,12 @@ if(BUILD_TOOLS)
|
||||
|
||||
install(TARGETS osrm-io-benchmark DESTINATION bin)
|
||||
|
||||
find_package(Shapefile) # package libshp-dev
|
||||
if(Shapefile_FOUND)
|
||||
find_package(Shapefile)
|
||||
if(SHAPEFILE_FOUND AND (Boost_VERSION VERSION_GREATER 106000 OR ENABLE_MASON))
|
||||
add_executable(osrm-extract-conditionals src/tools/extract-conditionals.cpp $<TARGET_OBJECTS:UTIL>)
|
||||
target_include_directories(osrm-extract-conditionals PRIVATE ${LIBSHAPEFILE_INCLUDE_DIR})
|
||||
target_link_libraries(osrm-extract-conditionals ${OSMIUM_LIBRARIES} ${BOOST_BASE_LIBRARIES} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${LIBSHAPEFILE_LIBRARY})
|
||||
target_link_libraries(osrm-extract-conditionals ${OSMIUM_LIBRARIES} ${BOOST_BASE_LIBRARIES} ${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${UTIL_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARY} ${EXPAT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
install(TARGETS osrm-extract-conditionals DESTINATION bin)
|
||||
endif()
|
||||
endif()
|
||||
@@ -642,6 +721,7 @@ endif()
|
||||
# (i.e., from /usr/local/bin/) the linker can find library dependencies. For
|
||||
# more info see http://www.cmake.org/Wiki/CMake_RPATH_handling
|
||||
set_property(TARGET osrm-extract PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
set_property(TARGET osrm-partition PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
set_property(TARGET osrm-contract PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
set_property(TARGET osrm-datastore PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
set_property(TARGET osrm-routed PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
@@ -649,25 +729,32 @@ set_property(TARGET osrm-routed PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
file(GLOB VariantGlob third_party/variant/include/mapbox/*.hpp)
|
||||
file(GLOB LibraryGlob include/osrm/*.hpp)
|
||||
file(GLOB ParametersGlob include/engine/api/*_parameters.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(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp include/util/typedefs.hpp include/util/strong_typedef.hpp include/util/exception.hpp)
|
||||
set(EngineHeader include/engine/status.hpp include/engine/engine_config.hpp include/engine/hint.hpp include/engine/bearing.hpp include/engine/approach.hpp include/engine/phantom_node.hpp)
|
||||
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp include/util/typedefs.hpp include/util/alias.hpp include/util/exception.hpp)
|
||||
set(ExtractorHeader include/extractor/extractor.hpp include/extractor/extractor_config.hpp include/extractor/travel_mode.hpp)
|
||||
set(PartitionerHeader include/partition/partitioner.hpp include/partition/partition_config.hpp)
|
||||
set(ContractorHeader include/contractor/contractor.hpp include/contractor/contractor_config.hpp)
|
||||
set(StorageHeader include/storage/storage.hpp include/storage/storage_config.hpp)
|
||||
install(FILES ${EngineHeader} DESTINATION include/osrm/engine)
|
||||
install(FILES ${UtilHeader} DESTINATION include/osrm/util)
|
||||
install(FILES ${StorageHeader} DESTINATION include/osrm/storage)
|
||||
install(FILES ${ExtractorHeader} DESTINATION include/osrm/extractor)
|
||||
install(FILES ${PartitionerHeader} DESTINATION include/osrm/partition)
|
||||
install(FILES ${ContractorHeader} DESTINATION include/osrm/contractor)
|
||||
install(FILES ${LibraryGlob} DESTINATION include/osrm)
|
||||
install(FILES ${ParametersGlob} DESTINATION include/osrm/engine/api)
|
||||
install(FILES ${VariantGlob} DESTINATION include/mapbox)
|
||||
install(TARGETS osrm-extract DESTINATION bin)
|
||||
install(TARGETS osrm-partition DESTINATION bin)
|
||||
install(TARGETS osrm-customize DESTINATION bin)
|
||||
install(TARGETS osrm-contract DESTINATION bin)
|
||||
install(TARGETS osrm-datastore DESTINATION bin)
|
||||
install(TARGETS osrm-routed DESTINATION bin)
|
||||
install(TARGETS osrm DESTINATION lib)
|
||||
install(TARGETS osrm_extract DESTINATION lib)
|
||||
install(TARGETS osrm_partition DESTINATION lib)
|
||||
install(TARGETS osrm_customize DESTINATION lib)
|
||||
install(TARGETS osrm_update DESTINATION lib)
|
||||
install(TARGETS osrm_contract DESTINATION lib)
|
||||
install(TARGETS osrm_store DESTINATION lib)
|
||||
|
||||
@@ -734,6 +821,11 @@ add_custom_target(uninstall
|
||||
add_subdirectory(unit_tests)
|
||||
add_subdirectory(src/benchmarks)
|
||||
|
||||
if (ENABLE_NODE_BINDINGS)
|
||||
add_subdirectory(src/nodejs)
|
||||
endif()
|
||||
|
||||
|
||||
if (ENABLE_FUZZING)
|
||||
# Requires libosrm being built with sanitizers; make configurable and default to ubsan
|
||||
set(FUZZ_SANITIZER "undefined" CACHE STRING "Sanitizer to be used for Fuzz testing")
|
||||
@@ -749,18 +841,21 @@ if (ENABLE_FUZZING)
|
||||
endif ()
|
||||
|
||||
|
||||
## add headers sanity check target that includes all headers independently
|
||||
set(check_headers_dir "${PROJECT_BINARY_DIR}/check-headers")
|
||||
file(GLOB_RECURSE headers_to_check
|
||||
${PROJECT_BINARY_DIR}/*.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/*.hpp)
|
||||
foreach(header ${headers_to_check})
|
||||
get_filename_component(filename ${header} NAME_WE)
|
||||
set(filename "${check_headers_dir}/${filename}.cpp")
|
||||
if (NOT EXISTS ${filename})
|
||||
file(WRITE ${filename} "#include \"${header}\"\n")
|
||||
endif()
|
||||
list(APPEND sources ${filename})
|
||||
endforeach()
|
||||
add_library(check-headers STATIC EXCLUDE_FROM_ALL ${sources})
|
||||
set_target_properties(check-headers PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${check_headers_dir})
|
||||
# add headers sanity check target that includes all headers independently
|
||||
# make sure we have all deps for the nodejs sub project's includes (nan, node)
|
||||
if (ENABLE_NODE_BINDINGS)
|
||||
set(check_headers_dir "${PROJECT_BINARY_DIR}/check-headers")
|
||||
file(GLOB_RECURSE headers_to_check
|
||||
${PROJECT_BINARY_DIR}/*.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/*.hpp)
|
||||
foreach(header ${headers_to_check})
|
||||
get_filename_component(filename ${header} NAME_WE)
|
||||
set(filename "${check_headers_dir}/${filename}.cpp")
|
||||
if (NOT EXISTS ${filename})
|
||||
file(WRITE ${filename} "#include \"${header}\"\n")
|
||||
endif()
|
||||
list(APPEND sources ${filename})
|
||||
endforeach()
|
||||
add_library(check-headers STATIC EXCLUDE_FROM_ALL ${sources})
|
||||
set_target_properties(check-headers PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${check_headers_dir})
|
||||
endif()
|
||||
|
||||
@@ -16,58 +16,13 @@ The following services are available via HTTP API, C++ library interface and Nod
|
||||
|
||||
To quickly try OSRM use our [demo server](http://map.project-osrm.org) which comes with both the backend and a frontend on top.
|
||||
|
||||
For a quick introduction about how the road network is represented in OpenStreetMap and how to map specific road network features have a look at [this guide about mapping for navigation](https://www.mapbox.com/mapping/mapping-for-navigation/).
|
||||
|
||||
Related [Project-OSRM](https://github.com/Project-OSRM) repositories:
|
||||
- [node-osrm](https://github.com/Project-OSRM/node-osrm) - Production-ready NodeJs bindings for the routing engine
|
||||
- [node-osrm](https://www.npmjs.com/package/osrm) - Production-ready NodeJs bindings for the routing engine
|
||||
- [osrm-frontend](https://github.com/Project-OSRM/osrm-frontend) - User-facing frontend with map. The demo server runs this on top of the backend
|
||||
- [osrm-text-instructions](https://github.com/Project-OSRM/osrm-text-instructions) - Text instructions from OSRM route response
|
||||
|
||||
## Contact
|
||||
|
||||
- IRC: `irc.oftc.net`, channel: `#osrm` ([Webchat](https://webchat.oftc.net))
|
||||
- Mailinglist: `https://lists.openstreetmap.org/listinfo/osrm-talk`
|
||||
|
||||
## Quick Start
|
||||
|
||||
The following targets Ubuntu 16.04.
|
||||
For instructions how to build on different distributions, macOS or Windows see our [Wiki](https://github.com/Project-OSRM/osrm-backend/wiki).
|
||||
|
||||
#### Install dependencies
|
||||
|
||||
```bash
|
||||
sudo apt install build-essential git cmake pkg-config \
|
||||
libbz2-dev libstxxl-dev libstxxl1v5 libxml2-dev \
|
||||
libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libtbb-dev
|
||||
```
|
||||
|
||||
#### Compile and install OSRM binaries:
|
||||
|
||||
```bash
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
sudo cmake --build . --target install
|
||||
```
|
||||
|
||||
#### Grab a `.osm.pbf` extract from [Geofabrik](http://download.geofabrik.de/index.html) or [Mapzen's Metro Extracts](https://mapzen.com/data/metro-extracts/)
|
||||
|
||||
```bash
|
||||
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
|
||||
```
|
||||
|
||||
#### Pre-process the extract and start the HTTP server
|
||||
|
||||
```
|
||||
osrm-extract berlin-latest.osm.pbf -p profiles/car.lua
|
||||
osrm-contract berlin-latest.osrm
|
||||
osrm-routed berlin-latest.osrm
|
||||
```
|
||||
|
||||
#### Running Queries
|
||||
|
||||
```
|
||||
curl http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true
|
||||
```
|
||||
- [osrm-backend-docker](https://hub.docker.com/r/osrm/osrm-backend/) - Ready to use Docker images
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -77,16 +32,134 @@ curl http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496
|
||||
- [osrm-routed HTTP API documentation](docs/http.md)
|
||||
- [libosrm API documentation](docs/libosrm.md)
|
||||
|
||||
## Contact
|
||||
|
||||
### Running a request against the Demo Server
|
||||
- IRC: `irc.oftc.net`, channel: `#osrm` ([Webchat](https://webchat.oftc.net))
|
||||
- Mailinglist: `https://lists.openstreetmap.org/listinfo/osrm-talk`
|
||||
|
||||
## Quick Start
|
||||
|
||||
The easiest and quickest way to setup your own routing engine is to use Docker images we provide.
|
||||
|
||||
### Using Docker
|
||||
|
||||
We base our Docker images ([backend](https://hub.docker.com/r/osrm/osrm-backend/), [frontend](https://hub.docker.com/r/osrm/osrm-frontend/)) on Alpine Linux and make sure they are as lightweight as possible.
|
||||
|
||||
Download OpenStreetMap extracts for example from [Geofabrik](http://download.geofabrik.de/)
|
||||
|
||||
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
|
||||
|
||||
Pre-process the extract with the car profile and start a routing engine HTTP server on port 5000
|
||||
|
||||
docker run -t -v $(pwd):/data osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf
|
||||
docker run -t -v $(pwd):/data osrm/osrm-backend osrm-contract /data/berlin-latest.osrm
|
||||
|
||||
docker run -t -i -p 5000:5000 -v $(pwd):/data osrm/osrm-backend osrm-routed /data/berlin-latest.osrm
|
||||
|
||||
Make requests against the HTTP server
|
||||
|
||||
curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
|
||||
|
||||
Optionally start a user-friendly frontend on port 9966, and open it up in your browser
|
||||
|
||||
docker run -p 9966:9966 osrm/osrm-frontend
|
||||
xdg-open 'http://127.0.0.1:9966'
|
||||
|
||||
In case Docker complains about not being able to connect to the Docker daemon make sure you are in the `docker` group.
|
||||
|
||||
sudo usermod -aG docker $USER
|
||||
|
||||
After adding yourself to the `docker` group make sure to log out and back in again with your terminal.
|
||||
|
||||
We support the following images on Docker Cloud:
|
||||
|
||||
Name | Description
|
||||
-----|------
|
||||
`latest` | `master` compiled with release flag
|
||||
`latest-assertions` | `master` compiled with with release flag, assertions enabled and debug symbols
|
||||
`latest-debug` | `master` compiled with debug flag
|
||||
`<tag>` | specific tag compiled with release flag
|
||||
`<tag>-debug` | specific tag compiled with debug flag
|
||||
|
||||
### Building from Source
|
||||
|
||||
The following targets Ubuntu 16.04.
|
||||
For instructions how to build on different distributions, macOS or Windows see our [Wiki](https://github.com/Project-OSRM/osrm-backend/wiki).
|
||||
|
||||
Install dependencies
|
||||
|
||||
```bash
|
||||
sudo apt install build-essential git cmake pkg-config \
|
||||
libbz2-dev libstxxl-dev libstxxl1v5 libxml2-dev \
|
||||
libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libtbb-dev
|
||||
```
|
||||
|
||||
Compile and install OSRM binaries
|
||||
|
||||
```bash
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
sudo cmake --build . --target install
|
||||
```
|
||||
|
||||
Grab a `.osm.pbf` extract from [Geofabrik](http://download.geofabrik.de/index.html) or [Mapzen's Metro Extracts](https://mapzen.com/data/metro-extracts/)
|
||||
|
||||
```bash
|
||||
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
|
||||
```
|
||||
|
||||
Pre-process the extract and start the HTTP server
|
||||
|
||||
```
|
||||
osrm-extract berlin-latest.osm.pbf -p profiles/car.lua
|
||||
osrm-contract berlin-latest.osrm
|
||||
osrm-routed berlin-latest.osrm
|
||||
```
|
||||
|
||||
Running Queries
|
||||
|
||||
```
|
||||
curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
|
||||
```
|
||||
|
||||
### Request Against the Demo Server
|
||||
|
||||
Read the [API usage policy](https://github.com/Project-OSRM/osrm-backend/wiki/Api-usage-policy).
|
||||
Simple query with instructions and alternatives on Berlin:
|
||||
|
||||
```
|
||||
curl https://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true&alternatives=true
|
||||
curl "https://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true&alternatives=true"
|
||||
```
|
||||
|
||||
### Using the Node.js Bindings
|
||||
|
||||
The Node.js bindings provide read-only access to the routing engine.
|
||||
We provide API documentation and examples [here](docs/nodejs/api.md).
|
||||
|
||||
You will need a modern `libstdc++` toolchain (`>= GLIBCXX_3.4.20`) for binary compatibility if you want to use the pre-built binaries.
|
||||
For older Ubuntu systems you can upgrade your standard library for example with:
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y libstdc++-5-dev
|
||||
```
|
||||
|
||||
You can install the Node.js bindings via `npm install osrm` or from this repository either via
|
||||
|
||||
npm install
|
||||
|
||||
which will check and use pre-built binaries if they're available for this release and your Node version, or via
|
||||
|
||||
npm install --build-from-source
|
||||
|
||||
to always force building the Node.js bindings from source.
|
||||
|
||||
For usage details have a look [these API docs](docs/nodejs/api.md).
|
||||
|
||||
|
||||
## References in publications
|
||||
|
||||
When using the code in a (scientific) publication, please cite
|
||||
|
||||
+20
-2
@@ -134,11 +134,29 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
ECHO running library-tests.exe ...
|
||||
SET test_region=monaco
|
||||
SET test_region_ch=ch\monaco
|
||||
SET test_region_corech=corech\monaco
|
||||
SET test_region_mld=mld\monaco
|
||||
SET test_osm=%test_region%.osm.pbf
|
||||
IF NOT EXIST %test_osm% powershell Invoke-WebRequest https://s3.amazonaws.com/mapbox/osrm/testing/monaco.osm.pbf -OutFile %test_osm%
|
||||
%Configuration%\osrm-extract.exe -p ../profiles/car.lua %test_osm%
|
||||
%Configuration%\osrm-contract.exe %test_region%.osrm
|
||||
unit_tests\%Configuration%\library-tests.exe %test_region%.osrm
|
||||
MKDIR ch
|
||||
XCOPY %test_region%.osrm.* ch\
|
||||
XCOPY %test_region%.osrm ch\
|
||||
MKDIR corech
|
||||
XCOPY %test_region%.osrm.* corech\
|
||||
XCOPY %test_region%.osrm corech\
|
||||
MKDIR mld
|
||||
XCOPY %test_region%.osrm.* mld\
|
||||
XCOPY %test_region%.osrm mld\
|
||||
%Configuration%\osrm-contract.exe %test_region_ch%.osrm
|
||||
%Configuration%\osrm-contract.exe --core 0.8 %test_region_corech%.osrm
|
||||
%Configuration%\osrm-partition.exe %test_region_mld%.osrm
|
||||
%Configuration%\osrm-customize.exe %test_region_mld%.osrm
|
||||
XCOPY /Y ch\*.* ..\test\data\ch\
|
||||
XCOPY /Y corech\*.* ..\test\data\corech\
|
||||
XCOPY /Y mld\*.* ..\test\data\mld\
|
||||
unit_tests\%Configuration%\library-tests.exe
|
||||
|
||||
IF NOT "%APPVEYOR_REPO_BRANCH%"=="master" GOTO DONE
|
||||
ECHO ========= CREATING PACKAGES ==========
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ build_script:
|
||||
before_test:
|
||||
- node --version
|
||||
- npm --version
|
||||
- npm install
|
||||
- npm link
|
||||
- npm install --ignore-scripts
|
||||
- npm link --ignore-scripts
|
||||
- SET PATH=%CD%\osrm-deps\libs\bin;%PATH%
|
||||
- SET OSRM_BUILD_DIR=build\%Configuration%
|
||||
- npm test
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
"Description": "mason bucket resources",
|
||||
"Description": "user for publishing to s3://mapbox-node-binary/osrm",
|
||||
"Resources": {
|
||||
"BuildUser": {
|
||||
"User": {
|
||||
"Type": "AWS::IAM::User",
|
||||
"Properties": {
|
||||
"Policies": [
|
||||
@@ -15,15 +15,20 @@
|
||||
"s3:ListBucket"
|
||||
],
|
||||
"Effect": "Allow",
|
||||
"Resource": [
|
||||
"arn:aws:s3:::mason-binaries"
|
||||
]
|
||||
"Resource": "arn:aws:s3:::mapbox-node-binary",
|
||||
"Condition": {
|
||||
"StringLike": {
|
||||
"s3:prefix": [
|
||||
"osrm/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"PolicyName": "build",
|
||||
"PolicyName": "publish",
|
||||
"PolicyDocument": {
|
||||
"Statement": [
|
||||
{
|
||||
@@ -35,9 +40,7 @@
|
||||
"s3:PutObjectAcl"
|
||||
],
|
||||
"Effect": "Allow",
|
||||
"Resource": [
|
||||
"arn:aws:s3:::mason-binaries/*"
|
||||
]
|
||||
"Resource": "arn:aws:s3:::mapbox-node-binary/osrm/*"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -45,11 +48,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"BuildUserKey": {
|
||||
"AccessKey": {
|
||||
"Type": "AWS::IAM::AccessKey",
|
||||
"Properties": {
|
||||
"UserName": {
|
||||
"Ref": "BuildUser"
|
||||
"Ref": "User"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,17 +60,16 @@
|
||||
"Outputs": {
|
||||
"AccessKeyId": {
|
||||
"Value": {
|
||||
"Ref": "BuildUserKey"
|
||||
"Ref": "AccessKey"
|
||||
}
|
||||
},
|
||||
"SecretAccessKey": {
|
||||
"Value": {
|
||||
"Fn::GetAtt": [
|
||||
"BuildUserKey",
|
||||
"AccessKey",
|
||||
"SecretAccessKey"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
var cf = require('@mapbox/cloudfriend');
|
||||
var package_json = require('../package.json')
|
||||
|
||||
module.exports = {
|
||||
AWSTemplateFormatVersion: '2010-09-09',
|
||||
Description: 'user for publishing to s3://mapbox-node-binary/' + package_json.name,
|
||||
Resources: {
|
||||
User: {
|
||||
Type: 'AWS::IAM::User',
|
||||
Properties: {
|
||||
Policies: [
|
||||
{
|
||||
PolicyName: 'list',
|
||||
PolicyDocument: {
|
||||
Statement: [
|
||||
{
|
||||
Action: ['s3:ListBucket'],
|
||||
Effect: 'Allow',
|
||||
Resource: 'arn:aws:s3:::mapbox-node-binary',
|
||||
Condition : {
|
||||
StringLike : {
|
||||
"s3:prefix": [ package_json.name + "/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
PolicyName: 'publish',
|
||||
PolicyDocument: {
|
||||
Statement: [
|
||||
{
|
||||
Action: ['s3:DeleteObject', 's3:GetObject', 's3:GetObjectAcl', 's3:PutObject', 's3:PutObjectAcl'],
|
||||
Effect: 'Allow',
|
||||
Resource: 'arn:aws:s3:::mapbox-node-binary/' + package_json.name + '/*'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
AccessKey: {
|
||||
Type: 'AWS::IAM::AccessKey',
|
||||
Properties: {
|
||||
UserName: cf.ref('User')
|
||||
}
|
||||
}
|
||||
},
|
||||
Outputs: {
|
||||
AccessKeyId: {
|
||||
Value: cf.ref('AccessKey')
|
||||
},
|
||||
SecretAccessKey: {
|
||||
Value: cf.getAtt('AccessKey', 'SecretAccessKey')
|
||||
}
|
||||
}
|
||||
};
|
||||
+13
-11
@@ -57,7 +57,7 @@
|
||||
if (WIN32)
|
||||
# has em64t/vc8 em64t/vc9
|
||||
# has ia32/vc7.1 ia32/vc8 ia32/vc9
|
||||
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
|
||||
set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB")
|
||||
set(_TBB_LIB_NAME "tbb")
|
||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||
@@ -102,7 +102,7 @@ if (UNIX)
|
||||
endif(NOT TBB_ARCHITECTURE)
|
||||
else (APPLE)
|
||||
# LINUX
|
||||
set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
|
||||
set(_TBB_DEFAULT_INSTALL_DIR "/usr")
|
||||
set(_TBB_LIB_NAME "tbb")
|
||||
set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
|
||||
set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
|
||||
@@ -185,15 +185,14 @@ set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
|
||||
# containing the headers.
|
||||
find_path(TBB_INCLUDE_DIR
|
||||
tbb/task_scheduler_init.h
|
||||
PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
|
||||
HINTS ${TBB_INC_SEARCH_DIR} ENV CPATH
|
||||
)
|
||||
mark_as_advanced(TBB_INCLUDE_DIR)
|
||||
|
||||
|
||||
#-- Look for libraries
|
||||
# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
|
||||
if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
|
||||
set (_TBB_LIBRARY_DIR
|
||||
set (_TBB_LIBRARY_DIR
|
||||
${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
|
||||
${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
|
||||
)
|
||||
@@ -213,6 +212,11 @@ endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL "
|
||||
# GvdB: Mac OS X distribution places libraries directly in lib directory.
|
||||
list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
|
||||
|
||||
if(EXISTS ${_TBB_INSTALL_DIR}/build)
|
||||
file(GLOB _TBB_BUILD_DIR_RELEASE ${_TBB_INSTALL_DIR}/build/*_release)
|
||||
file(GLOB _TBB_BUILD_DIR_DEBUG ${_TBB_INSTALL_DIR}/build/*_debug)
|
||||
endif()
|
||||
|
||||
# Jiri: No reason not to check the default paths. From recent versions,
|
||||
# tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
|
||||
# variables, which now point to the directories of the lib files.
|
||||
@@ -222,10 +226,8 @@ list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
|
||||
# and LD_LIBRARY_PATH environment variables is now even more important
|
||||
# that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
|
||||
# the use of TBB built from sources.
|
||||
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||
find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_BUILD_DIR_RELEASE} ${_TBB_LIBRARY_DIR})
|
||||
find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_BUILD_DIR_RELEASE} ${_TBB_LIBRARY_DIR})
|
||||
|
||||
#Extract path from TBB_LIBRARY name
|
||||
get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
|
||||
@@ -236,9 +238,9 @@ mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
|
||||
|
||||
#-- Look for debug libraries
|
||||
# Jiri: Changed the same way as for the release libraries.
|
||||
find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
||||
find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_BUILD_DIR_DEBUG} ${_TBB_LIBRARY_DIR}
|
||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||
find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
|
||||
find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_BUILD_DIR_DEBUG} ${_TBB_LIBRARY_DIR}
|
||||
PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
|
||||
|
||||
# Jiri: Self-built TBB stores the debug libraries in a separate directory.
|
||||
|
||||
@@ -1,72 +1,34 @@
|
||||
string(RANDOM LENGTH 16 MASON_INVOCATION)
|
||||
|
||||
# Directory where Mason packages are located; typically ends with mason_packages
|
||||
if (NOT MASON_PACKAGE_DIR)
|
||||
set(MASON_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/mason_packages")
|
||||
endif()
|
||||
|
||||
# URL prefix of where packages are located.
|
||||
if (NOT MASON_REPOSITORY)
|
||||
set(MASON_REPOSITORY "https://mason-binaries.s3.amazonaws.com")
|
||||
endif()
|
||||
|
||||
# Path to Mason executable
|
||||
if (NOT MASON_COMMAND)
|
||||
set(MASON_COMMAND "${CMAKE_SOURCE_DIR}/.mason/mason")
|
||||
endif()
|
||||
|
||||
# Determine platform
|
||||
# we call uname -s manually here since
|
||||
# CMAKE_HOST_SYSTEM_NAME will not be defined before the project() call
|
||||
execute_process(
|
||||
COMMAND uname -s
|
||||
OUTPUT_VARIABLE UNAME_S
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT MASON_PLATFORM)
|
||||
if (UNAME_S STREQUAL "Darwin")
|
||||
set(MASON_PLATFORM "macos")
|
||||
else()
|
||||
set(MASON_PLATFORM "linux")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Determine platform version string
|
||||
if(MASON_PLATFORM STREQUAL "ios")
|
||||
set(MASON_PLATFORM_VERSION "8.0") # Deployment target version
|
||||
elseif(MASON_PLATFORM STREQUAL "android")
|
||||
if (ANDROID_ABI STREQUAL "armeabi")
|
||||
set(MASON_PLATFORM_VERSION "arm-v5-9")
|
||||
elseif(ANDROID_ABI STREQUAL "arm64-v8a")
|
||||
set(MASON_PLATFORM_VERSION "arm-v8-21")
|
||||
elseif(ANDROID_ABI STREQUAL "x86")
|
||||
set(MASON_PLATFORM_VERSION "x86-9")
|
||||
elseif(ANDROID_ABI STREQUAL "x86_64")
|
||||
set(MASON_PLATFORM_VERSION "x86-64-21")
|
||||
elseif(ANDROID_ABI STREQUAL "mips")
|
||||
set(MASON_PLATFORM_VERSION "mips-9")
|
||||
elseif(ANDROID_ABI STREQUAL "mips64")
|
||||
set(MASON_PLATFORM_VERSION "mips64-21")
|
||||
else()
|
||||
set(MASON_PLATFORM_VERSION "arm-v7-9")
|
||||
endif()
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND uname -m
|
||||
OUTPUT_VARIABLE MASON_PLATFORM_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
if(MASON_PLATFORM STREQUAL "macos")
|
||||
set(MASON_PLATFORM "osx")
|
||||
endif()
|
||||
|
||||
set(ENV{MASON_PLATFORM} "${MASON_PLATFORM}")
|
||||
set(ENV{MASON_PLATFORM_VERSION} "${MASON_PLATFORM_VERSION}")
|
||||
# Mason CMake
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
function(mason_detect_platform)
|
||||
# Determine platform
|
||||
if(NOT MASON_PLATFORM)
|
||||
# we call uname -s manually here since
|
||||
# CMAKE_HOST_SYSTEM_NAME will not be defined before the project() call
|
||||
execute_process(
|
||||
COMMAND uname -s
|
||||
OUTPUT_VARIABLE UNAME
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if (UNAME STREQUAL "Darwin")
|
||||
set(MASON_PLATFORM "osx" PARENT_SCOPE)
|
||||
else()
|
||||
set(MASON_PLATFORM "linux" PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Determine platform version string
|
||||
if(NOT MASON_PLATFORM_VERSION)
|
||||
execute_process(
|
||||
COMMAND uname -m
|
||||
OUTPUT_VARIABLE MASON_PLATFORM_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(MASON_PLATFORM_VERSION "${MASON_PLATFORM_VERSION}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(mason_use _PACKAGE)
|
||||
if(NOT _PACKAGE)
|
||||
message(FATAL_ERROR "[Mason] No package name given")
|
||||
@@ -103,7 +65,7 @@ function(mason_use _PACKAGE)
|
||||
if (NOT EXISTS "${_CACHE_PATH}")
|
||||
# Download the package
|
||||
set(_URL "${MASON_REPOSITORY}/${_SLUG}.tar.gz")
|
||||
message(STATUS "[Mason] Downloading package ${_URL}...")
|
||||
message("[Mason] Downloading package ${_URL}...")
|
||||
|
||||
set(_FAILED)
|
||||
set(_ERROR)
|
||||
@@ -123,39 +85,16 @@ function(mason_use _PACKAGE)
|
||||
endif()
|
||||
|
||||
# Unpack the package
|
||||
message(STATUS "[Mason] Unpacking package to ${_INSTALL_PATH_RELATIVE}...")
|
||||
message("[Mason] Unpacking package to ${_INSTALL_PATH_RELATIVE}...")
|
||||
file(MAKE_DIRECTORY "${_INSTALL_PATH}")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xzf "${_CACHE_PATH}"
|
||||
WORKING_DIRECTORY "${_INSTALL_PATH}")
|
||||
endif()
|
||||
|
||||
# Create a config file if it doesn't exist in the package
|
||||
# TODO: remove this once all packages have a mason.ini file
|
||||
# Error out if there is no config file.
|
||||
if(NOT EXISTS "${_INSTALL_PATH}/mason.ini")
|
||||
# Change pkg-config files
|
||||
file(GLOB_RECURSE _PKGCONFIG_FILES "${_INSTALL_PATH}/*.pc")
|
||||
foreach(_PKGCONFIG_FILE IN ITEMS ${_PKGCONFIG_FILES})
|
||||
file(READ "${_PKGCONFIG_FILE}" _PKGCONFIG_FILE_CONTENT)
|
||||
string(REGEX REPLACE "(^|\n)prefix=[^\n]*" "\\1prefix=${_INSTALL_PATH}" _PKGCONFIG_FILE_CONTENT "${_PKGCONFIG_FILE_CONTENT}")
|
||||
file(WRITE "${_PKGCONFIG_FILE}" "${_PKGCONFIG_FILE_CONTENT}")
|
||||
endforeach()
|
||||
|
||||
if(NOT EXISTS "${MASON_COMMAND}")
|
||||
message(FATAL_ERROR "[Mason] Could not find Mason command at ${MASON_COMMAND}")
|
||||
endif()
|
||||
|
||||
set(_FAILED)
|
||||
set(_ERROR)
|
||||
execute_process(
|
||||
COMMAND ${MASON_COMMAND} config ${_PACKAGE} ${_VERSION}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_FILE "${_INSTALL_PATH}/mason.ini"
|
||||
RESULT_VARIABLE _FAILED
|
||||
ERROR_VARIABLE _ERROR)
|
||||
if(_FAILED)
|
||||
message(FATAL_ERROR "[Mason] Could not get configuration for package ${_PACKAGE} ${_VERSION}: ${_ERROR}")
|
||||
endif()
|
||||
message(FATAL_ERROR "[Mason] Could not find mason.ini for package ${_PACKAGE} ${_VERSION}")
|
||||
endif()
|
||||
|
||||
set(MASON_PACKAGE_${_PACKAGE}_PREFIX "${_INSTALL_PATH}" CACHE STRING "${_PACKAGE} ${_INSTALL_PATH}" FORCE)
|
||||
@@ -229,3 +168,48 @@ macro(target_add_mason_package _TARGET _VISIBILITY _PACKAGE)
|
||||
target_compile_options(${_TARGET} ${_VISIBILITY} "${MASON_PACKAGE_${_PACKAGE}_OPTIONS}")
|
||||
target_link_libraries(${_TARGET} ${_VISIBILITY} "${MASON_PACKAGE_${_PACKAGE}_LIBRARIES}")
|
||||
endmacro()
|
||||
|
||||
# Setup
|
||||
|
||||
string(RANDOM LENGTH 16 MASON_INVOCATION)
|
||||
|
||||
# Read environment variables if CMake is run in command mode
|
||||
if (CMAKE_ARGC)
|
||||
set(MASON_PLATFORM "$ENV{MASON_PLATFORM}")
|
||||
set(MASON_PLATFORM_VERSION "$ENV{MASON_PLATFORM_VERSION}")
|
||||
set(MASON_PACKAGE_DIR "$ENV{MASON_PACKAGE_DIR}")
|
||||
set(MASON_REPOSITORY "$ENV{MASON_REPOSITORY}")
|
||||
endif()
|
||||
|
||||
# Directory where Mason packages are located; typically ends with mason_packages
|
||||
if (NOT MASON_PACKAGE_DIR)
|
||||
set(MASON_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/mason_packages")
|
||||
endif()
|
||||
|
||||
# URL prefix of where packages are located.
|
||||
if (NOT MASON_REPOSITORY)
|
||||
set(MASON_REPOSITORY "https://mason-binaries.s3.amazonaws.com")
|
||||
endif()
|
||||
|
||||
mason_detect_platform()
|
||||
|
||||
# Execute commands if CMake is run in command mode
|
||||
if (CMAKE_ARGC)
|
||||
# Collect remaining arguments for passing to mason_use
|
||||
set(_MASON_ARGS)
|
||||
if (${CMAKE_ARGC} LESS 5)
|
||||
message(FATAL_ERROR "Usage: mason.sh [install|prefix] PACKAGE VERSION")
|
||||
endif()
|
||||
|
||||
if (${CMAKE_ARGV3} STREQUAL "install")
|
||||
# Install the package
|
||||
mason_use(${CMAKE_ARGV4} VERSION ${CMAKE_ARGV5})
|
||||
elseif (${CMAKE_ARGV3} STREQUAL "prefix")
|
||||
set(PKG_PREFIX "${MASON_PACKAGE_DIR}/${MASON_PLATFORM}-${MASON_PLATFORM_VERSION}/${CMAKE_ARGV4}/${CMAKE_ARGV5}")
|
||||
# CMake can't write to stdout with message()
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${PKG_PREFIX}")
|
||||
else()
|
||||
message(FATAL_ERROR "Usage: mason.sh [install|prefix] PACKAGE VERSION")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
@@ -1,7 +1,6 @@
|
||||
coverage:
|
||||
|
||||
ignore:
|
||||
- unit_tests/.*
|
||||
- third_party/.*
|
||||
|
||||
comment: off
|
||||
|
||||
+2
-4
@@ -2,8 +2,6 @@ module.exports = {
|
||||
default: '--strict --tags ~@stress --tags ~@todo --require features/support --require features/step_definitions',
|
||||
verify: '--strict --tags ~@stress --tags ~@todo -f progress --require features/support --require features/step_definitions',
|
||||
todo: '--strict --tags @todo --require features/support --require features/step_definitions',
|
||||
all: '--strict --require features/support --require features/step_definitions'
|
||||
all: '--strict --require features/support --require features/step_definitions',
|
||||
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@alternative --require features/support --require features/step_definitions -f progress'
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+49
-14
@@ -1,18 +1,53 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
RUN apt-get update -y && apt-get install -y software-properties-common
|
||||
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
RUN apt-get update -y && apt-get install -y g++-5 libbz2-dev libstxxl-dev libstxxl1 libxml2-dev libzip-dev lua5.1 liblua5.1-0-dev libtbb-dev libgdal-dev libboost-all-dev ccache
|
||||
RUN apt-get -y install curl cmake cmake-curses-gui git
|
||||
FROM alpine:3.5
|
||||
|
||||
RUN mkdir /opt
|
||||
WORKDIR /opt
|
||||
RUN git clone --depth 1 --branch v0.31.0 https://github.com/creationix/nvm.git
|
||||
RUN /bin/bash -c "source /opt/nvm/nvm.sh && nvm install v4"
|
||||
|
||||
RUN useradd -ms /bin/bash mapbox
|
||||
USER mapbox
|
||||
ENV HOME /home/mapbox
|
||||
WORKDIR /home/mapbox
|
||||
RUN NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
|
||||
echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk upgrade && \
|
||||
apk add git cmake wget make libc-dev gcc g++ bzip2-dev boost-dev zlib-dev expat-dev lua5.1-dev libtbb@testing libtbb-dev@testing && \
|
||||
\
|
||||
echo "Building libstxxl" && \
|
||||
cd /opt && \
|
||||
git clone --depth 1 --branch 1.4.1 https://github.com/stxxl/stxxl.git && \
|
||||
cd stxxl && \
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .. && \
|
||||
make -j${NPROC} && \
|
||||
make install
|
||||
|
||||
RUN echo "source /opt/nvm/nvm.sh" > .bashrc
|
||||
RUN echo "source /home/mapbox/.bashrc" > .profile
|
||||
ARG DOCKER_TAG
|
||||
RUN mkdir /src
|
||||
COPY . /src
|
||||
WORKDIR /src
|
||||
|
||||
RUN NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
|
||||
echo "Building OSRM ${DOCKER_TAG}" && \
|
||||
git show --format="%H" | head -n1 > /opt/OSRM_GITSHA && \
|
||||
echo "Building OSRM gitsha $(cat /opt/OSRM_GITSHA)" && \
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
BUILD_TYPE="Release" && \
|
||||
ENABLE_ASSERTIONS="Off" && \
|
||||
BUILD_TOOLS="Off" && \
|
||||
case ${DOCKER_TAG} in *"-debug"*) BUILD_TYPE="Debug";; esac && \
|
||||
case ${DOCKER_TAG} in *"-assertions"*) BUILD_TYPE="RelWithDebInfo" && ENABLE_ASSERTIONS="On" && BUILD_TOOLS="On";; esac && \
|
||||
echo "Building ${BUILD_TYPE} with ENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} BUILD_TOOLS=${BUILD_TOOLS}" && \
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS} -DBUILD_TOOLS=${BUILD_TOOLS} -DENABLE_LTO=On && \
|
||||
make -j${NPROC} install && \
|
||||
cd ../profiles && \
|
||||
cp -r * /opt && \
|
||||
\
|
||||
echo "Cleaning up" && \
|
||||
strip /usr/local/bin/* && \
|
||||
rm /usr/local/lib/libstxxl* && \
|
||||
cd /opt && \
|
||||
apk del boost-dev && \
|
||||
apk del g++ cmake libc-dev expat-dev zlib-dev bzip2-dev lua5.1-dev git make gcc && \
|
||||
apk add boost-filesystem boost-program_options boost-regex boost-iostreams boost-thread libgomp lua5.1 expat && \
|
||||
rm -rf /src /opt/stxxl /usr/local/bin/stxxl_tool /usr/local/lib/libosrm*
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# Docker based continious integration
|
||||
|
||||
Run ```./docker/build-image.sh``` to build a docker image.
|
||||
The image contains all the build dependencies and the state of the local git repository.
|
||||
|
||||
Run ```./docker/run-gcc.sh``` to build OSRM with g++ and run all tests.
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
docker build \
|
||||
-t mapbox/osrm:linux \
|
||||
docker/
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# We've placed the Dockerfile under docker/ so that the generically named
|
||||
# hooks/ directory doesn't pollute the main directory. Because we need to
|
||||
# COPY the source into the container, we need to use some -f gymnastics to
|
||||
# ensure that "COPY . /src" is referring to the repo root, not the directory
|
||||
# that contains the Dockerfile.
|
||||
# This script gets executed with a pwd of wherever the Dockerfile is.
|
||||
docker build --build-arg DOCKER_TAG=${DOCKER_TAG} -t $IMAGE_NAME -f Dockerfile ..
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
docker run \
|
||||
-i \
|
||||
-e "CXX=clang++" \
|
||||
-v `pwd`:/home/mapbox/osrm-backend \
|
||||
-t mapbox/osrm:linux \
|
||||
/bin/bash -lc "osrm-backend/docker/test.sh"
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
docker run \
|
||||
-i \
|
||||
-e "CXX=g++-5" \
|
||||
-e "CC=gcc-5" \
|
||||
-v `pwd`:/home/mapbox/osrm-backend \
|
||||
-t mapbox/osrm:linux \
|
||||
/bin/bash -lc "osrm-backend/docker/test.sh"
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
export CMAKEOPTIONS="-DCMAKE_BUILD_TYPE=Release"
|
||||
|
||||
cd /home/mapbox/osrm-backend
|
||||
[ -d build ] && rm -rf build
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. $CMAKEOPTIONS -DBUILD_TOOLS=1
|
||||
|
||||
make -j`nproc`
|
||||
make tests -j`nproc`
|
||||
#./unit_tests/server-tests
|
||||
#./unit_tests/library-tests
|
||||
#./unit_tests/extractor-tests
|
||||
#./unit_tests/util-tests
|
||||
cd ..
|
||||
npm test
|
||||
+40
-25
@@ -15,7 +15,7 @@ GET /{service}/{version}/{profile}/{coordinates}[.{format}]?option=value&option=
|
||||
| `service` | One of the following values: [`route`](#route-service), [`nearest`](#nearest-service), [`table`](#table-service), [`match`](#match-service), [`trip`](#trip-service), [`tile`](#tile-service) |
|
||||
| `version` | Version of the protocol implemented by the service. `v1` for all OSRM 5.x installations |
|
||||
| `profile` | Mode of transportation, is determined statically by the Lua profile that is used to prepare the data using `osrm-extract`. Typically `car`, `bike` or `foot` if using one of the supplied profiles. |
|
||||
| `coordinates`| String of format `{longitude},{latitude};{longitude},{latitude}[;{longitude},{latitude} ...]` or `polyline({polyline})`. |
|
||||
| `coordinates`| String of format `{longitude},{latitude};{longitude},{latitude}[;{longitude},{latitude} ...]` or `polyline({polyline}) or polyline6({polyline6})`. |
|
||||
| `format`| Only `json` is supported at the moment. This parameter is optional and defaults to `json`. |
|
||||
|
||||
Passing any `option=value` is optional. `polyline` follows Google's polyline format with precision 5 by default and can be generated using [this package](https://www.npmjs.com/package/polyline).
|
||||
@@ -30,6 +30,7 @@ To pass parameters to each location some options support an array like encoding:
|
||||
|radiuses |`{radius};{radius}[;{radius} ...]` |Limits the search to given radius in meters. |
|
||||
|generate\_hints |`true` (default), `false` |Adds a Hint to the response which can be used in subsequent requests, see `hints` parameter. |
|
||||
|hints |`{hint};{hint}[;{hint} ...]` |Hint from previous request to derive position in street network. |
|
||||
|approaches |`{approach};{approach}[;{approach} ...]` |Keep waypoints on curb side. |
|
||||
|
||||
Where the elements follow the following format:
|
||||
|
||||
@@ -38,6 +39,7 @@ Where the elements follow the following format:
|
||||
|bearing |`{value},{range}` `integer 0 .. 360,integer 0 .. 180` |
|
||||
|radius |`double >= 0` or `unlimited` (default) |
|
||||
|hint |Base64 `string` |
|
||||
|approach |`curb` or `unrestricted` (default) |
|
||||
|
||||
```
|
||||
{option}={element};{element}[;{element} ... ]
|
||||
@@ -163,21 +165,21 @@ curl 'http://router.project-osrm.org/nearest/v1/driving/13.388860,52.517037?numb
|
||||
Finds the fastest route between coordinates in the supplied order.
|
||||
|
||||
```endpoint
|
||||
GET /route/v1/{profile}/{coordinates}?alternatives={true|false}&steps={true|false}&geometries={polyline|polyline6|geojson}&overview={full|simplified|false}&annotations={true|false}
|
||||
GET /route/v1/{profile}/{coordinates}?alternatives={true|false|number}&steps={true|false}&geometries={polyline|polyline6|geojson}&overview={full|simplified|false}&annotations={true|false}
|
||||
```
|
||||
|
||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||
|
||||
|Option |Values |Description |
|
||||
|------------|---------------------------------------------|-------------------------------------------------------------------------------|
|
||||
|alternatives|`true`, `false` (default) |Search for alternative routes and return as well.\* |
|
||||
|steps |`true`, `false` (default) |Return route steps for each route leg |
|
||||
|annotations |`true`, `false` (default) |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|alternatives|`true`, `false` (default), or Number |Search for alternative routes. Passing a number `alternatives=n` searches for up to `n` alternative routes.\* |
|
||||
|steps |`true`, `false` (default) |Returned route steps for each route leg |
|
||||
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
||||
|continue\_straight |`default` (default), `true`, `false` |Forces the route to keep going straight at waypoints constraining uturns there even if it would be faster. Default value depends on the profile. |
|
||||
|
||||
\* Please note that even if an alternative route is requested, a result cannot be guaranteed.
|
||||
\* Please note that even if alternative routes are requested, a result cannot be guaranteed.
|
||||
|
||||
**Response**
|
||||
|
||||
@@ -247,7 +249,7 @@ curl 'http://router.project-osrm.org/table/v1/driving/polyline(egs_Iq_aqAppHzbHu
|
||||
|
||||
- `code` if the request was successful `Ok` otherwise see the service dependent and general status codes.
|
||||
- `durations` array of arrays that stores the matrix in row-major order. `durations[i][j]` gives the travel time from
|
||||
the i-th waypoint to the j-th waypoint. Values are given in seconds.
|
||||
the i-th waypoint to the j-th waypoint. Values are given in seconds. Can be `null` if no route between `i` and `j` can be found.
|
||||
- `sources` array of `Waypoint` objects describing all sources in order
|
||||
- `destinations` array of `Waypoint` objects describing all destinations in order
|
||||
|
||||
@@ -273,12 +275,14 @@ In addition to the [general options](#general-options) the following options are
|
||||
|
||||
|Option |Values |Description |
|
||||
|------------|------------------------------------------------|------------------------------------------------------------------------------------------|
|
||||
|steps |`true`, `false` (default) |Return route steps for each route |
|
||||
|steps |`true`, `false` (default) |Returned route steps for each route |
|
||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||
|annotations |`true`, `false` (default) |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
||||
|timestamps |`{timestamp};{timestamp}[;{timestamp} ...]` |Timestamps for the input locations in seconds since UNIX epoch. Timestamps need to be monotonically increasing. |
|
||||
|radiuses |`{radius};{radius}[;{radius} ...]` |Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy.|
|
||||
|gaps |`split` (default), `ignore` |Allows the input track splitting based on huge timestamp gaps between points. |
|
||||
|tidy |`true`, `false` (default) |Allows the input track modification to obtain better matching quality for noisy tracks. |
|
||||
|
||||
|Parameter |Values |
|
||||
|------------|-----------------------------------|
|
||||
@@ -298,6 +302,7 @@ The area to search is chosen such that the correct candidate should be considere
|
||||
Each `Waypoint` object has the following additional properties:
|
||||
- `matchings_index`: Index to the `Route` object in `matchings` the sub-trace was matched to.
|
||||
- `waypoint_index`: Index of the waypoint inside the matched route.
|
||||
- `alternatives_count`: Number of probable alternative matchings for this trace point. A value of zero indicate that this point was matched unambiguously. Split the trace at these points for incremental map matching.
|
||||
- `matchings`: An array of `Route` objects that assemble the trace. Each `Route` object has the following additional properties:
|
||||
- `confidence`: Confidence of the matching. `float` value between 0 and 1. 1 is very confident that the matching is correct.
|
||||
|
||||
@@ -313,7 +318,7 @@ All other properties might be undefined.
|
||||
|
||||
The trip plugin solves the Traveling Salesman Problem using a greedy heuristic (farthest-insertion algorithm) for 10 or more waypoints and uses brute force for less than 10 waypoints.
|
||||
The returned path does not have to be the fastest path. As TSP is NP-hard it only returns an approximation.
|
||||
Note that all input coordinates have to be connected for the trip service to work.
|
||||
Note that all input coordinates have to be connected for the trip service to work.
|
||||
|
||||
```endpoint
|
||||
GET /trip/v1/{profile}/{coordinates}?roundtrip={true|false}&source{any|first}&destination{any|last}&steps={true|false}&geometries={polyline|polyline6|geojson}&overview={simplified|full|false}&annotations={true|false}'
|
||||
@@ -323,17 +328,17 @@ In addition to the [general options](#general-options) the following options are
|
||||
|
||||
|Option |Values |Description |
|
||||
|------------|------------------------------------------------|---------------------------------------------------------------------------|
|
||||
|roundtrip |`true` (default), `false` |Return route is a roundtrip |
|
||||
|source |`any` (default), `first` |Return route starts at `any` or `first` coordinate |
|
||||
|destination |`any` (default), `last` |Return route ends at `any` or `last` coordinate |
|
||||
|steps |`true`, `false` (default) |Return route instructions for each trip |
|
||||
|annotations |`true`, `false` (default) |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|roundtrip |`true` (default), `false` |Returned route is a roundtrip (route returns to first location) |
|
||||
|source |`any` (default), `first` |Returned route starts at `any` or `first` coordinate |
|
||||
|destination |`any` (default), `last` |Returned route ends at `any` or `last` coordinate |
|
||||
|steps |`true`, `false` (default) |Returned route instructions for each trip |
|
||||
|annotations |`true`, `false` (default), `nodes`, `distance`, `duration`, `datasources`, `weight`, `speed` |Returns additional metadata for each coordinate along the route geometry. |
|
||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||
|overview |`simplified` (default), `full`, `false` |Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all.|
|
||||
|
||||
**Fixing Start and End Points**
|
||||
|
||||
It is possible to explicitely set the start or end coordinate of the trip.
|
||||
It is possible to explicitely set the start or end coordinate of the trip.
|
||||
When source is set to `first`, the first coordinate is used as start coordinate of the trip in the output. When destination is set to `last`, the last coordinate will be used as destination of the trip in the returned output. If you specify `any`, any of the coordinates can be used as the first or last coordinate in the output.
|
||||
|
||||
However, if `source=any&destination=any` the returned round-trip will still start at the first input coordinate by default.
|
||||
@@ -343,7 +348,7 @@ Right now, the following combinations are possible:
|
||||
|
||||
| roundtrip | source | destination | supported |
|
||||
| :-- | :-- | :-- | :-- |
|
||||
| true | first | last | **yes** |
|
||||
| true | first | last | **yes** |
|
||||
| true | first | any | **yes** |
|
||||
| true | any | last | **yes** |
|
||||
| true | any | any | **yes** |
|
||||
@@ -414,8 +419,10 @@ Vector tiles contain two layers:
|
||||
| `speed` | `integer` | the speed on that road segment, in km/h |
|
||||
| `is_small` | `boolean` | whether this segment belongs to a small (< 1000 node) [strongly connected component](https://en.wikipedia.org/wiki/Strongly_connected_component) |
|
||||
| `datasource` | `string` | the source for the speed value (normally `lua profile` unless you're using the [traffic update feature](https://github.com/Project-OSRM/osrm-backend/wiki/Traffic), in which case it contains the stem of the filename that supplied the speed value for this segment |
|
||||
| `duration` | `float` | how long this segment takes to traverse, in seconds |
|
||||
| `duration` | `float` | how long this segment takes to traverse, in seconds. This value is to calculate the total route ETA. |
|
||||
| `weight ` | `integer` | how long this segment takes to traverse, in units (may differ from `duration` when artificial biasing is applied in the Lua profiles). ACTUAL ROUTING USES THIS VALUE. |
|
||||
| `name` | `string` | the name of the road this segment belongs to |
|
||||
| `rate` | `float` | the value of `length/weight` - analagous to `speed`, but using the `weight` value rather than `duration`, rounded to the nearest integer |
|
||||
|
||||
`turns` layer:
|
||||
|
||||
@@ -424,6 +431,7 @@ Vector tiles contain two layers:
|
||||
| `bearing_in` | `integer` | the absolute bearing that approaches the intersection. -180 to +180, 0 = North, 90 = East |
|
||||
| `turn_angle` | `integer` | the angle of the turn, relative to the `bearing_in`. -180 to +180, 0 = straight ahead, 90 = 90-degrees to the right |
|
||||
| `cost` | `float` | the time we think it takes to make that turn, in seconds. May be negative, depending on how the data model is constructed (some turns get a "bonus"). |
|
||||
| `weight` | `float` | the weight we think it takes to make that turn. May be negative, depending on how the data model is constructed (some turns get a "bonus"). ACTUAL ROUTING USES THIS VALUE |
|
||||
|
||||
|
||||
## Result objects
|
||||
@@ -483,9 +491,9 @@ Represents a route between two waypoints.
|
||||
- `distance`: The distance traveled by this route leg, in `float` meters.
|
||||
- `duration`: The estimated travel time, in `float` number of seconds.
|
||||
- `weight`: The calculated weight of the route leg.
|
||||
- `summary`: Summary of the route taken as `string`. Depends on the `steps` parameter:
|
||||
- `summary`: Summary of the route taken as `string`. Depends on the `summary` parameter:
|
||||
|
||||
| steps | |
|
||||
| summary | |
|
||||
|--------------|-----------------------------------------------------------------------|
|
||||
| true | Names of the two major roads used. Can be empty if route is too short.|
|
||||
| false | empty `string` |
|
||||
@@ -518,7 +526,8 @@ With `steps=false` and `annotations=true`:
|
||||
"distance": [5,5,10,5,5],
|
||||
"duration": [15,15,40,15,15],
|
||||
"datasources": [1,0,0,0,1],
|
||||
"nodes": [49772551,49772552,49786799,49786800,49786801,49786802]
|
||||
"nodes": [49772551,49772552,49786799,49786800,49786801,49786802],
|
||||
"speed": [0.3, 0.3, 0.3, 0.3, 0.3]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -534,6 +543,7 @@ Annotation of the whole route leg with fine-grained information about each segme
|
||||
- `datasources`: The index of the datasource for the speed between each pair of coordinates. `0` is the default profile, other values are supplied via `--segment-speed-file` to `osrm-contract`
|
||||
- `nodes`: The OSM node ID for each coordinate along the route, excluding the first/last user-supplied coordinates
|
||||
- `weight`: The weights between each pair of coordinates
|
||||
- `speed`: Convenience field, calculation of `distance / duration` rounded to one decimal place
|
||||
|
||||
#### Example
|
||||
|
||||
@@ -571,9 +581,13 @@ step.
|
||||
- `ref`: A reference number or code for the way. Optionally included, if ref data is available for the given way.
|
||||
- `pronunciation`: The pronunciation hint of the way name. Will be `undefined` if there is no pronunciation hit.
|
||||
- `destinations`: The destinations of the way. Will be `undefined` if there are no destinations.
|
||||
- `exits`: The exit numbers or names of the way. Will be `undefined` if there are no exit numbers or names.
|
||||
- `mode`: A string signifying the mode of transportation.
|
||||
- `classes`: An array of strings signifying the classes of the road as specified in the profile.
|
||||
- `maneuver`: A `StepManeuver` object representing the maneuver.
|
||||
- `intersections`: A list of `Intersection` objects that are passed along the segment, the very first belonging to the StepManeuver
|
||||
- `rotary_name`: The name for the rotary. Optionally included, if the step is a rotary and a rotary name is available.
|
||||
- `rotary_pronunciation`: The pronunciation hint of the rotary name. Optionally included, if the step is a rotary and a rotary pronunciation is available.
|
||||
|
||||
#### Example
|
||||
|
||||
@@ -583,6 +597,7 @@ step.
|
||||
"mode" : "driving",
|
||||
"duration" : 15.6,
|
||||
"weight" : 15.6,
|
||||
"classes": ["toll", "restricted"],
|
||||
"intersections" : [
|
||||
{ "bearings" : [ 10, 92, 184, 270 ],
|
||||
"lanes" : [
|
||||
@@ -628,7 +643,7 @@ step.
|
||||
- `bearing_after`: The clockwise angle from true north to the
|
||||
direction of travel immediately after the maneuver. Range 0-359.
|
||||
- `type` A string indicating the type of maneuver. **new identifiers might be introduced without API change**
|
||||
Types unknown to the client should be handled like the `turn` type, the existance of correct `modifier` values is guranteed.
|
||||
Types unknown to the client should be handled like the `turn` type, the existence of correct `modifier` values is guranteed.
|
||||
|
||||
| `type` | Description |
|
||||
|------------------|--------------------------------------------------------------|
|
||||
@@ -644,10 +659,10 @@ step.
|
||||
| `end of road` | road ends in a T intersection turn in direction of `modifier`|
|
||||
| `use lane` | going straight on a specific lane |
|
||||
| `continue` | Turn in direction of `modifier` to stay on the same road |
|
||||
| `roundabout` | traverse roundabout, has additional property `exit` with NR if the roundabout is left. `the modifier specifies the direction of entering the roundabout` |
|
||||
| `rotary` | a traffic circle. While very similar to a larger version of a roundabout, it does not necessarily follow roundabout rules for right of way. It can offer `rotary_name/rotary_pronunciation` in addition to the `exit` parameter. |
|
||||
| `roundabout` | traverse roundabout, has additional property `exit` with NR if the roundabout is left. The modifier specifies the direction of entering the roundabout. |
|
||||
| `rotary` | a traffic circle. While very similar to a larger version of a roundabout, it does not necessarily follow roundabout rules for right of way. It can offer `rotary_name` and/or `rotary_pronunciation` parameters (located in the RouteStep object) in addition to the `exit` parameter (located on the StepManeuver object). |
|
||||
| `roundabout turn`| Describes a turn at a small roundabout that should be treated as normal turn. The `modifier` indicates the turn direciton. Example instruction: `At the roundabout turn left`. |
|
||||
| `notification` | not an actual turn but a change in the driving conditions. For example the travel mode. If the road takes a turn itself, the `modifier` describes the direction |
|
||||
| `notification` | not an actual turn but a change in the driving conditions. For example the travel mode or classes. If the road takes a turn itself, the `modifier` describes the direction |
|
||||
|
||||
Please note that even though there are `new name` and `notification` instructions, the `mode` and `name` can change
|
||||
between all instructions. They only offer a fallback in case nothing else is to report.
|
||||
|
||||
@@ -0,0 +1,338 @@
|
||||
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
||||
|
||||
## OSRM
|
||||
|
||||
The `OSRM` method is the main constructor for creating an OSRM instance.
|
||||
An OSRM instance requires a `.osrm` dataset, which is prepared by the OSRM toolchain.
|
||||
You can create such a `.osrm` file by running the OSRM binaries we ship in `node_modules/osrm/lib/binding/` and default
|
||||
profiles (e.g. for setting speeds and determining road types to route on) in `node_modules/osrm/profiles/`:
|
||||
|
||||
node_modules/osrm/lib/binding/osrm-extract data.osm.pbf -p node_modules/osrm/profiles/car.lua
|
||||
node_modules/osrm/lib/binding/osrm-contract data.osrm
|
||||
|
||||
Consult the [osrm-backend](https://github.com/Project-OSRM/osrm-backend) documentation for further details.
|
||||
|
||||
Once you have a complete `network.osrm` file, you can calculate routes in javascript with this object.
|
||||
|
||||
```javascript
|
||||
var osrm = new OSRM('network.osrm');
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `options` **([Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String))** Options for creating an OSRM object or string to the `.osrm` file. (optional, default `{shared_memory:true}`)
|
||||
- `options.algorithm` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The algorithm to use for routing. Can be 'CH', 'CoreCH' or 'MLD'. Default is 'CH'.
|
||||
Make sure you prepared the dataset with the correct toolchain.
|
||||
- `options.shared_memory` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Connects to the persistent shared memory datastore.
|
||||
This requires you to run `osrm-datastore` prior to creating an `OSRM` object.
|
||||
- `options.path` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true.
|
||||
|
||||
### route
|
||||
|
||||
Returns the fastest route between two or more coordinates while visiting the waypoints in order.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the route query.
|
||||
- `options.coordinates` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
|
||||
- `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
|
||||
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
|
||||
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
|
||||
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
|
||||
- `options.alternatives` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Search for alternative routes and return as well.
|
||||
_Please note that even if an alternative route is requested, a result cannot be guaranteed._ (optional, default `false`)
|
||||
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returned route steps for each route leg. (optional, default `false`)
|
||||
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
|
||||
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
|
||||
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
|
||||
- `options.continue_straight` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile.
|
||||
`null`/`true`/`false`
|
||||
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
|
||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||
|
||||
**Examples**
|
||||
|
||||
```javascript
|
||||
var osrm = new OSRM("berlin-latest.osrm");
|
||||
osrm.route({coordinates: [[52.519930,13.438640], [52.513191,13.415852]]}, function(err, result) {
|
||||
if(err) throw err;
|
||||
console.log(result.waypoints); // array of Waypoint objects representing all waypoints in order
|
||||
console.log(result.routes); // array of Route objects ordered by descending recommendation rank
|
||||
});
|
||||
```
|
||||
|
||||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** An array of [Waypoint](#waypoint) objects representing all waypoints in order AND an array of [`Route`](#route) objects ordered by descending recommendation rank.
|
||||
|
||||
### nearest
|
||||
|
||||
Snaps a coordinate to the street network and returns the nearest n matches.
|
||||
|
||||
Note: `coordinates` in the general options only supports a single `{longitude},{latitude}` entry.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the nearest query.
|
||||
- `options.coordinates` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
|
||||
- `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
|
||||
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
|
||||
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
|
||||
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
|
||||
- `options.number` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of nearest segments that should be returned.
|
||||
Must be an integer greater than or equal to `1`. (optional, default `1`)
|
||||
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
|
||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||
|
||||
**Examples**
|
||||
|
||||
```javascript
|
||||
var osrm = new OSRM('network.osrm');
|
||||
var options = {
|
||||
coordinates: [[13.388860,52.517037]],
|
||||
number: 3,
|
||||
bearings: [[0,20]]
|
||||
};
|
||||
osrm.nearest(options, function(err, response) {
|
||||
console.log(response.waypoints); // array of Waypoint objects
|
||||
});
|
||||
```
|
||||
|
||||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `waypoints`.
|
||||
**`waypoints`**: array of [`Ẁaypoint`](#waypoint) objects sorted by distance to the input coordinate.
|
||||
Each object has an additional `distance` property, which is the distance in meters to the supplied input coordinate.
|
||||
|
||||
### table
|
||||
|
||||
Computes duration tables for the given locations. Allows for both symmetric and asymmetric
|
||||
tables.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the table query.
|
||||
- `options.coordinates` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
|
||||
- `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
|
||||
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
|
||||
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
|
||||
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
|
||||
- `options.sources` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** An array of `index` elements (`0 <= integer < #coordinates`) to
|
||||
use
|
||||
location with given index as source. Default is to use all.
|
||||
- `options.destinations` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** An array of `index` elements (`0 <= integer <
|
||||
#coordinates`) to use location with given index as destination. Default is to use all.
|
||||
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
|
||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||
|
||||
**Examples**
|
||||
|
||||
```javascript
|
||||
var osrm = new OSRM('network.osrm');
|
||||
var options = {
|
||||
coordinates: [
|
||||
[13.388860,52.517037],
|
||||
[13.397634,52.529407],
|
||||
[13.428555,52.523219]
|
||||
]
|
||||
};
|
||||
osrm.table(options, function(err, response) {
|
||||
console.log(response.durations); // array of arrays, matrix in row-major order
|
||||
console.log(response.sources); // array of Waypoint objects
|
||||
console.log(response.destinations); // array of Waypoint objects
|
||||
});
|
||||
```
|
||||
|
||||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `durations`, `sources`, and `destinations`.
|
||||
**`durations`**: array of arrays that stores the matrix in row-major order. `durations[i][j]` gives the travel time from the i-th waypoint to the j-th waypoint.
|
||||
Values are given in seconds.
|
||||
**`sources`**: array of [`Ẁaypoint`](#waypoint) objects describing all sources in order.
|
||||
**`destinations`**: array of [`Ẁaypoint`](#waypoint) objects describing all destinations in order.
|
||||
|
||||
### tile
|
||||
|
||||
This generates [Mapbox Vector Tiles](https://mapbox.com/vector-tiles) that can be viewed with a
|
||||
vector-tile capable slippy-map viewer. The tiles contain road geometries and metadata that can
|
||||
be used to examine the routing graph. The tiles are generated directly from the data in-memory,
|
||||
so are in sync with actual routing results, and let you examine which roads are actually
|
||||
routable,
|
||||
and what weights they have applied.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `ZXY` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** an array consisting of `x`, `y`, and `z` values representing tile coordinates like
|
||||
[wiki.openstreetmap.org/wiki/Slippy_map_tilenames](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames)
|
||||
and are supported by vector tile viewers like [Mapbox GL JS](https://www.mapbox.com/mapbox-gl-js/api/).
|
||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||
|
||||
**Examples**
|
||||
|
||||
```javascript
|
||||
var osrm = new OSRM('network.osrm');
|
||||
osrm.tile([0, 0, 0], function(err, response) {
|
||||
if (err) throw err;
|
||||
fs.writeFileSync('./tile.vector.pbf', response); // write the buffer to a file
|
||||
});
|
||||
```
|
||||
|
||||
Returns **[Buffer](https://nodejs.org/api/buffer.html)** contains a Protocol Buffer encoded vector tile.
|
||||
|
||||
### match
|
||||
|
||||
Map matching matches given GPS points to the road network in the most plausible way.
|
||||
Please note the request might result multiple sub-traces. Large jumps in the timestamps
|
||||
(>60s) or improbable transitions lead to trace splits if a complete matching could
|
||||
not be found. The algorithm might not be able to match all points. Outliers are removed
|
||||
if they can not be matched successfully.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the match query.
|
||||
- `options.coordinates` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
|
||||
- `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
|
||||
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
|
||||
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
|
||||
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returned route steps for each route. (optional, default `false`)
|
||||
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
|
||||
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
|
||||
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
|
||||
- `options.timestamps` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>?** Timestamp of the input location (integers, UNIX-like timestamp).
|
||||
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy. Can be `null` for default value `5` meters or `double >= 0`.
|
||||
- `options.gaps` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Allows the input track splitting based on huge timestamp gaps between points. Either `split` or `ignore`. (optional, default `split`)
|
||||
- `options.tidy` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Allows the input track modification to obtain better matching quality for noisy tracks. (optional, default `false`)
|
||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||
|
||||
**Examples**
|
||||
|
||||
```javascript
|
||||
var osrm = new OSRM('network.osrm');
|
||||
var options = {
|
||||
coordinates: [[13.393252,52.542648],[13.39478,52.543079],[13.397389,52.542107]],
|
||||
timestamps: [1424684612, 1424684616, 1424684620]
|
||||
};
|
||||
osrm.match(options, function(err, response) {
|
||||
if (err) throw err;
|
||||
console.log(response.tracepoints); // array of Waypoint objects
|
||||
console.log(response.matchings); // array of Route objects
|
||||
});
|
||||
```
|
||||
|
||||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `tracepoints` and `matchings`.
|
||||
**`tracepoints`** Array of [`Ẁaypoint`](#waypoint) objects representing all points of the trace in order.
|
||||
If the trace point was ommited by map matching because it is an outlier, the entry will be null.
|
||||
Each `Waypoint` object includes two additional properties, 1) `matchings_index`: Index to the
|
||||
[`Route`](#route) object in matchings the sub-trace was matched to, 2) `waypoint_index`: Index of
|
||||
the waypoint inside the matched route.
|
||||
**`matchings`** is an array of [`Route`](#route) objects that assemble the trace. Each `Route` object has an additional `confidence` property,
|
||||
which is the confidence of the matching. float value between `0` and `1`. `1` is very confident that the matching is correct.
|
||||
|
||||
### trip
|
||||
|
||||
The trip plugin solves the Traveling Salesman Problem using a greedy heuristic
|
||||
(farthest-insertion algorithm) for 10 or _ more waypoints and uses brute force for less than 10
|
||||
waypoints. The returned path does not have to be the shortest path, _ as TSP is NP-hard it is
|
||||
only an approximation.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the trip query.
|
||||
- `options.coordinates` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
|
||||
- `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
|
||||
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
|
||||
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `double >= 0` or `null` (unlimited, default).
|
||||
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
|
||||
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returned route steps for each route. (optional, default `false`)
|
||||
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
|
||||
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
|
||||
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` (optional, default `simplified`)
|
||||
- `options.roundtrip` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returned route is a roundtrip (route returns to first location). (optional, default `true`)
|
||||
- `options.source` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route starts at `any` or `first` coordinate. (optional, default `any`)
|
||||
- `options.destination` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route ends at `any` or `last` coordinate. (optional, default `any`)
|
||||
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
|
||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||
|
||||
A requirement for computing trips is that all input coordinates are connected.
|
||||
Currently, not all combinations of `roundtrip`, `source` and `destination` are supported.
|
||||
Right now, the following combinations are possible:
|
||||
|
||||
| roundtrip | source | destination | supported |
|
||||
| :-------- | :----- | :---------- | :-------- |
|
||||
| true | first | last | **yes** |
|
||||
| true | first | any | **yes** |
|
||||
| true | any | last | **yes** |
|
||||
| true | any | any | **yes** |
|
||||
| false | first | last | **yes** |
|
||||
| false | first | any | no |
|
||||
| false | any | last | no |
|
||||
| false | any | any | no |
|
||||
|
||||
**Examples**
|
||||
|
||||
```javascript
|
||||
var osrm = new OSRM('network.osrm');
|
||||
var options = {
|
||||
coordinates: [
|
||||
[13.36761474609375, 52.51663871100423],
|
||||
[13.374481201171875, 52.506191342034576]
|
||||
],
|
||||
source: "first",
|
||||
destination: "last",
|
||||
roundtrip: false
|
||||
}
|
||||
osrm.trip(options, function(err, response) {
|
||||
if (err) throw err;
|
||||
console.log(response.waypoints); // array of Waypoint objects
|
||||
console.log(response.trips); // array of Route objects
|
||||
});
|
||||
```
|
||||
|
||||
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `waypoints` and `trips`.
|
||||
**`waypoints`**: an array of [`Waypoint`](#waypoint) objects representing all waypoints in input order.
|
||||
Each Waypoint object has the following additional properties,
|
||||
1) `trips_index`: index to trips of the sub-trip the point was matched to, and
|
||||
2) `waypoint_index`: index of the point in the trip.
|
||||
**`trips`**: an array of [`Route`](#route) objects that assemble the trace.
|
||||
|
||||
## Responses
|
||||
|
||||
Responses
|
||||
|
||||
### Route
|
||||
|
||||
Represents a route through (potentially multiple) waypoints.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `exteral` **documentation** in
|
||||
[`osrm-backend`](../http.md#route)
|
||||
|
||||
### RouteLeg
|
||||
|
||||
Represents a route between two waypoints.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `exteral` **documentation** in
|
||||
[`osrm-backend`](../http.md#routeleg)
|
||||
|
||||
### RouteStep
|
||||
|
||||
A step consists of a maneuver such as a turn or merge, followed by a distance of travel along a
|
||||
single way to the subsequent step.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `exteral` **documentation** in
|
||||
[`osrm-backend`](https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#routestep)
|
||||
|
||||
### StepManeuver
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `exteral` **documentation** in
|
||||
[`osrm-backend`](https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#stepmaneuver)
|
||||
|
||||
### Waypoint
|
||||
|
||||
Object used to describe waypoint on a route.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `exteral` **documentation** in
|
||||
[`osrm-backend`](https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#waypoint)
|
||||
@@ -0,0 +1,86 @@
|
||||
# Releasing
|
||||
|
||||
Releasing a new version of `node-osrm` is mostly automated using Travis CI.
|
||||
|
||||
The version of `node-osrm` is locked to the same version as `osrm-backend`. Every `node-osrm` should have a `osrm-backend` release of the same version. Of course, only release a `node-osrm` after the release has been tagged in `osrm-backend`.
|
||||
|
||||
These steps all happen on `master`. After the release is out, create a branch using the MAJOR.MINOR version of the release to document code changes made for that version.
|
||||
|
||||
### Steps to release
|
||||
|
||||
1. Update the `osrm_release` field in `package.json` to the corresonding git tag in `osrm-backend.`
|
||||
|
||||
Confirm the desired OSRM branch and commit to `master`.
|
||||
|
||||
1. Bump node-osrm version
|
||||
|
||||
Update the `CHANGELOG.md` and the `package.json` version if needed.
|
||||
|
||||
1. Check that Travis CI [builds are passing](https://travis-ci.org/Project-OSRM/node-osrm) for the latest commit on `master`.
|
||||
|
||||
1. Publishing binaries
|
||||
|
||||
If travis builds are passing then it's time to publish binaries by committing with a message containing `[publish binary]`. Use an empty commit for this.
|
||||
|
||||
```
|
||||
git commit --allow-empty -m "[publish binary] vMAJOR.MINOR.PATCH"
|
||||
```
|
||||
|
||||
1. Test
|
||||
|
||||
Locally you can now test binaries. Cleanup, re-install, and run the tests like:
|
||||
|
||||
```
|
||||
make clean
|
||||
npm install # will pull remote binaries
|
||||
npm ls # confirm deps are correct
|
||||
make test
|
||||
```
|
||||
|
||||
1. Tag
|
||||
|
||||
Once binaries are published for Linux and OS X then its time to tag a new release and add the changelog to the tag:
|
||||
|
||||
```
|
||||
git tag vMAJOR.MINOR.PATCH -a
|
||||
git push --tags
|
||||
```
|
||||
|
||||
1. Publish node-osrm. **we only do this for stable releases**
|
||||
|
||||
First ensure your local `node-pre-gyp` is up to date:
|
||||
|
||||
```
|
||||
npm ls
|
||||
```
|
||||
|
||||
This is important because it is bundled during packaging.
|
||||
|
||||
If you see any errors then do:
|
||||
|
||||
```
|
||||
rm -rf node_modules/node-pre-gyp
|
||||
npm install node-pre-gyp
|
||||
```
|
||||
|
||||
Now we're ready to publish `node-osrm` to <https://www.npmjs.org/package/osrm>:
|
||||
|
||||
```
|
||||
npm publish
|
||||
```
|
||||
|
||||
Dependent apps can now pull from the npm registry like:
|
||||
|
||||
```
|
||||
"dependencies": {
|
||||
"osrm": "^MAJOR.MINOR.PATCH"
|
||||
}
|
||||
```
|
||||
|
||||
Or can still pull from the github tag like:
|
||||
|
||||
```
|
||||
"dependencies": {
|
||||
"osrm": "https://github.com/Project-OSRM/node-osrm/archive/vMAJOR.MINOR.PATCH.tar.gz"
|
||||
}
|
||||
```
|
||||
+86
-5
@@ -25,23 +25,104 @@ As you scroll down the file you'll see local variables, and then local functions
|
||||
|
||||
`way_function` and `node_function` are the important functions which are called when extracting OpenStreetMap data with `osrm-extract`.
|
||||
|
||||
The following global properties can be set in your profile:
|
||||
|
||||
Attribute | Type | Notes
|
||||
-------------------------------------|----------|----------------------------------------------------------------------------
|
||||
weight_name | String | Name used in output for the routing weight property (default `'duration'`)
|
||||
weight_precision | Unsigned | Decimal precision of edge weights (default `1`)
|
||||
left_hand_driving | Boolean | Are vehicles assumed to drive on the left? (used in guidance, default `false`)
|
||||
use_turn_restrictions | Boolean | Are turn instructions followed? (default `false`)
|
||||
continue_straight_at_waypoint | Boolean | Must the route continue straight on at a via point, or are U-turns allowed? (default `true`)
|
||||
max_speed_for_map_matching | Float | Maximum vehicle speed to be assumed in matching (in m/s)
|
||||
max_turn_weight | Float | Maximum turn penalty weight
|
||||
force_split_edges | Boolean | True value forces a split of forward and backward edges of extracted ways and guarantees that `segment_function` will be called for all segments (default `false`)
|
||||
|
||||
## way_function
|
||||
|
||||
Given an OpenStreetMap way, the way_function will either return nothing (meaning we are not going to route over this way at all), or it will set up a result hash to be returned. The most important thing it will do is set the value of `result.forward_speed` and `result.backward_speed` as a suitable integer value representing the speed for traversing the way.
|
||||
Given an OpenStreetMap way, the `way_function` will either return nothing (meaning we are not going to route over this way at all), or it will set up a result hash to be returned. The most important thing it will do is set the value of `result.forward_speed` and `result.backward_speed` as a suitable integer value representing the speed for traversing the way.
|
||||
|
||||
All other calculations stem from that, including the returned timings in driving directions, but also, less directly, it feeds into the actual routing decisions the engine will take (a way with a slow traversal speed, may be less favoured than a way with fast traversal speed, but it depends how long it is, and... what it connects to in the rest of the network graph)
|
||||
|
||||
Using the power of the scripting language you wouldn't typically see something as simple as a `result.forward_speed = 20` line within the way_function. Instead a way_function will examine the tagging (e.g. `way:get_value_by_key("highway")` and many others), process this information in various ways, calling other local functions, referencing the global variables and look-up hashes, before arriving at the result.
|
||||
Using the power of the scripting language you wouldn't typically see something as simple as a `result.forward_speed = 20` line within the `way_function`. Instead a `way_function` will examine the tagging (e.g. `way:get_value_by_key("highway")` and many others), process this information in various ways, calling other local functions, referencing the global variables and look-up hashes, before arriving at the result.
|
||||
|
||||
## Guidance
|
||||
The following attributes can be set on the result in `way_function`:
|
||||
|
||||
Attribute | Type | Notes
|
||||
----------------------------------------|----------|--------------------------------------------------------------------------
|
||||
forward_speed | Float | Speed on this way in km/h. Mandatory.
|
||||
backward_speed | Float | " "
|
||||
forward_rate | Float | Routing weight, expressed as meters/*weight* (e.g. for a fastest-route weighting, you would want this to be meters/second, so set it to forward_speed/3.6)
|
||||
backward_rate | Float | " "
|
||||
forward_mode | Enum | Mode of travel (e.g. `car`, `ferry`). Mandatory. Defined in `include/extractor/travel_mode.hpp`.
|
||||
backward_mode | Enum | " "
|
||||
forward_classes | Table | Mark this way as being of a specific class, e.g. `result.classes["toll"] = true`. This will be exposed in the API as `classes` on each `RouteStep`.
|
||||
backward_classes | Table | " "
|
||||
duration | Float | Alternative setter for duration of the whole way in both directions
|
||||
weight | Float | Alternative setter for weight of the whole way in both directions
|
||||
turn_lanes_forward | String | Directions for individual lanes (normalised OSM `turn:lanes` value)
|
||||
turn_lanes_backward | String | " "
|
||||
forward_restricted | Boolean | Is this a restricted access road? (e.g. private, or deliveries only; used to enable high turn penalty, so that way is only chosen for start/end of route)
|
||||
backward_restricted | Boolean | " "
|
||||
is_startpoint | Boolean | Can a journey start on this way? (e.g. ferry; if `false`, prevents snapping the start point to this way)
|
||||
roundabout | Boolean | Is this part of a roundabout?
|
||||
circular | Boolean | Is this part of a non-roundabout circular junction?
|
||||
name | String | Name of the way
|
||||
ref | String | Road number
|
||||
destinations | String | The road's destinations
|
||||
exits | String | The ramp's exit numbers or names
|
||||
pronunciation | String | Name pronunciation
|
||||
road_classification.motorway_class | Boolean | Guidance: way is a motorway
|
||||
road_classification.link_class | Boolean | Guidance: way is a slip/link road
|
||||
road_classification.road_priority_class | Enum | Guidance: order in priority list. Defined in `include/extractor/guidance/road_classification.hpp`
|
||||
road_classification.may_be_ignored | Boolean | Guidance: way is non-highway
|
||||
road_classification.num_lanes | Unsigned | Guidance: total number of lanes in way
|
||||
|
||||
### Guidance
|
||||
|
||||
The guidance parameters in profiles are currently a work in progress. They can and will change.
|
||||
Please be aware of this when using guidance configuration possibilities.
|
||||
|
||||
### Road Classification
|
||||
|
||||
Guidance uses road classes to decide on when/if to emit specific instructions and to discover which road is obvious when following a route.
|
||||
Classification uses three flags and a priority-category.
|
||||
The flags indicate whether a road is a motorway (required for on/off ramps), a link type (the ramps itself, if also a motorway) and whether a road may be omittted in considerations (is considered purely for connectivity).
|
||||
The priority-category influences the decision which road is considered the obvious choice and which roads can be seen as fork.
|
||||
Forks can be emitted between roads of similar priority category only. Obvious choices follow a major priority road, if the priority difference is large.
|
||||
|
||||
## node_function
|
||||
|
||||
The following attributes can be set on the result in `node_function`:
|
||||
|
||||
Attribute | Type | Notes
|
||||
----------------|---------|-------------------------------------------------------
|
||||
barrier | Boolean | Is it an impassable barrier?
|
||||
traffic_lights | Boolean | Is it a traffic light (incurs delay in `turn_function`)?
|
||||
|
||||
## segment_function
|
||||
|
||||
The following attributes can be read and set on the result in `segment_function`:
|
||||
|
||||
Attribute | Read/write? | Type | Notes
|
||||
-------------------|-------------|---------|------------------------------------------------------
|
||||
source.lon | Read | Float | Co-ordinates of segment start
|
||||
source.lat | Read | Float | " "
|
||||
target.lon | Read | Float | Co-ordinates of segment end
|
||||
target.lat | Read | Float | " "
|
||||
target.distance | Read | Float | Length of segment
|
||||
weight | Read/write | Float | Routing weight for this segment
|
||||
duration | Read/write | Float | Duration for this segment
|
||||
|
||||
## turn_function
|
||||
|
||||
The following attributes can be read and set on the result in `turn_function`:
|
||||
|
||||
Attribute | Read/write? | Type | Notes
|
||||
-------------------|-------------|---------|------------------------------------------------------
|
||||
direction_modifier | Read | Enum | Geometry of turn. Defined in `include/extractor/guidance/turn_instruction.hpp`
|
||||
turn_type | Read | Enum | Priority of turn. Defined in `include/extractor/guidance/turn_instruction.hpp`
|
||||
has_traffic_light | Read | Boolean | Is a traffic light present at this turn?
|
||||
source_restricted | Read | Boolean | Is it from a restricted access road? (See definition in `way_function`)
|
||||
target_restricted | Read | Boolean | Is it to a restricted access road? (See definition in `way_function`)
|
||||
angle | Read | Float | Angle of turn in degrees (`0-360`: `0`=u-turn, `180`=straight on)
|
||||
duration | Read/write | Float | Penalty to be applied for this turn (duration in deciseconds)
|
||||
weight | Read/write | Float | Penalty to be applied for this turn (routing weight)
|
||||
|
||||
+13
-9
@@ -32,21 +32,25 @@ We may introduce forward-compatible changes: query parameters and response prope
|
||||
|
||||
- The `master` branch is for the bleeding edge development
|
||||
- We create and maintain release branches `x.y` to control the release flow
|
||||
- We create the release branch once we tagged the final version `x.y.0` version, RCs go on master
|
||||
- We create the release branch once we create release branches once we want to release the first RC
|
||||
- RCs go in the release branch, commits needs to be cherry-picked from master
|
||||
- No minor or major version will be released without a code-equal release candidates
|
||||
- For quality assurance, release candidates will be run on the demo server for 24 hours before releaseing the version proper
|
||||
- For quality assurance, release candidates need to be staged beforing tagging a final release
|
||||
- Patch versions may be released without a release candidate
|
||||
- We may backport fixes to older versions and release them as patch versions
|
||||
|
||||
## Releasing a version
|
||||
|
||||
1. Check out the appropriate release branch `x.y`
|
||||
2. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
|
||||
3. Make sure `CHANGELOG.md` is up to date.
|
||||
4. Make sure the OSRM version in `CMakeLists.txt` is up to date
|
||||
5. Use an annotated tag to mark the release: `git tag vx.y.z -a` Body of the tag description should be the changelog entries.
|
||||
6. Use `npm run build-api-docs` to generate the API documentation. Copy `build/docs/*` to `https://github.com/Project-OSRM/project-osrm.github.com` in the `docs/vN.N.N/api` directory
|
||||
6. Push tags and commits: `git push; git push --tags`
|
||||
8. Proceede with the `node-osrm` release as [outlined in the repository](https://github.com/Project-OSRM/node-osrm/blob/master/docs/releasing.md).
|
||||
2. Make sure `CHANGELOG.md` is up to date.
|
||||
3. Make sure the OSRM version in `CMakeLists.txt` is up to date
|
||||
4. Make sure the `package.json` is up to date.
|
||||
5. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
|
||||
6. Use an annotated tag to mark the release: `git tag vx.y.z -a` Body of the tag description should be the changelog entries.
|
||||
7. Use `npm run build-api-docs` to generate the API documentation. Copy `build/docs/*` to `https://github.com/Project-OSRM/project-osrm.github.com` in the `docs/vN.N.N/api` directory
|
||||
8. Push tags and commits: `git push; git push --tags`
|
||||
9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
|
||||
10. Wait until the travis build has been completed and check if the node binaries were published by doing:
|
||||
`rm -rf node_modules && npm install` locally.
|
||||
11. For final releases run `npm publish` or `npm publish --tag next` for release candidates.
|
||||
|
||||
|
||||
@@ -28,6 +28,23 @@ This dataset is a small extract and may not even contain all tags or edge cases.
|
||||
Furthermore this dataset is not in sync with what you see in up-to-date OSM maps or on the demo server.
|
||||
See the library tests for how to add new dataset dependent tests.
|
||||
|
||||
To prepare the test data simply `cd test/data/` and then run `make`.
|
||||
|
||||
### Running Tests
|
||||
|
||||
To build the unit tests:
|
||||
|
||||
```
|
||||
cd build
|
||||
cmake ..
|
||||
make tests
|
||||
```
|
||||
|
||||
You should see the compiled binaries in `build/unit_tests`, you can then run each suite individually:
|
||||
|
||||
```
|
||||
./engine-tests
|
||||
```
|
||||
|
||||
## Cucumber
|
||||
|
||||
|
||||
+2
-2
@@ -58,8 +58,8 @@ int main(int argc, const char *argv[])
|
||||
const auto distance = route.values["distance"].get<json::Number>().value;
|
||||
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)
|
||||
// Warn users if extract does not contain the default coordinates from above
|
||||
if (distance == 0 || 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";
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
process.env.UV_THREADPOOL_SIZE = Math.ceil(require('os').cpus().length * 1.5);
|
||||
|
||||
var express = require('express');
|
||||
var OSRM = require('..');
|
||||
var path = require('path');
|
||||
|
||||
var app = express();
|
||||
var osrm = new OSRM(path.join(__dirname,"../test/data/ch/monaco.osrm"));
|
||||
|
||||
// Accepts a query like:
|
||||
// http://localhost:8888?start=13.414307,52.521835&end=13.402290,52.523728
|
||||
app.get('/', function(req, res) {
|
||||
if (!req.query.start || !req.query.end) {
|
||||
return res.json({"error":"invalid start and end query"});
|
||||
}
|
||||
var coordinates = [];
|
||||
var start = req.query.start.split(',');
|
||||
coordinates.push([+start[0],+start[1]]);
|
||||
var end = req.query.end.split(',');
|
||||
coordinates.push([+end[0],+end[1]]);
|
||||
var query = {
|
||||
coordinates: coordinates,
|
||||
alternateRoute: req.query.alternatives !== 'false'
|
||||
};
|
||||
osrm.route(query, function(err, result) {
|
||||
if (err) return res.json({"error":err.message});
|
||||
return res.json(result);
|
||||
});
|
||||
});
|
||||
|
||||
console.log('Listening on port: ' + 8888);
|
||||
app.listen(8888);
|
||||
+144
-158
@@ -7,193 +7,179 @@ Feature: Bike - Access tags on ways
|
||||
|
||||
Scenario: Bike - Access tag hierarchy on ways
|
||||
Then routability should be
|
||||
| highway | access | vehicle | bicycle | bothw |
|
||||
| | | | | x |
|
||||
| | yes | | | x |
|
||||
| | no | | | |
|
||||
| | | yes | | x |
|
||||
| | | no | | |
|
||||
| | no | yes | | x |
|
||||
| | yes | no | | |
|
||||
| | | | yes | x |
|
||||
| | | | no | |
|
||||
| | no | | yes | x |
|
||||
| | yes | | no | |
|
||||
| | | no | yes | x |
|
||||
| | | yes | no | |
|
||||
| runway | | | | |
|
||||
| runway | yes | | | x |
|
||||
| runway | no | | | |
|
||||
| runway | | yes | | x |
|
||||
| runway | | no | | |
|
||||
| runway | no | yes | | x |
|
||||
| runway | yes | no | | |
|
||||
| runway | | | yes | x |
|
||||
| runway | | | no | |
|
||||
| runway | no | | yes | x |
|
||||
| runway | yes | | no | |
|
||||
| runway | | no | yes | x |
|
||||
| runway | | yes | no | |
|
||||
| highway | access | vehicle | bicycle | bothw |
|
||||
| primary | | | | cycling |
|
||||
| primary | yes | | | cycling |
|
||||
| primary | no | | | |
|
||||
| primary | | yes | | cycling |
|
||||
| primary | | no | | |
|
||||
| primary | no | yes | | cycling |
|
||||
| primary | yes | no | | |
|
||||
| primary | | | yes | cycling |
|
||||
| primary | | | no | |
|
||||
| primary | no | | yes | cycling |
|
||||
| primary | yes | | no | |
|
||||
| primary | | no | yes | cycling |
|
||||
| primary | | yes | no | |
|
||||
|
||||
@todo
|
||||
Scenario: Bike - Access tag in forward direction
|
||||
Then routability should be
|
||||
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
|
||||
| | | | | x | |
|
||||
| | yes | | | x | |
|
||||
| | no | | | | |
|
||||
| | | yes | | x | |
|
||||
| | | no | | | |
|
||||
| | no | yes | | x | |
|
||||
| | yes | no | | | |
|
||||
| | | | yes | x | |
|
||||
| | | | no | | |
|
||||
| | no | | yes | x | |
|
||||
| | yes | | no | | |
|
||||
| | | no | yes | x | |
|
||||
| | | yes | no | | |
|
||||
| runway | | | | x | |
|
||||
| runway | yes | | | x | |
|
||||
| runway | no | | | | |
|
||||
| runway | | yes | | x | |
|
||||
| runway | | no | | | |
|
||||
| runway | no | yes | | x | |
|
||||
| runway | yes | no | | | |
|
||||
| runway | | | yes | x | |
|
||||
| runway | | | no | | |
|
||||
| runway | no | | yes | x | |
|
||||
| runway | yes | | no | | |
|
||||
| runway | | no | yes | x | |
|
||||
| runway | | yes | no | | |
|
||||
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
|
||||
| primary | | | | cycling | |
|
||||
| primary | yes | | | cycling | |
|
||||
| primary | no | | | | |
|
||||
| primary | | yes | | cycling | |
|
||||
| primary | | no | | | |
|
||||
| primary | no | yes | | cycling | |
|
||||
| primary | yes | no | | | |
|
||||
| primary | | | yes | cycling | |
|
||||
| primary | | | no | | |
|
||||
| primary | no | | yes | cycling | |
|
||||
| primary | yes | | no | | |
|
||||
| primary | | no | yes | cycling | |
|
||||
| primary | | yes | no | | |
|
||||
| runway | | | | cycling | |
|
||||
| runway | yes | | | cycling | |
|
||||
| runway | no | | | | |
|
||||
| runway | | yes | | cycling | |
|
||||
| runway | | no | | | |
|
||||
| runway | no | yes | | cycling | |
|
||||
| runway | yes | no | | | |
|
||||
| runway | | | yes | cycling | |
|
||||
| runway | | | no | | |
|
||||
| runway | no | | yes | cycling | |
|
||||
| runway | yes | | no | | |
|
||||
| runway | | no | yes | cycling | |
|
||||
| runway | | yes | no | | |
|
||||
|
||||
@todo
|
||||
Scenario: Bike - Access tag in backward direction
|
||||
Then routability should be
|
||||
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
|
||||
| | | | | | x |
|
||||
| | yes | | | | x |
|
||||
| | no | | | | |
|
||||
| | | yes | | | x |
|
||||
| | | no | | | |
|
||||
| | no | yes | | | x |
|
||||
| | yes | no | | | |
|
||||
| | | | yes | | x |
|
||||
| | | | no | | |
|
||||
| | no | | yes | | x |
|
||||
| | yes | | no | | |
|
||||
| | | no | yes | | x |
|
||||
| | | yes | no | | |
|
||||
| runway | | | | | x |
|
||||
| runway | yes | | | | x |
|
||||
| runway | no | | | | |
|
||||
| runway | | yes | | | x |
|
||||
| runway | | no | | | |
|
||||
| runway | no | yes | | | x |
|
||||
| runway | yes | no | | | |
|
||||
| runway | | | yes | | x |
|
||||
| runway | | | no | | |
|
||||
| runway | no | | yes | | x |
|
||||
| runway | yes | | no | | |
|
||||
| runway | | no | yes | | x |
|
||||
| runway | | yes | no | | |
|
||||
| highway | access:forward | vehicle:forward | bicycle:forward | forw | backw |
|
||||
| primary | | | | | cycling |
|
||||
| primary | yes | | | | cycling |
|
||||
| primary | no | | | | |
|
||||
| primary | | yes | | | cycling |
|
||||
| primary | | no | | | |
|
||||
| primary | no | yes | | | cycling |
|
||||
| primary | yes | no | | | |
|
||||
| primary | | | yes | | cycling |
|
||||
| primary | | | no | | |
|
||||
| primary | no | | yes | | cycling |
|
||||
| primary | yes | | no | | |
|
||||
| primary | | no | yes | | cycling |
|
||||
| primary | | yes | no | | |
|
||||
| runway | | | | | cycling |
|
||||
| runway | yes | | | | cycling |
|
||||
| runway | no | | | | |
|
||||
| runway | | yes | | | cycling |
|
||||
| runway | | no | | | |
|
||||
| runway | no | yes | | | cycling |
|
||||
| runway | yes | no | | | |
|
||||
| runway | | | yes | | cycling |
|
||||
| runway | | | no | | |
|
||||
| runway | no | | yes | | cycling |
|
||||
| runway | yes | | no | | |
|
||||
| runway | | no | yes | | cycling |
|
||||
| runway | | yes | no | | |
|
||||
|
||||
Scenario: Bike - Overwriting implied acccess on ways
|
||||
Then routability should be
|
||||
| highway | access | vehicle | bicycle | bothw |
|
||||
| cycleway | | | | x |
|
||||
| runway | | | | |
|
||||
| cycleway | no | | | |
|
||||
| cycleway | | no | | |
|
||||
| cycleway | | | no | |
|
||||
| runway | yes | | | x |
|
||||
| runway | | yes | | x |
|
||||
| runway | | | yes | x |
|
||||
| highway | access | vehicle | bicycle | bothw |
|
||||
| cycleway | | | | cycling |
|
||||
| runway | | | | |
|
||||
| cycleway | no | | | |
|
||||
| cycleway | | no | | |
|
||||
| cycleway | | | no | |
|
||||
| runway | yes | | | cycling |
|
||||
| runway | | yes | | cycling |
|
||||
| runway | | | yes | cycling |
|
||||
|
||||
Scenario: Bike - Access tags on ways
|
||||
Then routability should be
|
||||
| access | vehicle | bicycle | bothw |
|
||||
| | | | x |
|
||||
| yes | | | x |
|
||||
| permissive | | | x |
|
||||
| designated | | | x |
|
||||
| some_tag | | | x |
|
||||
| no | | | |
|
||||
| private | | | |
|
||||
| agricultural | | | |
|
||||
| forestry | | | |
|
||||
| delivery | | | |
|
||||
| | yes | | x |
|
||||
| | permissive | | x |
|
||||
| | designated | | x |
|
||||
| | some_tag | | x |
|
||||
| | no | | |
|
||||
| | private | | |
|
||||
| | agricultural | | |
|
||||
| | forestry | | |
|
||||
| | delivery | | |
|
||||
| | | yes | x |
|
||||
| | | permissive | x |
|
||||
| | | designated | x |
|
||||
| | | some_tag | x |
|
||||
| | | no | |
|
||||
| | | private | |
|
||||
| | | agricultural | |
|
||||
| | | forestry | |
|
||||
| | | delivery | |
|
||||
| access | vehicle | bicycle | bothw |
|
||||
| | | | cycling |
|
||||
| yes | | | cycling |
|
||||
| permissive | | | cycling |
|
||||
| designated | | | cycling |
|
||||
| some_tag | | | cycling |
|
||||
| no | | | |
|
||||
| private | | | |
|
||||
| agricultural | | | |
|
||||
| forestry | | | |
|
||||
| delivery | | | |
|
||||
| | yes | | cycling |
|
||||
| | permissive | | cycling |
|
||||
| | designated | | cycling |
|
||||
| | some_tag | | cycling |
|
||||
| | no | | |
|
||||
| | private | | |
|
||||
| | agricultural | | |
|
||||
| | forestry | | |
|
||||
| | delivery | | |
|
||||
| | | yes | cycling |
|
||||
| | | permissive | cycling |
|
||||
| | | designated | cycling |
|
||||
| | | some_tag | cycling |
|
||||
| | | no | |
|
||||
| | | private | |
|
||||
| | | agricultural | |
|
||||
| | | forestry | |
|
||||
| | | delivery | |
|
||||
|
||||
Scenario: Bike - Access tags on both node and way
|
||||
Then routability should be
|
||||
| access | node/access | bothw |
|
||||
| yes | yes | x |
|
||||
| yes | no | |
|
||||
| yes | some_tag | x |
|
||||
| no | yes | |
|
||||
| no | no | |
|
||||
| no | some_tag | |
|
||||
| some_tag | yes | x |
|
||||
| some_tag | no | |
|
||||
| some_tag | some_tag | x |
|
||||
| access | node/access | bothw |
|
||||
| yes | yes | cycling |
|
||||
| yes | no | |
|
||||
| yes | some_tag | cycling |
|
||||
| no | yes | |
|
||||
| no | no | |
|
||||
| no | some_tag | |
|
||||
| some_tag | yes | cycling |
|
||||
| some_tag | no | |
|
||||
| some_tag | some_tag | cycling |
|
||||
|
||||
Scenario: Bike - Access combinations
|
||||
Then routability should be
|
||||
| highway | access | vehicle | bicycle | forw | backw |
|
||||
| runway | private | | yes | x | x |
|
||||
| footway | | no | permissive | x | x |
|
||||
| motorway | | | yes | x | |
|
||||
| track | forestry | | permissive | x | x |
|
||||
| cycleway | yes | designated | no | | |
|
||||
| primary | | yes | private | | |
|
||||
| residential | permissive | | no | | |
|
||||
| highway | access | vehicle | bicycle | forw | backw |
|
||||
| runway | private | | yes | cycling | cycling |
|
||||
| footway | | no | permissive | cycling | cycling |
|
||||
| motorway | | | yes | cycling | |
|
||||
| track | forestry | | permissive | cycling | cycling |
|
||||
| cycleway | yes | designated | no | | |
|
||||
| primary | | yes | private | | |
|
||||
| residential | permissive | | no | | |
|
||||
|
||||
Scenario: Bike - Ignore access tags for other modes
|
||||
Then routability should be
|
||||
| highway | boat | motor_vehicle | moped | bothw |
|
||||
| river | yes | | | |
|
||||
| cycleway | no | | | x |
|
||||
| runway | | yes | | |
|
||||
| cycleway | | no | | x |
|
||||
| runway | | | yes | |
|
||||
| cycleway | | | no | x |
|
||||
| highway | boat | motor_vehicle | moped | bothw |
|
||||
| river | yes | | | |
|
||||
| cycleway | no | | | cycling |
|
||||
| runway | | yes | | |
|
||||
| cycleway | | no | | cycling |
|
||||
| runway | | | yes | |
|
||||
| cycleway | | | no | cycling |
|
||||
|
||||
Scenario: Bike - Bridleways when access is explicit
|
||||
Then routability should be
|
||||
| highway | horse | foot | bicycle | bothw |
|
||||
| bridleway | | | yes | x |
|
||||
| bridleway | | yes | | x |
|
||||
| bridleway | designated | | | |
|
||||
| bridleway | | | | |
|
||||
| highway | horse | foot | bicycle | bothw |
|
||||
| bridleway | | | yes | cycling |
|
||||
| bridleway | | yes | | pushing bike |
|
||||
| bridleway | designated | | | |
|
||||
| bridleway | | | | |
|
||||
|
||||
Scenario: Bike - Tram with oneway when access is implicit
|
||||
Then routability should be
|
||||
| highway | railway | access | oneway | bothw |
|
||||
| residential | tram | | yes | x |
|
||||
| service | tram | psv | yes | x |
|
||||
| highway | railway | access | oneway | forw | backw |
|
||||
| residential | tram | | yes | cycling | pushing bike |
|
||||
| service | tram | psv | yes | cycling | pushing bike |
|
||||
|
||||
Scenario: Bike - Access combinations
|
||||
Then routability should be
|
||||
| highway | access | bothw |
|
||||
| primary | permissive | x |
|
||||
| steps | permissive | x |
|
||||
| footway | permissive | x |
|
||||
| garbagetag | permissive | x |
|
||||
|
||||
| highway | access | bothw |
|
||||
| primary | permissive | cycling |
|
||||
| steps | permissive | cycling |
|
||||
| footway | permissive | cycling |
|
||||
| garbagetag | permissive | cycling |
|
||||
|
||||
@@ -7,62 +7,62 @@ Feature: Bike - Access tags on nodes
|
||||
|
||||
Scenario: Bike - Access tag hierarchy on nodes
|
||||
Then routability should be
|
||||
| node/access | node/vehicle | node/bicycle | node/highway | bothw |
|
||||
| | | | | x |
|
||||
| yes | | | | x |
|
||||
| no | | | | |
|
||||
| | yes | | | x |
|
||||
| | no | | | |
|
||||
| no | yes | | | x |
|
||||
| yes | no | | | |
|
||||
| | | yes | | x |
|
||||
| | | no | | |
|
||||
| | | no | crossing | x |
|
||||
| no | | yes | | x |
|
||||
| yes | | no | | |
|
||||
| | no | yes | | x |
|
||||
| | yes | no | | |
|
||||
| node/access | node/vehicle | node/bicycle | node/highway | bothw |
|
||||
| | | | | cycling |
|
||||
| yes | | | | cycling |
|
||||
| no | | | | |
|
||||
| | yes | | | cycling |
|
||||
| | no | | | |
|
||||
| no | yes | | | cycling |
|
||||
| yes | no | | | |
|
||||
| | | yes | | cycling |
|
||||
| | | no | | |
|
||||
| | | no | crossing | cycling |
|
||||
| no | | yes | | cycling |
|
||||
| yes | | no | | |
|
||||
| | no | yes | | cycling |
|
||||
| | yes | no | | |
|
||||
|
||||
Scenario: Bike - Overwriting implied acccess on nodes doesn't overwrite way
|
||||
Then routability should be
|
||||
| highway | node/access | node/vehicle | node/bicycle | bothw |
|
||||
| cycleway | | | | x |
|
||||
| runway | | | | |
|
||||
| cycleway | no | | | |
|
||||
| cycleway | | no | | |
|
||||
| cycleway | | | no | |
|
||||
| runway | yes | | | |
|
||||
| runway | | yes | | |
|
||||
| runway | | | yes | |
|
||||
| highway | node/access | node/vehicle | node/bicycle | bothw |
|
||||
| cycleway | | | | cycling |
|
||||
| runway | | | | |
|
||||
| cycleway | no | | | |
|
||||
| cycleway | | no | | |
|
||||
| cycleway | | | no | |
|
||||
| runway | yes | | | |
|
||||
| runway | | yes | | |
|
||||
| runway | | | yes | |
|
||||
|
||||
Scenario: Bike - Access tags on nodes
|
||||
Then routability should be
|
||||
| node/access | node/vehicle | node/bicycle | bothw |
|
||||
| | | | x |
|
||||
| yes | | | x |
|
||||
| permissive | | | x |
|
||||
| designated | | | x |
|
||||
| some_tag | | | x |
|
||||
| no | | | |
|
||||
| private | | | |
|
||||
| agricultural | | | |
|
||||
| forestry | | | |
|
||||
| delivery | | | |
|
||||
| | yes | | x |
|
||||
| | permissive | | x |
|
||||
| | designated | | x |
|
||||
| | some_tag | | x |
|
||||
| | no | | |
|
||||
| | private | | |
|
||||
| | agricultural | | |
|
||||
| | forestry | | |
|
||||
| | delivery | | |
|
||||
| | | yes | x |
|
||||
| | | permissive | x |
|
||||
| | | designated | x |
|
||||
| | | some_tag | x |
|
||||
| | | no | |
|
||||
| | | private | |
|
||||
| | | agricultural | |
|
||||
| | | forestry | |
|
||||
| | | delivery | |
|
||||
| node/access | node/vehicle | node/bicycle | bothw |
|
||||
| | | | cycling |
|
||||
| yes | | | cycling |
|
||||
| permissive | | | cycling |
|
||||
| designated | | | cycling |
|
||||
| some_tag | | | cycling |
|
||||
| no | | | |
|
||||
| private | | | |
|
||||
| agricultural | | | |
|
||||
| forestry | | | |
|
||||
| delivery | | | |
|
||||
| | yes | | cycling |
|
||||
| | permissive | | cycling |
|
||||
| | designated | | cycling |
|
||||
| | some_tag | | cycling |
|
||||
| | no | | |
|
||||
| | private | | |
|
||||
| | agricultural | | |
|
||||
| | forestry | | |
|
||||
| | delivery | | |
|
||||
| | | yes | cycling |
|
||||
| | | permissive | cycling |
|
||||
| | | designated | cycling |
|
||||
| | | some_tag | cycling |
|
||||
| | | no | |
|
||||
| | | private | |
|
||||
| | | agricultural | |
|
||||
| | | forestry | |
|
||||
| | | delivery | |
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
@routing @bicycle @alley
|
||||
Feature: Bicycle - Route around alleys
|
||||
|
||||
Background:
|
||||
Given the profile file
|
||||
"""
|
||||
require 'bicycle'
|
||||
properties.weight_name = 'cyclability'
|
||||
"""
|
||||
|
||||
Scenario: Bicycle - Avoid taking alleys
|
||||
Given the query options
|
||||
| annotations | nodes |
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
a-----b-----c
|
||||
| : |
|
||||
d.....e.....f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | service |
|
||||
| abc | residential | |
|
||||
| def | service | alley |
|
||||
| ad | residential | |
|
||||
| be | service | alley |
|
||||
| cf | residential | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | a:nodes | weight | # |
|
||||
| a | f | 1:2:3:6 | 200.4 | Avoids d,e,f |
|
||||
| a | e | 1:2:5 | 176.4 | Take the alley b,e if neccessary |
|
||||
| d | f | 4:1:2:3:6 | 252.6 | Avoids the alley d,e,f |
|
||||
|
||||
@@ -71,17 +71,17 @@ Feature: Bike - Squares and other areas
|
||||
| abcda | (nil) | parking |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by,by |
|
||||
| y | x | by,abcda,xa,xa |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
|
||||
@train @platform
|
||||
@@ -99,14 +99,14 @@ Feature: Bike - Squares and other areas
|
||||
| abcda | (nil) | platform |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by,by |
|
||||
| y | x | by,abcda,xa,xa |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
| c | b | abcda,abcda |
|
||||
| c | d | abcda,abcda |
|
||||
| d | c | abcda,abcda |
|
||||
| d | a | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
|
||||
@@ -7,9 +7,9 @@ Feature: Bicycle - Handle cycling
|
||||
Scenario: Bicycle - Use a ferry route
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -19,22 +19,22 @@ Feature: Bicycle - Handle cycling
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling |
|
||||
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling |
|
||||
| e | c | cde,cde | cycling,cycling |
|
||||
| e | c | cde,cde | cycling,cycling |
|
||||
| e | b | cde,abc,abc | cycling,cycling,cycling |
|
||||
| e | a | cde,abc,abc | cycling,cycling,cycling |
|
||||
| c | e | cde,cde | cycling,cycling |
|
||||
| c | e | cde,cde | cycling,cycling |
|
||||
| c | f | cde,efg,efg | cycling,cycling,cycling |
|
||||
| c | g | cde,efg,efg | cycling,cycling,cycling |
|
||||
|
||||
Scenario: Bicycle - Properly handle durations
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -45,7 +45,7 @@ Feature: Bicycle - Handle cycling
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 5 km/h |
|
||||
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 4 km/h |
|
||||
| a | g | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 6 km/h |
|
||||
| b | f | abc,cde,efg,efg | cycling,cycling,cycling,cycling | 5 km/h |
|
||||
| c | e | cde,cde | cycling,cycling | 2 km/h |
|
||||
| e | c | cde,cde | cycling,cycling | 2 km/h |
|
||||
|
||||
@@ -79,3 +79,19 @@ Feature: Bike - Cycle tracks/lanes
|
||||
| residential | lane | yes | x | x |
|
||||
| footway | lane | yes | x | x |
|
||||
| cycleway | lane | yes | x | x |
|
||||
|
||||
Scenario: Bike - Cycleway on oneways, modes
|
||||
Then routability should be
|
||||
| highway | cycleway | oneway | forw | backw |
|
||||
| motorway | track | yes | cycling | |
|
||||
| residential | track | yes | cycling | pushing bike |
|
||||
| cycleway | track | yes | cycling | pushing bike |
|
||||
| footway | track | yes | cycling | pushing bike |
|
||||
|
||||
Scenario: Bike - Cycleway on oneways, speeds
|
||||
Then routability should be
|
||||
| highway | cycleway | oneway | forw | backw |
|
||||
| motorway | track | yes | 15 km/h | |
|
||||
| residential | track | yes | 15 km/h | 6 km/h +-1 |
|
||||
| cycleway | track | yes | 15 km/h | 6 km/h +-1 |
|
||||
| footway | track | yes | 15 km/h | 6 km/h +-1 |
|
||||
|
||||
@@ -53,8 +53,7 @@ Feature: Bike - Handle ferry routes
|
||||
Scenario: Bike - Ferry duration, multiple nodes
|
||||
Given the node map
|
||||
"""
|
||||
x y
|
||||
a b c d
|
||||
x a b c d y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
|
||||
@@ -159,7 +159,7 @@ Feature: Bike - Mode flag
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
|
||||
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bicycle - Modes when starting on forward oneway
|
||||
Given the node map
|
||||
|
||||
@@ -17,8 +17,8 @@ Feature: Bike - Street names in instructions
|
||||
| bc | Your Way | A7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | ref |
|
||||
| a | c | My Way,Your Way,Your Way | A6,A7,A7 |
|
||||
| from | to | route | ref |
|
||||
| a | c | My Way,Your Way | A6,A7 |
|
||||
|
||||
@unnamed
|
||||
Scenario: Bike - No longer use way type to describe unnamed ways, see #3231
|
||||
|
||||
@@ -8,13 +8,15 @@ Feature: Bike - Oneway streets
|
||||
|
||||
Scenario: Bike - Simple oneway
|
||||
Then routability should be
|
||||
| highway | foot | oneway | forw | backw |
|
||||
| primary | no | yes | x | |
|
||||
| highway | foot | oneway | forw | backw |
|
||||
| primary | no | yes | cycling | |
|
||||
| primary | | yes | cycling | pushing bike |
|
||||
|
||||
Scenario: Simple reverse oneway
|
||||
Then routability should be
|
||||
| highway | foot | oneway | forw | backw |
|
||||
| primary | no | -1 | | x |
|
||||
| highway | foot | oneway | forw | backw |
|
||||
| primary | no | -1 | | cycling |
|
||||
| primary | | -1 | pushing bike | cycling |
|
||||
|
||||
Scenario: Bike - Around the Block
|
||||
Given the node map
|
||||
@@ -39,83 +41,83 @@ Feature: Bike - Oneway streets
|
||||
|
||||
Scenario: Bike - Handle various oneway tag values
|
||||
Then routability should be
|
||||
| foot | oneway | forw | backw |
|
||||
| no | | x | x |
|
||||
| no | nonsense | x | x |
|
||||
| no | no | x | x |
|
||||
| no | false | x | x |
|
||||
| no | 0 | x | x |
|
||||
| no | yes | x | |
|
||||
| no | true | x | |
|
||||
| no | 1 | x | |
|
||||
| no | -1 | | x |
|
||||
| foot | oneway | forw | backw |
|
||||
| no | | cycling | cycling |
|
||||
| no | nonsense | cycling | cycling |
|
||||
| no | no | cycling | cycling |
|
||||
| no | false | cycling | cycling |
|
||||
| no | 0 | cycling | cycling |
|
||||
| no | yes | cycling | |
|
||||
| no | true | cycling | |
|
||||
| no | 1 | cycling | |
|
||||
| no | -1 | | cycling |
|
||||
|
||||
Scenario: Bike - Implied oneways
|
||||
Then routability should be
|
||||
| highway | foot | bicycle | junction | forw | backw | # |
|
||||
| | no | | | x | x | |
|
||||
| | no | | roundabout | x | | |
|
||||
| motorway | no | yes | | x | | |
|
||||
| motorway_link | no | yes | | x | x | does not imply oneway |
|
||||
| motorway | no | yes | roundabout | x | | |
|
||||
| motorway_link | no | yes | roundabout | x | | |
|
||||
| highway | foot | bicycle | junction | forw | backw | # |
|
||||
| | no | | | cycling | cycling | |
|
||||
| | no | | roundabout | cycling | | |
|
||||
| motorway | no | yes | | cycling | | |
|
||||
| motorway_link | no | yes | | cycling | cycling | does not imply oneway |
|
||||
| motorway | no | yes | roundabout | cycling | | |
|
||||
| motorway_link | no | yes | roundabout | cycling | | |
|
||||
|
||||
Scenario: Bike - Overriding implied oneways
|
||||
Then routability should be
|
||||
| highway | foot | junction | oneway | forw | backw |
|
||||
| primary | no | roundabout | no | x | x |
|
||||
| primary | no | roundabout | yes | x | |
|
||||
| motorway_link | no | | -1 | | |
|
||||
| trunk_link | no | | -1 | | |
|
||||
| primary | no | roundabout | -1 | | x |
|
||||
| highway | foot | junction | oneway | forw | backw |
|
||||
| primary | no | roundabout | no | cycling | cycling |
|
||||
| primary | no | roundabout | yes | cycling | |
|
||||
| motorway_link | no | | -1 | | |
|
||||
| trunk_link | no | | -1 | | |
|
||||
| primary | no | roundabout | -1 | | cycling |
|
||||
|
||||
Scenario: Bike - Oneway:bicycle should override normal oneways tags
|
||||
Then routability should be
|
||||
| foot | oneway:bicycle | oneway | junction | forw | backw |
|
||||
| no | yes | | | x | |
|
||||
| no | yes | yes | | x | |
|
||||
| no | yes | no | | x | |
|
||||
| no | yes | -1 | | x | |
|
||||
| no | yes | | roundabout | x | |
|
||||
| no | no | | | x | x |
|
||||
| no | no | yes | | x | x |
|
||||
| no | no | no | | x | x |
|
||||
| no | no | -1 | | x | x |
|
||||
| no | no | | roundabout | x | x |
|
||||
| no | -1 | | | | x |
|
||||
| no | -1 | yes | | | x |
|
||||
| no | -1 | no | | | x |
|
||||
| no | -1 | -1 | | | x |
|
||||
| no | -1 | | roundabout | | x |
|
||||
| foot | oneway:bicycle | oneway | junction | forw | backw |
|
||||
| no | yes | | | cycling | |
|
||||
| no | yes | yes | | cycling | |
|
||||
| no | yes | no | | cycling | |
|
||||
| no | yes | -1 | | cycling | |
|
||||
| no | yes | | roundabout | cycling | |
|
||||
| no | no | | | cycling | cycling |
|
||||
| no | no | yes | | cycling | cycling |
|
||||
| no | no | no | | cycling | cycling |
|
||||
| no | no | -1 | | cycling | cycling |
|
||||
| no | no | | roundabout | cycling | cycling |
|
||||
| no | -1 | | | | cycling |
|
||||
| no | -1 | yes | | | cycling |
|
||||
| no | -1 | no | | | cycling |
|
||||
| no | -1 | -1 | | | cycling |
|
||||
| no | -1 | | roundabout | | cycling |
|
||||
|
||||
Scenario: Bike - Contra flow
|
||||
Then routability should be
|
||||
| foot | oneway | cycleway | forw | backw |
|
||||
| no | yes | opposite | x | x |
|
||||
| no | yes | opposite_track | x | x |
|
||||
| no | yes | opposite_lane | x | x |
|
||||
| no | -1 | opposite | x | x |
|
||||
| no | -1 | opposite_track | x | x |
|
||||
| no | -1 | opposite_lane | x | x |
|
||||
| no | no | opposite | x | x |
|
||||
| no | no | opposite_track | x | x |
|
||||
| no | no | opposite_lane | x | x |
|
||||
| foot | oneway | cycleway | forw | backw |
|
||||
| no | yes | opposite | cycling | cycling |
|
||||
| no | yes | opposite_track | cycling | cycling |
|
||||
| no | yes | opposite_lane | cycling | cycling |
|
||||
| no | -1 | opposite | cycling | cycling |
|
||||
| no | -1 | opposite_track | cycling | cycling |
|
||||
| no | -1 | opposite_lane | cycling | cycling |
|
||||
| no | no | opposite | cycling | cycling |
|
||||
| no | no | opposite_track | cycling | cycling |
|
||||
| no | no | opposite_lane | cycling | cycling |
|
||||
|
||||
Scenario: Bike - Should not be affected by car tags
|
||||
Then routability should be
|
||||
| foot | junction | oneway | oneway:car | forw | backw |
|
||||
| no | | yes | yes | x | |
|
||||
| no | | yes | no | x | |
|
||||
| no | | yes | -1 | x | |
|
||||
| no | | no | yes | x | x |
|
||||
| no | | no | no | x | x |
|
||||
| no | | no | -1 | x | x |
|
||||
| no | | -1 | yes | | x |
|
||||
| no | | -1 | no | | x |
|
||||
| no | | -1 | -1 | | x |
|
||||
| no | roundabout | | yes | x | |
|
||||
| no | roundabout | | no | x | |
|
||||
| no | roundabout | | -1 | x | |
|
||||
| foot | junction | oneway | oneway:car | forw | backw |
|
||||
| no | | yes | yes | cycling | |
|
||||
| no | | yes | no | cycling | |
|
||||
| no | | yes | -1 | cycling | |
|
||||
| no | | no | yes | cycling | cycling |
|
||||
| no | | no | no | cycling | cycling |
|
||||
| no | | no | -1 | cycling | cycling |
|
||||
| no | | -1 | yes | | cycling |
|
||||
| no | | -1 | no | | cycling |
|
||||
| no | | -1 | -1 | | cycling |
|
||||
| no | roundabout | | yes | cycling | |
|
||||
| no | roundabout | | no | cycling | |
|
||||
| no | roundabout | | -1 | cycling | |
|
||||
|
||||
Scenario: Bike - Two consecutive oneways
|
||||
Given the node map
|
||||
@@ -132,3 +134,12 @@ Feature: Bike - Oneway streets
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | ab,bc,bc |
|
||||
|
||||
|
||||
Scenario: Bike - Left/right cycleways on oneways
|
||||
Then routability should be
|
||||
| highway | oneway | cycleway:left | cycleway:right | forw | backw |
|
||||
| primary | yes | | | cycling | pushing bike |
|
||||
| primary | yes | | track | cycling | pushing bike |
|
||||
| primary | yes | track | | cycling | cycling |
|
||||
| primary | yes | track | track | cycling | cycling |
|
||||
@@ -3,34 +3,30 @@ Feature: Bike - Accessability of different way types
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
Given the shortcuts
|
||||
| key | value |
|
||||
| bike | 15 km/h ~20% |
|
||||
| foot | 5 km/h ~20% |
|
||||
|
||||
Scenario: Bike - Pushing bikes on pedestrian-only ways
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| (nil) | | | |
|
||||
| cycleway | | bike | bike |
|
||||
| primary | | bike | bike |
|
||||
| pedestrian | | foot | foot |
|
||||
| footway | | foot | foot |
|
||||
| primary | yes | bike | foot |
|
||||
| highway | oneway | forw | backw |
|
||||
| (nil) | | | |
|
||||
| cycleway | | cycling | cycling |
|
||||
| primary | | cycling | cycling |
|
||||
| pedestrian | | pushing bike | pushing bike |
|
||||
| cycleway | | cycling | cycling |
|
||||
| primary | yes | cycling | pushing bike |
|
||||
|
||||
Scenario: Bike - Pushing bikes against normal oneways
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| (nil) | | | |
|
||||
| primary | yes | bike | foot |
|
||||
| pedestrian | yes | foot | foot |
|
||||
| highway | oneway | forw | backw |
|
||||
| (nil) | | | |
|
||||
| primary | yes | cycling | pushing bike |
|
||||
| pedestrian | yes | pushing bike | pushing bike |
|
||||
|
||||
Scenario: Bike - Pushing bikes against reverse oneways
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| (nil) | | | |
|
||||
| primary | -1 | foot | bike |
|
||||
| pedestrian | -1 | foot | foot |
|
||||
| highway | oneway | forw | backw |
|
||||
| (nil) | | | |
|
||||
| primary | -1 | pushing bike | cycling |
|
||||
| pedestrian | -1 | pushing bike | pushing bike |
|
||||
|
||||
@square
|
||||
Scenario: Bike - Push bikes on pedestrian areas
|
||||
@@ -47,7 +43,7 @@ Feature: Bike - Accessability of different way types
|
||||
| abcda | yes | pedestrian |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| from | to | route |
|
||||
| a | b | abcda,abcda |
|
||||
| a | d | abcda,abcda |
|
||||
| b | c | abcda,abcda |
|
||||
@@ -59,19 +55,19 @@ Feature: Bike - Accessability of different way types
|
||||
|
||||
Scenario: Bike - Pushing bikes on ways with foot=yes
|
||||
Then routability should be
|
||||
| highway | foot | forw | backw |
|
||||
| motorway | | | |
|
||||
| motorway | yes | foot | |
|
||||
| runway | | | |
|
||||
| runway | yes | foot | foot |
|
||||
| highway | foot | forw | backw |
|
||||
| motorway | | | |
|
||||
| motorway | yes | pushing bike | |
|
||||
| runway | | | |
|
||||
| runway | yes | pushing bike | pushing bike |
|
||||
|
||||
@todo
|
||||
Scenario: Bike - Pushing bikes on ways with foot=yes in one direction
|
||||
Then routability should be
|
||||
| highway | foot:forward | foot:backward | forw | backw |
|
||||
| motorway | | | | |
|
||||
| motorway | yes | | foot | |
|
||||
| motorway | | yes | | foot |
|
||||
| highway | foot:forward | foot:backward | forw | backw |
|
||||
| motorway | | | | |
|
||||
| motorway | yes | | pushing bike | |
|
||||
| motorway | | yes | | pushing bike |
|
||||
|
||||
@construction
|
||||
Scenario: Bike - Don't allow routing on ways still under construction
|
||||
@@ -104,11 +100,11 @@ Feature: Bike - Accessability of different way types
|
||||
| cf | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,cycling,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,cycling,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
|
||||
|
||||
Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc.
|
||||
Given the node map
|
||||
|
||||
@@ -5,6 +5,7 @@ Feature: Bike - Turn restrictions
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - No left turn
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
@routing @bicycle @safety
|
||||
Feature: Bicycle - Adds penalties to unsafe roads
|
||||
|
||||
Background:
|
||||
Given the profile file
|
||||
"""
|
||||
require 'bicycle'
|
||||
properties.weight_name = 'cyclability'
|
||||
"""
|
||||
|
||||
Scenario: Bike - Apply penalties to ways without cycleways
|
||||
Then routability should be
|
||||
| highway | cycleway | forw | backw | forw_rate | backw_rate |
|
||||
| motorway | | | | | |
|
||||
| primary | | 15 km/h | 15 km/h | 2.9 | 2.9 |
|
||||
| secondary | | 15 km/h | 15 km/h | 3.1 | 3.1 |
|
||||
| tertiary | | 15 km/h | 15 km/h | 3.3 | 3.3 |
|
||||
| primary_link | | 15 km/h | 15 km/h | 2.9 | 2.9 |
|
||||
| secondary_link | | 15 km/h | 15 km/h | 3.1 | 3.1 |
|
||||
| tertiary_link | | 15 km/h | 15 km/h | 3.3 | 3.3 |
|
||||
| residential | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| cycleway | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| footway | | 6 km/h +-1 | 6 km/h +-1 | 1.7 | 1.7 |
|
||||
|
||||
Scenario: Bike - Apply no penalties to ways with cycleways
|
||||
Then routability should be
|
||||
| highway | cycleway | forw | backw | forw_rate | backw_rate |
|
||||
| motorway | track | 15 km/h | | 4.2 | |
|
||||
| primary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| secondary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| tertiary | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| primary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| secondary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| tertiary_link | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| residential | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| cycleway | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| footway | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| motorway | lane | 15 km/h | | 4.2 | |
|
||||
| primary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| secondary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| tertiary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| primary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| secondary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| tertiary_link | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| residential | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| cycleway | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| footway | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| motorway | shared_lane | 15 km/h | | 4.2 | |
|
||||
| primary | shared_lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
|
||||
Scenario: Bike - Apply no penalties to ways in direction of cycleways
|
||||
Then routability should be
|
||||
| highway | cycleway:right | cycleway:left | forw | backw | forw_rate | backw_rate |
|
||||
| motorway | track | | 15 km/h | | 4.2 | |
|
||||
| primary | track | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||
| secondary | track | | 15 km/h | 15 km/h | 4.2 | 3.1 |
|
||||
| tertiary | track | | 15 km/h | 15 km/h | 4.2 | 3.3 |
|
||||
| primary_link | track | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||
| secondary_link | track | | 15 km/h | 15 km/h | 4.2 | 3.1 |
|
||||
| tertiary_link | track | | 15 km/h | 15 km/h | 4.2 | 3.3 |
|
||||
| residential | track | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| cycleway | track | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| footway | track | | 15 km/h | 6 km/h +-1 | 4.2 | 1.7 |
|
||||
| motorway | | track | | 15 km/h | | 4.2 |
|
||||
| primary | | track | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||
| secondary | | track | 15 km/h | 15 km/h | 3.1 | 4.2 |
|
||||
| tertiary | | track | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||
| primary_link | | track | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||
| secondary_link | | track | 15 km/h | 15 km/h | 3.1 | 4.2 |
|
||||
| tertiary_link | | track | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||
| residential | | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| cycleway | | track | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| footway | | track | 6 km/h +-1 | 15 km/h | 1.7 | 4.2 |
|
||||
| motorway | lane | | 15 km/h | | 4.2 | |
|
||||
| primary | lane | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||
| secondary | lane | | 15 km/h | 15 km/h | 4.2 | 3.1 |
|
||||
| tertiary | lane | | 15 km/h | 15 km/h | 4.2 | 3.3 |
|
||||
| primary_link | lane | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||
| secondary_link | lane | | 15 km/h | 15 km/h | 4.2 | 3.1 |
|
||||
| tertiary_link | lane | | 15 km/h | 15 km/h | 4.2 | 3.3 |
|
||||
| residential | lane | | 15 km/h +-1 | 15 km/h +-1 | 4.2 | 4.2 |
|
||||
| cycleway | lane | | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| footway | lane | | 15 km/h | 6 km/h +-1 | 4.2 | 1.7 |
|
||||
| motorway | | lane | | 15 km/h | | 4.2 |
|
||||
| primary | | lane | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||
| secondary | | lane | 15 km/h +-1 | 15 km/h +-1 | 3.1 | 4.2 |
|
||||
| tertiary | | lane | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||
| primary_link | | lane | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||
| secondary_link | | lane | 15 km/h | 15 km/h | 3.1 | 4.2 |
|
||||
| tertiary_link | | lane | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||
| residential | | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| cycleway | | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| footway | | lane | 6 km/h +-1 | 15 km/h | 1.7 | 4.2 |
|
||||
| motorway | shared_lane | | 15 km/h | | 4.2 | |
|
||||
| primary | shared_lane | | 15 km/h | 15 km/h | 4.2 | 2.9 |
|
||||
| motorway | | shared_lane | | 15 km/h | | 4.2 |
|
||||
| primary | | shared_lane | 15 km/h | 15 km/h | 2.9 | 4.2 |
|
||||
|
||||
|
||||
Scenario: Bike - Don't apply penalties for all kind of cycleways
|
||||
Then routability should be
|
||||
| highway | cycleway | forw | backw | forw_rate | backw_rate |
|
||||
| tertiary | shared_lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| tertiary | lane | 15 km/h | 15 km/h | 4.2 | 4.2 |
|
||||
| tertiary | opposite | 15 km/h | 15 km/h | 3.3 | 4.2 |
|
||||
@@ -0,0 +1,53 @@
|
||||
@routing @bicycle @startpoint
|
||||
Feature: Bike - Allowed start/end modes
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Bike - Don't start/stop on ferries
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b 2 c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle |
|
||||
| ab | primary | | |
|
||||
| bc | | ferry | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| 1 | 2 | ab,ab | cycling,cycling |
|
||||
| 2 | 1 | ab,ab | cycling,cycling |
|
||||
|
||||
Scenario: Bike - Don't start/stop on trains
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b 2 c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway | bicycle |
|
||||
| ab | primary | | |
|
||||
| bc | | train | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| 1 | 2 | ab,ab | cycling,cycling |
|
||||
| 2 | 1 | ab,ab | cycling,cycling |
|
||||
|
||||
Scenario: Bike - OK to start pushing bike
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b 2 c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | steps |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| 1 | 2 | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| 2 | 1 | bc,ab,ab | pushing bike,cycling,cycling |
|
||||
@@ -1,39 +1,71 @@
|
||||
@routing @bicycle @train
|
||||
Feature: Bike - Handle ferry routes
|
||||
# Bringing bikes on trains and subways
|
||||
# We cannot currently use a 'routability' type test, since the bike
|
||||
# profile does not allow starting/stopping on trains, and
|
||||
# it's not possible to modify the bicycle profile table because it's
|
||||
# defined as local.
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Bike - Bringing bikes on trains
|
||||
Then routability should be
|
||||
| highway | railway | bicycle | bothw |
|
||||
| primary | | | x |
|
||||
| (nil) | train | | |
|
||||
| (nil) | train | no | |
|
||||
| (nil) | train | yes | x |
|
||||
| (nil) | railway | | |
|
||||
| (nil) | railway | no | |
|
||||
| (nil) | railway | yes | x |
|
||||
| (nil) | subway | | |
|
||||
| (nil) | subway | no | |
|
||||
| (nil) | subway | yes | x |
|
||||
| (nil) | tram | | |
|
||||
| (nil) | tram | no | |
|
||||
| (nil) | tram | yes | x |
|
||||
| (nil) | light_rail | | |
|
||||
| (nil) | light_rail | no | |
|
||||
| (nil) | light_rail | yes | x |
|
||||
| (nil) | monorail | | |
|
||||
| (nil) | monorail | no | |
|
||||
| (nil) | monorail | yes | x |
|
||||
| (nil) | some_tag | | |
|
||||
| (nil) | some_tag | no | |
|
||||
| (nil) | some_tag | yes | x |
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b c 2 d e 3 f g 4 h
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway | bicycle |
|
||||
| ab | primary | | |
|
||||
| cd | primary | | |
|
||||
| ef | primary | | |
|
||||
| gh | primary | | |
|
||||
| bc | | train | |
|
||||
| de | | train | yes |
|
||||
| fg | | train | no |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| 1 | 2 | |
|
||||
| 2 | 3 | cd,de,ef,ef |
|
||||
| 3 | 4 | |
|
||||
|
||||
Scenario: Bike - Bringing bikes on trains, invalid railway tag is accepted if access specified
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b c 2 d e 3 f g 4 h
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway | bicycle |
|
||||
| ab | primary | | |
|
||||
| cd | primary | | |
|
||||
| ef | primary | | |
|
||||
| gh | primary | | |
|
||||
| bc | | invalid_tag | |
|
||||
| de | | invalid_tag | yes |
|
||||
| fg | | invalid_tag | no |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| 1 | 2 | |
|
||||
| 2 | 3 | cd,de,ef|
|
||||
| 3 | 4 | |
|
||||
|
||||
@construction
|
||||
Scenario: Bike - Don't route on railways under construction
|
||||
Then routability should be
|
||||
| highway | railway | bicycle | bothw |
|
||||
| primary | | | x |
|
||||
| (nil) | construction | yes | |
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b c 2 d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway | bicycle |
|
||||
| ab | primary | | |
|
||||
| cd | primary | | |
|
||||
| bc | | construction | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| 1 | 2 | |
|
||||
|
||||
@@ -2,34 +2,42 @@
|
||||
Feature: Turn Penalties
|
||||
|
||||
Background:
|
||||
Given the profile "turnbot"
|
||||
Given the profile "bicycle"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
Scenario: Bike - turns should incur a delay that depend on the angle
|
||||
|
||||
Scenario: Bicycle - Turn penalties on cyclability
|
||||
Given the profile file
|
||||
"""
|
||||
require 'bicycle'
|
||||
properties.weight_name = 'cyclability'
|
||||
"""
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
c d e
|
||||
b j f
|
||||
a s g
|
||||
a--b-----c
|
||||
|
|
||||
|
|
||||
d
|
||||
|
||||
e--------f-----------g
|
||||
/
|
||||
/
|
||||
/
|
||||
h
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| sj |
|
||||
| ja |
|
||||
| jb |
|
||||
| jc |
|
||||
| jd |
|
||||
| je |
|
||||
| jf |
|
||||
| jg |
|
||||
| nodes | highway |
|
||||
| abc | residential |
|
||||
| bd | residential |
|
||||
| efg | residential |
|
||||
| fh | residential |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time | distance |
|
||||
| s | a | sj,ja,ja | 39s +-1 | 242m +-1 |
|
||||
| s | b | sj,jb,jb | 30s +-1 | 200m +-1 |
|
||||
| s | c | sj,jc,jc | 29s +-1 | 242m +-1 |
|
||||
| s | d | sj,jd,jd | 20s +-1 | 200m +-1 |
|
||||
| s | e | sj,je,je | 29s +-1 | 242m +-1 |
|
||||
| s | f | sj,jf,jf | 30s +-1 | 200m +-1 |
|
||||
| s | g | sj,jg,jg | 39s +-1 | 242m +-1 |
|
||||
| from | to | distance | weight | # |
|
||||
| a | c | 900m +- 1 | 216 | Going straight has no penalties |
|
||||
| a | d | 900m +- 1 | 220.2 | Turning right had penalties |
|
||||
| e | g | 2100m +- 4| 503.9 | Going straght has no penalties |
|
||||
| e | h | 2100m +- 4| 515.1 | Turn sharp right has even higher penalties|
|
||||
|
||||
|
||||
+66
-42
@@ -119,12 +119,13 @@ Feature: Car - Restricted access
|
||||
| permissive | x |
|
||||
| designated | x |
|
||||
| no | |
|
||||
| private | |
|
||||
| private | x |
|
||||
| agricultural | |
|
||||
| forestry | |
|
||||
| psv | |
|
||||
| delivery | |
|
||||
| delivery | x |
|
||||
| some_tag | x |
|
||||
| destination | x |
|
||||
|
||||
|
||||
Scenario: Car - Access tags on nodes
|
||||
@@ -134,11 +135,11 @@ Feature: Car - Restricted access
|
||||
| permissive | x |
|
||||
| designated | x |
|
||||
| no | |
|
||||
| private | |
|
||||
| private | x |
|
||||
| agricultural | |
|
||||
| forestry | |
|
||||
| psv | |
|
||||
| delivery | |
|
||||
| delivery | x |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Car - Access tags on both node and way
|
||||
@@ -156,15 +157,15 @@ Feature: Car - Restricted access
|
||||
|
||||
Scenario: Car - Access combinations
|
||||
Then routability should be
|
||||
| highway | accesss | vehicle | motor_vehicle | motorcar | bothw |
|
||||
| runway | private | | | permissive | x |
|
||||
| primary | forestry | | yes | | x |
|
||||
| cycleway | | | designated | | x |
|
||||
| residential | | yes | no | | |
|
||||
| motorway | yes | permissive | | private | |
|
||||
| trunk | agricultural | designated | permissive | no | |
|
||||
| pedestrian | | | | | |
|
||||
| pedestrian | | | | destination | x |
|
||||
| highway | access | vehicle | motor_vehicle | motorcar | forw | backw | # |
|
||||
| runway | private | | | permissive | x | x | |
|
||||
| primary | forestry | | yes | | x | x | |
|
||||
| cycleway | | | designated | | x | x | |
|
||||
| residential | | yes | no | | | | |
|
||||
| motorway | yes | permissive | | private | x | | implied oneway |
|
||||
| trunk | agricultural | designated | permissive | no | | | |
|
||||
| pedestrian | | | | | | | |
|
||||
| pedestrian | | | | destination | | | temporary disabled #3773 |
|
||||
|
||||
Scenario: Car - Ignore access tags for other modes
|
||||
Then routability should be
|
||||
@@ -182,9 +183,9 @@ Feature: Car - Restricted access
|
||||
Scenario: Car - designated HOV ways are rated low
|
||||
Then routability should be
|
||||
| highway | hov | bothw | forw_rate | backw_rate |
|
||||
| primary | designated | x | 2 | 2 |
|
||||
| primary | yes | x | 18 | 18 |
|
||||
| primary | no | x | 18 | 18 |
|
||||
| primary | designated | x | 18.2 | 18.2 |
|
||||
| primary | yes | x | 18.2 | 18.2 |
|
||||
| primary | no | x | 18.2 | 18.2 |
|
||||
|
||||
# Models:
|
||||
# https://www.openstreetmap.org/way/124891268
|
||||
@@ -193,30 +194,31 @@ Feature: Car - Restricted access
|
||||
Scenario: Car - I-66 use HOV-only roads with heavy penalty
|
||||
Then routability should be
|
||||
| highway | hov | hov:lanes | lanes | access | oneway | forw | backw | forw_rate |
|
||||
| motorway | designated | designated\|designated\|designated | 3 | hov | yes | x | | 3 |
|
||||
| motorway | designated | designated\|designated\|designated | 3 | hov | yes | x | | 25 |
|
||||
| motorway | lane | | 3 | designated | yes | x | | 25 |
|
||||
|
||||
@hov
|
||||
Scenario: Car - a way with all lanes HOV-designated is highly penalized by default (similar to hov=designated)
|
||||
Then routability should be
|
||||
| highway | hov:lanes:forward | hov:lanes:backward | hov:lanes | oneway | forw | backw | forw_rate | backw_rate |
|
||||
| primary | designated | designated | | | x | x | 2 | 2 |
|
||||
| primary | | designated | | | x | x | 18 | 2 |
|
||||
| primary | designated | | | | x | x | 2 | 18 |
|
||||
| primary | designated\|designated | designated\|designated | | | x | x | 2 | 2 |
|
||||
| primary | designated\|no | designated\|no | | | x | x | 18 | 18 |
|
||||
| primary | yes\|no | yes\|no | | | x | x | 18 | 18 |
|
||||
| primary | | | | | x | x | 18 | 18 |
|
||||
| primary | designated | | | -1 | | x | | 18 |
|
||||
| primary | | designated | | -1 | | x | | 2 |
|
||||
| primary | | | designated | yes | x | | 2 | |
|
||||
| primary | | | designated | -1 | | x | | 2 |
|
||||
| primary | | | designated\| | yes | x | | 18 | |
|
||||
| primary | | | designated\| | -1 | | x | | 18 |
|
||||
| primary | | | designated\|designated | yes | x | | 2 | |
|
||||
| primary | | | designated\|designated | -1 | | x | | 2 |
|
||||
| primary | | | designated\|yes | yes | x | | 18 | |
|
||||
| primary | | | designated\|no | -1 | | x | | 18 |
|
||||
| primary | designated | designated | | | x | x | 18.2 | 18.2 |
|
||||
# This test is flaky because non-deterministic turn generation sometimes emits a NoTurn here that is marked as restricted. #3769
|
||||
#| primary | | designated | | | x | x | 18.2 | 18.2 |
|
||||
#| primary | designated | | | | x | x | 18.2 | 18.2 |
|
||||
| primary | designated\|designated | designated\|designated | | | x | x | 18.2 | 18.2 |
|
||||
| primary | designated\|no | designated\|no | | | x | x | 18.2 | 18.2 |
|
||||
| primary | yes\|no | yes\|no | | | x | x | 18.2 | 18.2 |
|
||||
| primary | | | | | x | x | 18.2 | 18.2 |
|
||||
| primary | designated | | | -1 | | x | | 18.2 |
|
||||
| primary | | designated | | -1 | | x | | 18.2 |
|
||||
| primary | | | designated | yes | x | | 18.2 | |
|
||||
| primary | | | designated | -1 | | x | | 18.2 |
|
||||
| primary | | | designated\| | yes | x | | 18.2 | |
|
||||
| primary | | | designated\| | -1 | | x | | 18.2 |
|
||||
| primary | | | designated\|designated | yes | x | | 18.2 | |
|
||||
| primary | | | designated\|designated | -1 | | x | | 18.2 |
|
||||
| primary | | | designated\|yes | yes | x | | 18.2 | |
|
||||
| primary | | | designated\|no | -1 | | x | | 18.2 |
|
||||
|
||||
Scenario: Car - these toll roads always work
|
||||
Then routability should be
|
||||
@@ -224,12 +226,10 @@ Feature: Car - Restricted access
|
||||
| primary | no | x |
|
||||
| primary | snowmobile | x |
|
||||
|
||||
# To test this we need issue #2781
|
||||
@todo
|
||||
Scenario: Car - only toll=yes ways are ignored by default
|
||||
Scenario: Car - toll=yes ways are enabled by default
|
||||
Then routability should be
|
||||
| highway | toll | bothw |
|
||||
| primary | yes | |
|
||||
| primary | yes | x |
|
||||
|
||||
Scenario: Car - directional access tags
|
||||
Then routability should be
|
||||
@@ -252,7 +252,7 @@ Feature: Car - Restricted access
|
||||
| gate | yes | x |
|
||||
| gate | permissive | x |
|
||||
| gate | designated | x |
|
||||
| gate | private | |
|
||||
| gate | private | x |
|
||||
| gate | garbagetag | x |
|
||||
|
||||
Scenario: Car - a way with conditional access
|
||||
@@ -262,9 +262,11 @@ Feature: Car - Restricted access
|
||||
|
||||
Scenario: Car - a way with a list of tags
|
||||
Then routability should be
|
||||
| highway | motor_vehicle | motor_vehicle:forward | motor_vehicle:backward | forw | backw |
|
||||
| footway | | | destination | | x |
|
||||
| track | destination;agricultural | destination | | x | x |
|
||||
| highway | motor_vehicle | motor_vehicle:forward | motor_vehicle:backward | forw | backw | # |
|
||||
| primary | | no | destination | | x | |
|
||||
| primary | destination;agricultural | destination | | x | x | |
|
||||
| footway | | | destination | | | temporary #3373 |
|
||||
| track | destination;agricultural | destination | | | x | temporary #3373 |
|
||||
|
||||
Scenario: Car - Don't route over steps even if marked as accessible
|
||||
Then routability should be
|
||||
@@ -280,3 +282,25 @@ Feature: Car - Restricted access
|
||||
| steps | permissive | |
|
||||
| footway | permissive | x |
|
||||
| garbagetag | permissive | x |
|
||||
|
||||
Scenario: Car - Access private blacklist
|
||||
Then routability should be
|
||||
| highway | access | bothw |
|
||||
| footway | yes | x |
|
||||
| pedestrian | private | |
|
||||
| footway | private | |
|
||||
| service | private | |
|
||||
| cycleway | private | |
|
||||
| track | private | |
|
||||
| footway | customers | |
|
||||
|
||||
Scenario: Car - Access blacklist
|
||||
Then routability should be
|
||||
| highway | access | bothw |
|
||||
| primary | | x |
|
||||
| primary | emergency | |
|
||||
| primary | forestry | |
|
||||
| primary | agricultural | |
|
||||
| primary | psv | |
|
||||
| primary | no | |
|
||||
| primary | customers | x |
|
||||
|
||||
@@ -29,14 +29,14 @@ Feature: Car - Barriers
|
||||
| gate | permissive | x |
|
||||
| gate | designated | x |
|
||||
| gate | no | |
|
||||
| gate | private | |
|
||||
| gate | private | x |
|
||||
| gate | agricultural | |
|
||||
| wall | | |
|
||||
| wall | yes | x |
|
||||
| wall | permissive | x |
|
||||
| wall | designated | x |
|
||||
| wall | no | |
|
||||
| wall | private | |
|
||||
| wall | private | x |
|
||||
| wall | agricultural | |
|
||||
|
||||
Scenario: Car - Rising bollard exception for barriers
|
||||
|
||||
@@ -3,6 +3,7 @@ Feature: Car - Handle driving
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
Scenario: Car - Use a ferry route
|
||||
Given the node map
|
||||
@@ -15,7 +16,7 @@ Feature: Car - Handle driving
|
||||
And the ways
|
||||
| nodes | highway | bridge | bicycle |
|
||||
| abc | primary | | |
|
||||
| cde | | movable | yes |
|
||||
| cde | primary | movable | yes |
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
@@ -40,15 +41,15 @@ Feature: Car - Handle driving
|
||||
And the ways
|
||||
| nodes | highway | bridge |
|
||||
| abc | primary | |
|
||||
| cde | | movable |
|
||||
| cde | primary | movable |
|
||||
| efg | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed | time |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 12 km/h | 173s +-1 |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving | 9 km/h | 162s +-1 |
|
||||
| c | e | cde,cde | driving,driving | 5 km/h | 146s +-1 |
|
||||
| e | c | cde,cde | driving,driving | 5 km/h | 149s +-1 |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 13 km/h | 340s +-1 |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving | 9 km/h | 318s +-1 |
|
||||
| c | e | cde,cde | driving,driving | 5 km/h | 295s +-1 |
|
||||
| e | c | cde,cde | driving,driving | 5 km/h | 295s +-1 |
|
||||
|
||||
Scenario: Car - Properly handle durations
|
||||
Given the node map
|
||||
@@ -61,7 +62,7 @@ Feature: Car - Handle driving
|
||||
And the ways
|
||||
| nodes | highway | bridge | duration |
|
||||
| abc | primary | | |
|
||||
| cde | | movable | 00:05:00 |
|
||||
| cde | primary | movable | 00:10:00 |
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
@routing @car @mode
|
||||
Feature: Car - Mode flag
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - We tag ferries with a class
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route |
|
||||
| ab | primary | |
|
||||
| bc | | ferry |
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | classes |
|
||||
| a | d | ab,bc,cd,cd | depart,notification right,notification left,arrive | ,ferry,, |
|
||||
| d | a | cd,bc,ab,ab | depart,notification right,notification left,arrive | ,ferry,, |
|
||||
| c | a | bc,ab,ab | depart,notification left,arrive | ferry,, |
|
||||
| d | b | cd,bc,bc | depart,notification right,arrive | ,ferry,ferry |
|
||||
| a | c | ab,bc,bc | depart,notification right,arrive | ,ferry,ferry |
|
||||
| b | d | bc,cd,cd | depart,notification left,arrive | ferry,, |
|
||||
|
||||
|
||||
Scenario: Car - We tag motorways with a class
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | motorway|
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | classes | # |
|
||||
| a | d | ab,bc,cd | depart,notification right,arrive | ,motorway, | |
|
||||
| a | c | ab,bc,bc | depart,notification right,arrive | ,motorway,motorway | |
|
||||
| b | d | bc,cd | depart,arrive | motorway, | we don't announce when we leave the highway |
|
||||
|
||||
Scenario: Car - We tag motorway_link with a class
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | motorway_link |
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | classes | # |
|
||||
| a | d | ab,bc,cd | depart,on ramp right,arrive | ,motorway, | notification replaced by on-ramp |
|
||||
| a | c | ab,bc,bc | depart,on ramp right,arrive | ,motorway,motorway | " " |
|
||||
| b | d | bc,cd | depart,arrive | motorway, | no announcement |
|
||||
|
||||
|
||||
Scenario: Car - We tag restricted with a class
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | access |
|
||||
| ab | primary | private |
|
||||
| bc | motorway| private |
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | classes |
|
||||
| a | d | ab,bc,cd | depart,notification right,arrive| restricted,motorway;restricted, |
|
||||
|
||||
Scenario: Car - We toll restricted with a class
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | toll |
|
||||
| ab | primary | yes |
|
||||
| bc | motorway| yes |
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | classes |
|
||||
| a | d | ab,bc,cd | depart,notification right,arrive | toll,motorway;toll, |
|
||||
|
||||
@@ -0,0 +1,741 @@
|
||||
@routing @car @restrictions
|
||||
Feature: Car - Turn restrictions
|
||||
# Handle turn restrictions as defined by http://wiki.openstreetmap.org/wiki/Relation:restriction
|
||||
# Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
|
||||
|
||||
Background: Use car routing
|
||||
Given the profile "car"
|
||||
Given a grid size of 200 meters
|
||||
Given the origin -9.2972,10.3811
|
||||
# coordinate in Guinée, a country that observes GMT year round
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - ignores unrecognized restriction
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | only_right_turn @ (has_pygmies > 10 p) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,js,js |
|
||||
| e | n | ej,nj,nj |
|
||||
| e | p | ej,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Restriction would be on, but the restriction was badly tagged
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p |
|
||||
\ |
|
||||
j
|
||||
| \
|
||||
s m
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| nj |
|
||||
| js |
|
||||
| pjm |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | nj | pjm | j | no_left_turn @ (Mo-Fr 07:00-10:30) |
|
||||
| restriction | js | pjm | j | no_right_turn @ (Mo-Fr 07:00-10:30) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| n | m | nj,pjm,pjm |
|
||||
| s | m | js,pjm,pjm |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - ignores except restriction
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | no |
|
||||
| jp | no |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional | except |
|
||||
| restriction | ej | nj | j | only_right_turn @ (Mo-Su 08:00-12:00) | motorcar |
|
||||
| restriction | jp | nj | j | only_left_turn @ (Mo-Su 08:00-12:00) | bus |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | # |
|
||||
| e | s | ej,js,js | |
|
||||
| e | n | ej,nj,nj | restriction does not apply to cars |
|
||||
| e | p | ej,jp,jp | |
|
||||
| p | s | jp,nj,nj,js,js | restriction excepting busses still applies to cars |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - only_right_turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | only_right_turn @ (Mo-Su 07:00-14:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,nj,nj,js,js |
|
||||
| e | n | ej,nj,nj |
|
||||
| e | p | ej,nj,nj,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - No right turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | no_right_turn @ (Mo-Fr 07:00-13:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | # |
|
||||
| e | s | ej,js,js | normal turn |
|
||||
| e | n | ej,js,js,nj,nj | avoids right turn |
|
||||
| e | p | ej,jp,jp | normal maneuver |
|
||||
|
||||
@only_turning @conditionals
|
||||
Scenario: Car - only_left_turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | js | j | only_left_turn @ (Mo-Fr 07:00-16:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,js,js |
|
||||
| e | n | ej,js,js,nj,nj |
|
||||
| e | p | ej,js,js,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - No left turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | js | j | no_left_turn @ (Mo-Su 00:00-23:59) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,nj,nj,js,js |
|
||||
| e | n | ej,nj,nj |
|
||||
| e | p | ej,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction is off
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | no_right_turn @ (Mo-Su 16:00-20:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,js,js |
|
||||
| e | n | ej,nj,nj |
|
||||
| e | p | ej,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction is on
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# 10am utc, wed
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493805600"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493805600"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | no_right_turn @ (Mo-Fr 07:00-14:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,js,js |
|
||||
| e | n | ej,js,js,nj,nj |
|
||||
| e | p | ej,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction with multiple time windows
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# 5pm Wed 02 May, 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p |
|
||||
\ |
|
||||
j
|
||||
| \
|
||||
s m
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| jp | yes |
|
||||
| mj | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | nj | jp | j | no_right_turn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| n | p | nj,js,js,jp,jp |
|
||||
| m | p | mj,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - only_right_turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | only_right_turn @ (Mo-Su 07:00-14:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,nj,nj,js,js |
|
||||
| e | n | ej,nj,nj |
|
||||
| e | p | ej,nj,nj,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - No right turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | no_right_turn @ (Mo-Fr 07:00-13:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | # |
|
||||
| e | s | ej,js,js | normal turn |
|
||||
| e | n | ej,js,js,nj,nj | avoids right turn |
|
||||
| e | p | ej,jp,jp | normal maneuver |
|
||||
|
||||
@only_turning @conditionals
|
||||
Scenario: Car - only_left_turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | js | j | only_left_turn @ (Mo-Fr 07:00-16:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,js,js |
|
||||
| e | n | ej,js,js,nj,nj |
|
||||
| e | p | ej,js,js,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - No left turn
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | js | j | no_left_turn @ (Mo-Su 00:00-23:59) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,nj,nj,js,js |
|
||||
| e | n | ej,nj,nj |
|
||||
| e | p | ej,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction is off
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# time stamp for 10am on Tues, 02 May 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493719200"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | no_right_turn @ (Mo-Su 16:00-20:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,js,js |
|
||||
| e | n | ej,nj,nj |
|
||||
| e | p | ej,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction is on
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# 10am utc, wed
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493805600"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493805600"
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| ej | yes |
|
||||
| jp | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ej | nj | j | no_right_turn @ (Mo-Fr 07:00-14:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | s | ej,js,js |
|
||||
| e | n | ej,js,js,nj,nj |
|
||||
| e | p | ej,jp,jp |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - Conditional restriction with multiple time windows
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# 5pm Wed 02 May, 2017 GMT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
p |
|
||||
\ |
|
||||
j
|
||||
| \
|
||||
s m
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| nj | no |
|
||||
| js | no |
|
||||
| jp | yes |
|
||||
| mj | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | nj | jp | j | no_right_turn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| n | p | nj,js,js,jp,jp |
|
||||
| m | p | mj,jp,jp |
|
||||
|
||||
# https://www.openstreetmap.org/#map=18/38.91099/-77.00888
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - DC North capitol situation, two on one off
|
||||
Given the extract extra arguments "--parse-conditional-restrictions=1"
|
||||
# 9pm Wed 02 May, 2017 UTC, 5pm EDT
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/dc.geojson --parse-conditionals-from-now=1493845200"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/dc.geojson --parse-conditionals-from-now=1493845200"
|
||||
|
||||
# """
|
||||
# a h
|
||||
# d
|
||||
# b g
|
||||
# e
|
||||
# c f
|
||||
# """
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 38.9113 | -77.0091 |
|
||||
| b | 38.9108 | -77.0091 |
|
||||
| c | 38.9104 | -77.0091 |
|
||||
| d | 38.9110 | -77.0096 |
|
||||
| e | 38.9106 | -77.0086 |
|
||||
| f | 38.9105 | -77.0090 |
|
||||
| g | 38.9108 | -77.0090 |
|
||||
| h | 38.9113 | -77.0090 |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | name |
|
||||
| ab | yes | cap south |
|
||||
| bc | yes | cap south |
|
||||
| fg | yes | cap north |
|
||||
| gh | yes | cap north |
|
||||
| db | no | florida nw |
|
||||
| bg | no | florida |
|
||||
| ge | no | florida ne |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ab | bg | b | no_left_turn @ (Mo-Fr 07:00-09:30,16:00-18:30) |
|
||||
| restriction | fg | bg | g | no_left_turn @ (Mo-Fr 06:00-10:00) |
|
||||
| restriction | bg | bc | b | no_left_turn @ (Mo-Fr 07:00-09:30,16:00-18:30) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | e | cap south,florida nw,florida nw,florida ne | depart,turn right,continue uturn,arrive |
|
||||
| f | d | cap north,florida,florida nw | depart,turn left,arrive |
|
||||
| e | c | florida ne,florida nw,cap south,cap south | depart,continue uturn,turn right,arrive |
|
||||
|
||||
@no_turning @conditionals
|
||||
Scenario: Car - DC North capitol situation, one on two off
|
||||
Given the extract extra arguments "--parse-conditional-restrictions=1"
|
||||
# 10:30am utc, wed, 6:30am est
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/dc.geojson --parse-conditionals-from-now=1493807400"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/dc.geojson --parse-conditionals-from-now=1493807400"
|
||||
|
||||
# """
|
||||
# a h
|
||||
# d
|
||||
# b g
|
||||
# e
|
||||
# c f
|
||||
# """
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 38.9113 | -77.0091 |
|
||||
| b | 38.9108 | -77.0091 |
|
||||
| c | 38.9104 | -77.0091 |
|
||||
| d | 38.9110 | -77.0096 |
|
||||
| e | 38.9106 | -77.0086 |
|
||||
| f | 38.9105 | -77.0090 |
|
||||
| g | 38.9108 | -77.0090 |
|
||||
| h | 38.9113 | -77.0090 |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | name |
|
||||
| ab | yes | cap south |
|
||||
| bc | yes | cap south |
|
||||
| fg | yes | cap north |
|
||||
| gh | yes | cap north |
|
||||
| db | no | florida nw |
|
||||
| bg | no | florida |
|
||||
| ge | no | florida ne |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ab | bg | b | no_left_turn @ (Mo-Fr 07:00-09:30,16:00-18:30) |
|
||||
| restriction | fg | bg | g | no_left_turn @ (Mo-Fr 06:00-10:00) |
|
||||
| restriction | bg | bc | b | no_left_turn @ (Mo-Fr 07:00-09:30,16:00-18:30) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | e | cap south,florida,florida ne | depart,turn left,arrive |
|
||||
| f | d | cap north,florida ne,florida ne,florida nw | depart,turn sharp right,continue uturn,arrive |
|
||||
| e | c | florida ne,cap south,cap south | depart,turn left,arrive |
|
||||
|
||||
@only_turning @conditionals
|
||||
Scenario: Car - Restriction is always off when point not found in timezone files
|
||||
# same test as the following one, but given a different time zone file
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# 9am UTC, 10am BST
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/dc.geojson --parse-conditionals-from-now=1493802000"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/dc.geojson --parse-conditionals-from-now=1493802000"
|
||||
|
||||
# """
|
||||
# a
|
||||
# e
|
||||
# b
|
||||
# d
|
||||
# c
|
||||
# """
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 51.5250 | -0.1166 |
|
||||
| b | 51.5243 | -0.1159 |
|
||||
| c | 51.5238 | -0.1152 |
|
||||
| d | 51.5241 | -0.1167 |
|
||||
| e | 51.5247 | -0.1153 |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | albic |
|
||||
| bc | albic |
|
||||
| db | dobe |
|
||||
| be | dobe |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ab | be | b | only_left_turn @ (Mo-Fr 07:00-11:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | c | albic,albic | depart,arrive |
|
||||
| a | e | albic,dobe,dobe | depart,turn left,arrive |
|
||||
|
||||
@only_turning @conditionals
|
||||
Scenario: Car - Somewhere in london, the UK, GMT timezone
|
||||
Given the extract extra arguments "--parse-conditional-restrictions"
|
||||
# 9am UTC, 10am BST
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/london.geojson --parse-conditionals-from-now=1493802000"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/london.geojson --parse-conditionals-from-now=1493802000"
|
||||
|
||||
# """
|
||||
# a
|
||||
# e
|
||||
# b
|
||||
# d
|
||||
# c
|
||||
# """
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 51.5250 | -0.1166 |
|
||||
| b | 51.5243 | -0.1159 |
|
||||
| c | 51.5238 | -0.1152 |
|
||||
| d | 51.5241 | -0.1167 |
|
||||
| e | 51.5247 | -0.1153 |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | albic |
|
||||
| bc | albic |
|
||||
| db | dobe |
|
||||
| be | dobe |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ab | be | b | only_left_turn @ (Mo-Fr 07:00-11:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | c | albic,dobe,dobe,albic,albic | depart,turn left,continue uturn,turn left,arrive |
|
||||
| a | e | albic,dobe,dobe | depart,turn left,arrive |
|
||||
|
||||
@only_turning @conditionals
|
||||
Scenario: Car - Somewhere in London, the UK, GMT timezone
|
||||
Given the extract extra arguments "--parse-conditional-restrictions=1"
|
||||
# 9am UTC, 10am BST
|
||||
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/london.geojson --parse-conditionals-from-now=1493802000"
|
||||
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/london.geojson --parse-conditionals-from-now=1493802000"
|
||||
|
||||
# """
|
||||
# a
|
||||
# e
|
||||
# b
|
||||
# d
|
||||
# c
|
||||
# """
|
||||
Given the node locations
|
||||
| node | lat | lon |
|
||||
| a | 51.5250 | -0.1166 |
|
||||
| b | 51.5243 | -0.1159 |
|
||||
| c | 51.5238 | -0.1152 |
|
||||
| d | 51.5241 | -0.1167 |
|
||||
| e | 51.5247 | -0.1153 |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | albic |
|
||||
| bc | albic |
|
||||
| db | dobe |
|
||||
| be | dobe |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction:conditional |
|
||||
| restriction | ab | be | b | only_left_turn @ (Mo-Fr 07:00-11:00) |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | c | albic,dobe,dobe,albic,albic | depart,turn left,continue uturn,turn left,arrive |
|
||||
| a | e | albic,dobe,dobe | depart,turn left,arrive |
|
||||
@@ -0,0 +1,16 @@
|
||||
@routing @car @construction
|
||||
Feature: Car - all construction tags the OpenStreetMap community could think of and then some
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Various ways to tag construction and proposed roads
|
||||
Then routability should be
|
||||
| highway | construction | proposed | bothw |
|
||||
| primary | | | x |
|
||||
| construction | | | |
|
||||
| proposed | | | |
|
||||
| primary | yes | | |
|
||||
| primary | | yes | |
|
||||
| primary | no | | x |
|
||||
| primary | widening | | x |
|
||||
@@ -1,4 +1,4 @@
|
||||
@routing @car @destination @todo
|
||||
@routing @car @destination
|
||||
Feature: Car - Destination only, no passing through
|
||||
|
||||
Background:
|
||||
@@ -52,11 +52,11 @@ Feature: Car - Destination only, no passing through
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bc,bc |
|
||||
| a | d | ab,bc,cd,cd |
|
||||
| a | d | ab,bc,cd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,cd,cd |
|
||||
| e | b | de,cd,bc,bc |
|
||||
| e | b | de,cd,bc |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Car - Routing inside a destination only area
|
||||
@@ -81,3 +81,53 @@ Feature: Car - Destination only, no passing through
|
||||
| e | a | de,cd,bc,ab,ab |
|
||||
| b | d | bc,cd,cd |
|
||||
| d | b | cd,bc,bc |
|
||||
|
||||
Scenario: Car - Routing around a way that becomes destination only
|
||||
Given the node map
|
||||
"""
|
||||
b
|
||||
\
|
||||
|
|
||||
e++d++++++c--i
|
||||
| \
|
||||
\ h--a
|
||||
\ |
|
||||
\___________g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | access | oneway |
|
||||
| ah | | no |
|
||||
| ihg | | no |
|
||||
| eg | | no |
|
||||
| icde | | no |
|
||||
| cde | destination | no |
|
||||
| eb | | no |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | # |
|
||||
| i | b | ihg,eg,eb,eb | # goes around access=destination, though restricted way starts at two node intersection |
|
||||
| b | d | eb,cde,cde | # ends in restricted way correctly |
|
||||
| b | i | eb,eg,ihg,ihg | # goes around restricted way correctly |
|
||||
|
||||
Scenario: Car - Routing around a way that becomes destination only
|
||||
Given the node map
|
||||
"""
|
||||
a---c---b
|
||||
+ \
|
||||
+ |
|
||||
d |
|
||||
\___e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | access | oneway |
|
||||
| acbe | | no |
|
||||
| cd | destination | no |
|
||||
| de | | no |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | a | acbe,acbe |
|
||||
| d | a | de,acbe,acbe |
|
||||
| c | d | cd,cd |
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
@routing @car @hov
|
||||
Feature: Car - Handle driving
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
And a grid size of 100 meters
|
||||
|
||||
Scenario: Car - Avoid hov when not on hov
|
||||
Given the node map
|
||||
"""
|
||||
b=========c========================e====j
|
||||
~ ~ ~
|
||||
a ~ f----m
|
||||
| i |
|
||||
| | ----------------l
|
||||
| | /
|
||||
g_______________h______k_____n
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | hov |
|
||||
| ab | motorway_link | |
|
||||
| bcej | motorway | designated |
|
||||
| ag | primary | |
|
||||
| ghkn | primary | |
|
||||
| ih | primary | |
|
||||
| kl | secondary | |
|
||||
| lf | secondary | |
|
||||
| ci | motorway_link | |
|
||||
| ef | motorway_link | |
|
||||
| fm | secondary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | m | ag,ghkn,kl,lf,fm,fm |
|
||||
| c | m | bcej,ef,fm,fm |
|
||||
@@ -88,18 +88,18 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
| highway | maxspeed | width | maxspeed:forward | maxspeed:backward | forw | backw | forw_rate | backw_rate |
|
||||
| primary | | | | | 64 km/h | 64 km/h | 18 | 18 |
|
||||
| primary | | 3 | | | 64 km/h | 64 km/h | 9 | 9 |
|
||||
| primary | 60 | | | | 47 km/h | 47 km/h | 13 | 13 |
|
||||
| primary | 60 | 3 | | | 47 km/h | 47 km/h | 7 | 7 |
|
||||
| primary | | | 60 | | 47 km/h | 64 km/h | 13 | 18 |
|
||||
| primary | | 3 | 60 | | 47 km/h | 64 km/h | 7 | 9 |
|
||||
| primary | | | | 60 | 64 km/h | 47 km/h | 18 | 13 |
|
||||
| primary | | 3 | | 60 | 64 km/h | 47 km/h | 9 | 7 |
|
||||
| primary | 15 | | 60 | | 47 km/h | 11 km/h | 13 | 3 |
|
||||
| primary | 15 | 3 | 60 | | 48 km/h | 12 km/h | 7 | 2 |
|
||||
| primary | 15 | | | 60 | 12 km/h | 47 km/h | 3 | 13 |
|
||||
| primary | 15 | 3 | | 60 | 12 km/h | 47 km/h | 2 | 7 |
|
||||
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h | 7 | 13 |
|
||||
| primary | 15 | 3 | 30 | 60 | 23 km/h | 47 km/h | 3 | 7 |
|
||||
| primary | 60 | | | | 47 km/h | 47 km/h | 13.3 | 13.3 |
|
||||
| primary | 60 | 3 | | | 47 km/h | 47 km/h | 6.7 | 6.7 |
|
||||
| primary | | | 60 | | 47 km/h | 64 km/h | 13.3 | 18 |
|
||||
| primary | | 3 | 60 | | 47 km/h | 64 km/h | 6.7 | 9 |
|
||||
| primary | | | | 60 | 64 km/h | 47 km/h | 18 | 13.3 |
|
||||
| primary | | 3 | | 60 | 64 km/h | 47 km/h | 9 | 6.7 |
|
||||
| primary | 15 | | 60 | | 47 km/h | 11 km/h | 13.3 | 3.3 |
|
||||
| primary | 15 | 3 | 60 | | 48 km/h | 12 km/h | 6.7 | 1.7 |
|
||||
| primary | 15 | | | 60 | 12 km/h | 47 km/h | 3.3 | 13.3 |
|
||||
| primary | 15 | 3 | | 60 | 12 km/h | 47 km/h | 1.7 | 6.7 |
|
||||
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h | 6.7 | 13.3 |
|
||||
| primary | 15 | 3 | 30 | 60 | 23 km/h | 47 km/h | 3.3 | 6.7 |
|
||||
|
||||
Scenario: Car - Single lane streets be ignored or incur a penalty
|
||||
Then routability should be
|
||||
@@ -107,33 +107,33 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
| highway | maxspeed | lanes | maxspeed:forward | maxspeed:backward | forw | backw | forw_rate | backw_rate |
|
||||
| primary | | | | | 64 km/h | 64 km/h | 18 | 18 |
|
||||
| primary | | 1 | | | 64 km/h | 64 km/h | 9 | 9 |
|
||||
| primary | 60 | | | | 47 km/h | 47 km/h | 13 | 13 |
|
||||
| primary | 60 | 1 | | | 47 km/h | 47 km/h | 7 | 7 |
|
||||
| primary | | | 60 | | 47 km/h | 64 km/h | 13 | 18 |
|
||||
| primary | | 1 | 60 | | 47 km/h | 64 km/h | 7 | 9 |
|
||||
| primary | | | | 60 | 64 km/h | 47 km/h | 18 | 13 |
|
||||
| primary | | 1 | | 60 | 64 km/h | 47 km/h | 9 | 7 |
|
||||
| primary | 15 | | 60 | | 47 km/h | 11 km/h | 13 | 3 |
|
||||
| primary | 15 | 1 | 60 | | 48 km/h | 12 km/h | 7 | 2 |
|
||||
| primary | 15 | | | 60 | 12 km/h | 47 km/h | 3 | 13 |
|
||||
| primary | 15 | 1 | | 60 | 12 km/h | 47 km/h | 2 | 7 |
|
||||
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h | 7 | 13 |
|
||||
| primary | 15 | 1 | 30 | 60 | 23 km/h | 47 km/h | 3 | 7 |
|
||||
| primary | 60 | | | | 47 km/h | 47 km/h | 13.3 | 13.3 |
|
||||
| primary | 60 | 1 | | | 47 km/h | 47 km/h | 6.7 | 6.7 |
|
||||
| primary | | | 60 | | 47 km/h | 64 km/h | 13.3 | 18 |
|
||||
| primary | | 1 | 60 | | 47 km/h | 64 km/h | 6.7 | 9 |
|
||||
| primary | | | | 60 | 64 km/h | 47 km/h | 18 | 13.3 |
|
||||
| primary | | 1 | | 60 | 64 km/h | 47 km/h | 9 | 6.7 |
|
||||
| primary | 15 | | 60 | | 47 km/h | 11 km/h | 13.3 | 3.3 |
|
||||
| primary | 15 | 1 | 60 | | 48 km/h | 12 km/h | 6.7 | 1.7 |
|
||||
| primary | 15 | | | 60 | 12 km/h | 47 km/h | 3.3 | 13.3 |
|
||||
| primary | 15 | 1 | | 60 | 12 km/h | 47 km/h | 1.7 | 6.7 |
|
||||
| primary | 15 | | 30 | 60 | 23 km/h | 47 km/h | 6.7 | 13.3 |
|
||||
| primary | 15 | 1 | 30 | 60 | 23 km/h | 47 km/h | 3.3 | 6.7 |
|
||||
|
||||
Scenario: Car - Single lane streets only incur a penalty for two-way streets
|
||||
Then routability should be
|
||||
| highway | maxspeed | lanes | oneway | forw | backw | forw_rate | backw_rate |
|
||||
| primary | 30 | 1 | yes | 23 km/h | | 7 | |
|
||||
| primary | 30 | 1 | -1 | | 23 km/h | | 7 |
|
||||
| primary | 30 | 1 | | 23 km/h | 23 km/h | 3 | 3 |
|
||||
| primary | 30 | 2 | | 23 km/h | 23 km/h | 7 | 7 |
|
||||
| primary | 30 | 1 | yes | 23 km/h | | 6.7 | |
|
||||
| primary | 30 | 1 | -1 | | 23 km/h | | 6.7 |
|
||||
| primary | 30 | 1 | | 23 km/h | 23 km/h | 3.3 | 3.3 |
|
||||
| primary | 30 | 2 | | 23 km/h | 23 km/h | 6.7 | 6.7 |
|
||||
|
||||
Scenario: Car - Forward/backward maxspeed on reverse oneways
|
||||
Then routability should be
|
||||
| highway | maxspeed | maxspeed:forward | maxspeed:backward | oneway | forw | backw | forw_rate | backw_rate |
|
||||
| primary | | | | -1 | | 64 km/h | | 18 |
|
||||
| primary | 30 | | | -1 | | 23 km/h | | 7 |
|
||||
| primary | 30 | | | -1 | | 23 km/h | | 6.7 |
|
||||
| primary | | 30 | | -1 | | 64 km/h | | 18 |
|
||||
| primary | | | 30 | -1 | | 23 km/h | | 7 |
|
||||
| primary | 20 | 30 | | -1 | | 15 km/h | | 4 |
|
||||
| primary | 20 | | 30 | -1 | | 23 km/h | | 7 |
|
||||
| primary | | | 30 | -1 | | 23 km/h | | 6.7 |
|
||||
| primary | 20 | 30 | | -1 | | 15 km/h | | 4.4 |
|
||||
| primary | 20 | | 30 | -1 | | 23 km/h | | 6.7 |
|
||||
|
||||
@@ -18,8 +18,8 @@ Feature: Car - Street names in instructions
|
||||
| bc | Your Way | A1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | ref |
|
||||
| a | c | My Way,Your Way,Your Way | ,A1,A1|
|
||||
| from | to | route | ref |
|
||||
| a | c | My Way,Your Way | ,A1|
|
||||
|
||||
Scenario: Car - A named street with pronunciation
|
||||
Given the node map
|
||||
@@ -36,9 +36,9 @@ Feature: Car - Street names in instructions
|
||||
| cd | Your Way | yourewaye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | pronunciations | ref |
|
||||
| a | d | My Way,My Way,My Way | ,meyeway,meyeway | ,A1,A1 |
|
||||
| 1 | c | Your Way,Your Way | yourewaye,yourewaye | , |
|
||||
| from | to | route | pronunciations | ref |
|
||||
| a | d | My Way,My Way | ,meyeway | ,A1 |
|
||||
| 1 | c | Your Way,Your Way | yourewaye,yourewaye | , |
|
||||
|
||||
# See #2860
|
||||
Scenario: Car - same street name but different pronunciation
|
||||
|
||||
@@ -7,8 +7,8 @@ Feature: Car - Surfaces
|
||||
Scenario: Car - Ways tagged service should reduce speed
|
||||
Then routability should be
|
||||
| highway | service | forw | backw | forw_rate |
|
||||
| service | alley | 15 km/h +-1 | 15 km/h +-1 | 2 |
|
||||
| service | alley | 15 km/h +-1 | 15 km/h +-1 | 2.1 |
|
||||
| service | emergency_access | | | |
|
||||
| service | driveway | 15 km/h +-1 | 15 km/h +-1 | 2 |
|
||||
| service | drive-through | 15 km/h +-1 | 15 km/h +-1 | 2 |
|
||||
| service | parking | 15 km/h +-1 | 15 km/h +-1 | 2 |
|
||||
| service | driveway | 15 km/h +-1 | 15 km/h +-1 | 2.1 |
|
||||
| service | drive-through | 15 km/h +-1 | 15 km/h +-1 | 2.1 |
|
||||
| service | parking | 15 km/h +-1 | 15 km/h +-1 | 2.1 |
|
||||
|
||||
@@ -45,3 +45,9 @@ Feature: Car - speeds
|
||||
| primary | 60 | 47 km/h | 47 km/h |
|
||||
| primary | 60 | 47 km/h | 47 km/h |
|
||||
| primary | 60 | 47 km/h | 47 km/h |
|
||||
|
||||
Scenario: Car - Side road penalties
|
||||
Then routability should be
|
||||
|
||||
| highway | side_road | forw | backw | forw_rate | backw_rate |
|
||||
| primary | yes | 64 km/h | 64 km/h | 14.4 | 14.4 |
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
@routing @car @startpoint
|
||||
Feature: Car - Allowed start/end modes
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Don't start/stop on ferries
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b 2 c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle |
|
||||
| ab | primary | | |
|
||||
| bc | | ferry | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| 1 | 2 | ab,ab | driving,driving |
|
||||
| 2 | 1 | ab,ab | driving,driving |
|
||||
|
||||
Scenario: Car - Don't start/stop on trains
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b 2 c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway | bicycle |
|
||||
| ab | primary | | |
|
||||
| bc | | train | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| 1 | 2 | ab,ab | driving,driving |
|
||||
| 2 | 1 | ab,ab | driving,driving |
|
||||
@@ -5,7 +5,7 @@ Feature: Basic Routing
|
||||
Given the profile "car"
|
||||
Given a grid size of 500 meters
|
||||
|
||||
@smallest
|
||||
@smallest @via
|
||||
Scenario: Summaries when routing on a simple network
|
||||
Given the node map
|
||||
"""
|
||||
@@ -60,8 +60,8 @@ Feature: Basic Routing
|
||||
| bc | | 101 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | summary |
|
||||
| a,c | road, | road, 101 |
|
||||
| waypoints | route | summary |
|
||||
| a,c | road,, | road, 101 |
|
||||
|
||||
Scenario: Only Refs
|
||||
Given the node map
|
||||
|
||||
@@ -40,13 +40,13 @@ Feature: Car - Surfaces
|
||||
| highway | access | tracktype | smoothness | surface | forw | backw |
|
||||
| motorway | | | | | x | |
|
||||
| motorway | no | grade1 | excellent | asphalt | | |
|
||||
| motorway | private | grade1 | excellent | asphalt | | |
|
||||
| motorway | private | grade1 | excellent | asphalt | x | |
|
||||
| motorway | agricultural | grade1 | excellent | asphalt | | |
|
||||
| motorway | forestry | grade1 | excellent | asphalt | | |
|
||||
| motorway | emergency | grade1 | excellent | asphalt | | |
|
||||
| primary | | | | | x | x |
|
||||
| primary | private | grade1 | excellent | asphalt | x | x |
|
||||
| primary | no | grade1 | excellent | asphalt | | |
|
||||
| primary | private | grade1 | excellent | asphalt | | |
|
||||
| primary | agricultural | grade1 | excellent | asphalt | | |
|
||||
| primary | forestry | grade1 | excellent | asphalt | | |
|
||||
| primary | emergency | grade1 | excellent | asphalt | | |
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
@routing @car @traffic_light
|
||||
Feature: Car - Handle traffic lights
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Encounters a traffic light
|
||||
Given the node map
|
||||
"""
|
||||
a-1-b-2-c
|
||||
|
||||
d-3-e-4-f
|
||||
|
||||
g-h-i k-l-m
|
||||
| |
|
||||
j n
|
||||
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| abc | primary |
|
||||
| def | primary |
|
||||
| ghi | primary |
|
||||
| klm | primary |
|
||||
| hj | primary |
|
||||
| ln | primary |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| e | traffic_signals |
|
||||
| l | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| from | to | time | # |
|
||||
| 1 | 2 | 11.1s | no turn with no traffic light |
|
||||
| 3 | 4 | 13.1s | no turn with traffic light |
|
||||
| g | j | 18.7s | turn with no traffic light |
|
||||
| k | n | 20.7s | turn with traffic light |
|
||||
@@ -48,18 +48,17 @@ Feature: Traffic - turn penalties
|
||||
| mn | primary |
|
||||
| mp | primary |
|
||||
And the profile "car"
|
||||
And the extract extra arguments "--generate-edge-lookup"
|
||||
|
||||
Scenario: Weighting not based on turn penalty file
|
||||
When I route I should get
|
||||
| from | to | route | speed | weight | time |
|
||||
| a | h | ad,dhk,dhk | 65 km/h | 11s +-1 | 11s +-1 |
|
||||
| a | h | ad,dhk | 65 km/h | 11s +-1 | 11s +-1 |
|
||||
# straight
|
||||
| i | g | fim,fg,fg | 55 km/h | 13s +-1 | 13s +-1 |
|
||||
# right
|
||||
| a | e | ad,def,def | 44 km/h | 16.3s +-1 | 16.3s +-1 |
|
||||
# left
|
||||
| c | g | cd,def,fg,fg | 65 km/h | 22s +-1 | 22s +-1 |
|
||||
| c | g | cd,def,fg | 65 km/h | 22s +-1 | 22s +-1 |
|
||||
# double straight
|
||||
| p | g | mp,fim,fg,fg | 60 km/h | 24s +-1 | 24s +-1 |
|
||||
# straight-right
|
||||
@@ -87,15 +86,16 @@ Feature: Traffic - turn penalties
|
||||
# hkl left turn
|
||||
# ade left turn
|
||||
And the contract extra arguments "--turn-penalty-file {penalties_file}"
|
||||
And the customize extra arguments "--turn-penalty-file {penalties_file}"
|
||||
When I route I should get
|
||||
| from | to | route | speed | weight | time |
|
||||
| a | h | ad,dhk,dhk | 65 km/h | 11 | 11s +-1 |
|
||||
| a | h | ad,dhk | 65 km/h | 11 | 11s +-1 |
|
||||
# straight
|
||||
| i | g | fim,fg,fg | 56 km/h | 12.8 | 12s +-1 |
|
||||
# right - ifg penalty
|
||||
| a | e | ad,def,def | 67 km/h | 10.8 | 10s +-1 |
|
||||
# left - faster because of negative ade penalty
|
||||
| c | g | cd,def,fg,fg | 65 km/h | 22 | 22s +-1 |
|
||||
| c | g | cd,def,fg | 65 km/h | 22 | 22s +-1 |
|
||||
# double straight
|
||||
| p | g | mp,fim,fg,fg | 61 km/h | 23.8 | 23s +-1 |
|
||||
# straight-right - ifg penalty
|
||||
@@ -105,12 +105,13 @@ Feature: Traffic - turn penalties
|
||||
# double right - forced left by lkh penalty
|
||||
| g | n | fg,fim,mn,mn | 28 km/h | 51.8 | 51s +-1 |
|
||||
# double left - imn penalty
|
||||
| j | c | jk,klm,fim,def,cd,cd | 53 km/h | 54.6 | 54s +-1 |
|
||||
| j | c | jk,klm,fim,def,cd | 53 km/h | 54.6 | 54s +-1 |
|
||||
# double left - hdc penalty ever so slightly higher than imn; forces all the way around
|
||||
|
||||
Scenario: Too-negative penalty clamps, but does not fail
|
||||
Given the contract extra arguments "--turn-penalty-file {penalties_file}"
|
||||
And the profile "testbot"
|
||||
Given the profile "testbot"
|
||||
And the contract extra arguments "--turn-penalty-file {penalties_file}"
|
||||
And the customize extra arguments "--turn-penalty-file {penalties_file}"
|
||||
And the turn penalty file
|
||||
"""
|
||||
1,4,5,-10
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
@routing @via
|
||||
Feature: Via points
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
# See issue #1896
|
||||
Scenario: Via point at a dead end with barrier
|
||||
Given the profile "car"
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
1
|
||||
d
|
||||
|
||||
|
||||
f e
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | barrier |
|
||||
| d | bollard |
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
| bd |
|
||||
| afed |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| a,1,c | abc,bd,bd,bd,bd,abc,abc |
|
||||
| c,1,a | abc,bd,bd,bd,bd,abc,abc |
|
||||
@@ -51,8 +51,8 @@ Feature: Car - weights
|
||||
| cd | primary | yes |
|
||||
| be | service | yes |
|
||||
| ec | service | yes |
|
||||
And the extract extra arguments "--generate-edge-lookup"
|
||||
And the contract extra arguments "--segment-speed-file {speeds_file}"
|
||||
And the customize extra arguments "--segment-speed-file {speeds_file}"
|
||||
And the speed file
|
||||
"""
|
||||
2,5,8
|
||||
@@ -61,3 +61,28 @@ Feature: Car - weights
|
||||
| from | to | route | speed | weight |
|
||||
| a | d | ab,bc,cd,cd | 65 km/h | 44.4 |
|
||||
| a | e | ab,be,be | 14 km/h | 112 |
|
||||
|
||||
Scenario: Distance weights
|
||||
Given the profile file "car" extended with
|
||||
"""
|
||||
api_version = 1
|
||||
properties.weight_name = 'distance'
|
||||
"""
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
a---b---c
|
||||
|
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| abc |
|
||||
| bd |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | bearings | route | distance | weights | times |
|
||||
| a,b | 90 90 | abc,abc | 200m | 200,0 | 11.1s,0s |
|
||||
| b,c | 90 90 | abc,abc | 200m | 200,0 | 11.1s,0s |
|
||||
| a,d | 90 180 | abc,bd,bd | 399.9m | 200,200,0 | 13.2s,11.1s,0s |
|
||||
|
||||
@@ -3,6 +3,7 @@ Feature: Foot - Squares and other areas
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
@square
|
||||
Scenario: Foot - Route along edge of a squares
|
||||
|
||||
@@ -3,6 +3,7 @@ Feature: Foot - Street names in instructions
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
Scenario: Foot - A named street
|
||||
Given the node map
|
||||
|
||||
@@ -4,6 +4,7 @@ Feature: Foot - Turn restrictions
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
@no_turning
|
||||
Scenario: Foot - No left turn
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
@routing @foot @startpoint
|
||||
Feature: Foot - Allowed start/end modes
|
||||
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
Scenario: Foot - Don't start/stop on ferries
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b 2 c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle |
|
||||
| ab | primary | | |
|
||||
| bc | | ferry | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| 1 | 2 | ab,ab | walking,walking |
|
||||
| 2 | 1 | ab,ab | walking,walking |
|
||||
|
||||
Scenario: Foot - Don't start/stop on trains
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b 2 c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway | bicycle |
|
||||
| ab | primary | | |
|
||||
| bc | | train | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| 1 | 2 | ab,ab | walking,walking |
|
||||
| 2 | 1 | ab,ab | walking,walking |
|
||||
@@ -35,10 +35,10 @@ Feature: Turn Lane Guidance
|
||||
| restriction | bc | cd | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false right:false, |
|
||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true right:false, |
|
||||
| a,f | in,cross,cross | depart,turn right,arrive | ,left:false straight:false right:true, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | in,cross,cross | depart,turn left,arrive | ,left:true straight:false, |
|
||||
| a,g | in,straight,straight | depart,new name straight,arrive | ,left:false straight:true, |
|
||||
| a,f | in,cross,cross | depart,continue right,arrive | ,, |
|
||||
|
||||
@sliproads
|
||||
Scenario: Separate Turn Lanes
|
||||
|
||||
@@ -297,19 +297,19 @@ Feature: Turn Lane Guidance
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | turn:lanes:forward | name |
|
||||
| ab | | main |
|
||||
| bc | left\|through\|through\|through\|right | main |
|
||||
| cd | left\|through\|right | main |
|
||||
| de | | main |
|
||||
| cf | | off |
|
||||
| ch | | off |
|
||||
| dg | | off |
|
||||
| di | | off |
|
||||
| nodes | turn:lanes:forward | name | destination | oneway |
|
||||
| ab | | main | One | yes |
|
||||
| bc | left\|through\|through\|through\|right | main | One | yes |
|
||||
| cd | left\|through\|right | main | Two | yes |
|
||||
| de | | main | Three | yes |
|
||||
| cf | | off | | yes |
|
||||
| ch | | off | | yes |
|
||||
| dg | | off | | yes |
|
||||
| di | | off | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | main,main,main | depart,use lane straight,arrive | ,left:false straight:false straight:true straight:false right:false, |
|
||||
| waypoints | route | turns | destinations | lanes | locations |
|
||||
| a,e | main,main,main | depart,use lane straight,arrive | One,Two,Three | ,left:false straight:false straight:true straight:false right:false, | a,c,e |
|
||||
|
||||
@anticipate
|
||||
Scenario: Anticipate Lanes for through and collapse multiple use lanes
|
||||
@@ -818,3 +818,37 @@ Feature: Turn Lane Guidance
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | MySt,MySt,MySt,MySt | depart,continue right,turn right,arrive | ,straight:false straight:false right:false right:true,left:false right:true, |
|
||||
|
||||
@anticipate
|
||||
Scenario: Don't Overdo It
|
||||
Given the node map
|
||||
"""
|
||||
q r s t u v
|
||||
| | | | | |
|
||||
a - - - - - - - - - - b - - - - - - - - - - c - - - - - - - - - - d - - - - - - - - - - e - - - - - - - - - - f - - - - - - - - - - g - h - i
|
||||
| | | | | | |
|
||||
p o n m l k j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway |
|
||||
| ab | road | left\|\|\| | yes |
|
||||
| bc | road | left\|\|\| | yes |
|
||||
| cd | road | left\|\|\| | yes |
|
||||
| de | road | left\|\|\| | yes |
|
||||
| ef | road | left\|\|\| | yes |
|
||||
| fg | road | left\|\|\| | yes |
|
||||
| gh | road | \|\|right | yes |
|
||||
| hi | road | | yes |
|
||||
| qbp | 1st | | no |
|
||||
| rco | 2nd | | no |
|
||||
| sdn | 3rd | | no |
|
||||
| tem | 4th | | no |
|
||||
| ufl | 5th | | no |
|
||||
| vgk | 6th | | no |
|
||||
| hj | 7th | | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations | lanes |
|
||||
| a,i | road,road,road | depart,use lane straight,arrive | a,g,i | ,left:false none:true none:true none:false, |
|
||||
| a,j | road,road,7th,7th | depart,use lane straight,turn right,arrive | a,f,h,j | ,left:false none:false none:false none:true,none:false none:false right:true, |
|
||||
|
||||
@@ -33,8 +33,8 @@ Feature: Features related to bugs
|
||||
| e | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| 1,2 | top,right,right | depart,new name right,arrive |
|
||||
| waypoints | route | turns |
|
||||
| 1,2 | top,right | depart,arrive |
|
||||
|
||||
@3156
|
||||
Scenario: Incorrect lanes tag
|
||||
|
||||
@@ -9,10 +9,10 @@ Feature: Collapse
|
||||
Scenario: Collapse U-Turn Triangle Intersection
|
||||
Given the node map
|
||||
"""
|
||||
g f e d
|
||||
|
||||
|
||||
a b c
|
||||
g---f---e---d
|
||||
\ /
|
||||
\ /
|
||||
a-----b-----c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -23,27 +23,27 @@ Feature: Collapse
|
||||
| be | primary_link | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,road,road | depart,continue uturn,arrive |
|
||||
| d,c | road,road,road | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | road,road,road | depart,continue uturn,arrive | a,b,g |
|
||||
| d,c | road,road,road | depart,continue uturn,arrive | d,f,c |
|
||||
|
||||
@reverse @traffic-signals
|
||||
Scenario: Collapse U-Turn Triangle Intersection
|
||||
Given the node map
|
||||
"""
|
||||
g f j e d
|
||||
|
||||
g---f---j---e---d
|
||||
\ /
|
||||
h i
|
||||
|
||||
a b c
|
||||
\ /
|
||||
a-------b-------c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abc | primary | road | yes |
|
||||
| dejfg | primary | road | yes |
|
||||
| fhb | primary_link | | |
|
||||
| bie | primary_link | | |
|
||||
| fhb | primary_link | | yes |
|
||||
| bie | primary_link | | yes |
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
@@ -52,9 +52,9 @@ Feature: Collapse
|
||||
| i | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,road,road | depart,continue uturn,arrive |
|
||||
| d,c | road,road,road | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | road,road,road | depart,continue uturn,arrive | a,b,g |
|
||||
| d,c | road,road,road | depart,continue uturn,arrive | d,f,c |
|
||||
|
||||
Scenario: Forking before a turn (forky)
|
||||
Given the node map
|
||||
@@ -66,7 +66,7 @@ Feature: Collapse
|
||||
`d.
|
||||
f e
|
||||
"""
|
||||
# note: check clooapse.feature for a similar test case where we do not
|
||||
# note: check collapse.feature for a similar test case where we do not
|
||||
# classify the situation as Sliproad and therefore keep the fork inst.
|
||||
|
||||
And the ways
|
||||
@@ -85,8 +85,65 @@ Feature: Collapse
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive |
|
||||
| a,e | road,road,road | depart,continue right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
|
||||
| a,e | road,road,road | depart,continue slight right,arrive | a,b,e |
|
||||
# We should discuss whether the next item should be collapsed to depart,turn right,arrive.
|
||||
| a,f | road,road,cross,cross | depart,continue slight right,turn right,arrive |
|
||||
| a,f | road,road,cross,cross | depart,continue slight right,turn right,arrive | a,b,d,f |
|
||||
|
||||
Scenario: Forking before a turn (forky), larger
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
.
|
||||
c
|
||||
.'|
|
||||
.' |
|
||||
a . . b .' |
|
||||
' . |
|
||||
` d
|
||||
f ' e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | highway |
|
||||
| ab | road | yes | primary |
|
||||
| bd | road | yes | primary |
|
||||
| bc | road | yes | primary |
|
||||
| de | road | yes | primary |
|
||||
| fd | cross | no | secondary |
|
||||
| dc | cross | no | secondary |
|
||||
| cg | cross | no | secondary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_left_turn |
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
|
||||
| a,e | road,road,road | depart,continue slight right,arrive | a,b,e |
|
||||
# We should discuss whether the next item should be collapsed to depart,turn right,arrive.
|
||||
| a,f | road,road,cross,cross | depart,continue slight right,turn right,arrive | a,b,d,f |
|
||||
|
||||
Scenario: Pulled Back Turn
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
|
|
||||
a-b-c
|
||||
|
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abc | tertiary | road |
|
||||
| cd | tertiary | left |
|
||||
| be | tertiary | right |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | road,left,left | depart,turn left,arrive |
|
||||
| a,e | road,right,right | depart,turn right,arrive |
|
||||
|
||||
+323
-285
@@ -32,23 +32,23 @@ Feature: Collapse
|
||||
| gb | primary | first | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,l | first,second,second | depart,turn right,arrive |
|
||||
| a,d | first,first | depart,arrive |
|
||||
| a,j | first,second,second | depart,turn left,arrive |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive |
|
||||
| e,j | first,second,second | depart,turn right,arrive |
|
||||
| e,h | first,first | depart,arrive |
|
||||
| e,l | first,second,second | depart,turn left,arrive |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive |
|
||||
| k,h | second,first,first | depart,turn right,arrive |
|
||||
| k,l | second,second | depart,arrive |
|
||||
| k,d | second,first,first | depart,turn left,arrive |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive |
|
||||
| i,d | second,first,first | depart,turn right,arrive |
|
||||
| i,j | second,second | depart,arrive |
|
||||
| i,h | second,first,first | depart,turn left,arrive |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
|
||||
| a,d | first,first | depart,arrive | a,d |
|
||||
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
|
||||
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
|
||||
| e,h | first,first | depart,arrive | e,h |
|
||||
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
|
||||
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
|
||||
| k,l | second,second | depart,arrive | k,l |
|
||||
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
|
||||
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
|
||||
| i,j | second,second | depart,arrive | i,j |
|
||||
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Correct Street
|
||||
Given the node map
|
||||
@@ -77,23 +77,23 @@ Feature: Collapse
|
||||
| gb | primary | second | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,l | first,second,second | depart,turn right,arrive |
|
||||
| a,d | first,first | depart,arrive |
|
||||
| a,j | first,second,second | depart,turn left,arrive |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive |
|
||||
| e,j | first,second,second | depart,turn right,arrive |
|
||||
| e,h | first,first | depart,arrive |
|
||||
| e,l | first,second,second | depart,turn left,arrive |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive |
|
||||
| k,h | second,first,first | depart,turn right,arrive |
|
||||
| k,l | second,second | depart,arrive |
|
||||
| k,d | second,first,first | depart,turn left,arrive |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive |
|
||||
| i,d | second,first,first | depart,turn right,arrive |
|
||||
| i,j | second,second | depart,arrive |
|
||||
| i,h | second,first,first | depart,turn left,arrive |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
|
||||
| a,d | first,first | depart,arrive | a,d |
|
||||
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
|
||||
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
|
||||
| e,h | first,first | depart,arrive | e,h |
|
||||
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
|
||||
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
|
||||
| k,l | second,second | depart,arrive | k,l |
|
||||
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
|
||||
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
|
||||
| i,j | second,second | depart,arrive | i,j |
|
||||
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets
|
||||
Given the node map
|
||||
@@ -122,23 +122,23 @@ Feature: Collapse
|
||||
| gb | primary | first | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,l | first,second,second | depart,turn right,arrive |
|
||||
| a,d | first,first | depart,arrive |
|
||||
| a,j | first,second,second | depart,turn left,arrive |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive |
|
||||
| e,j | first,second,second | depart,turn right,arrive |
|
||||
| e,h | first,first | depart,arrive |
|
||||
| e,l | first,second,second | depart,turn left,arrive |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive |
|
||||
| k,h | second,first,first | depart,turn right,arrive |
|
||||
| k,l | second,second | depart,arrive |
|
||||
| k,d | second,first,first | depart,turn left,arrive |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive |
|
||||
| i,d | second,first,first | depart,turn right,arrive |
|
||||
| i,j | second,second | depart,arrive |
|
||||
| i,h | second,first,first | depart,turn left,arrive |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
|
||||
| a,d | first,first | depart,arrive | a,d |
|
||||
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
|
||||
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
|
||||
| e,h | first,first | depart,arrive | e,h |
|
||||
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
|
||||
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
|
||||
| k,l | second,second | depart,arrive | k,l |
|
||||
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
|
||||
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
|
||||
| i,j | second,second | depart,arrive | i,j |
|
||||
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
|
||||
|
||||
Scenario: Partly Segregated Intersection, Two Segregated Roads
|
||||
Given the node map
|
||||
@@ -172,23 +172,23 @@ Feature: Collapse
|
||||
| liejk | primary | second | yes | 5 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,h | first,second,second | depart,turn right,arrive |
|
||||
| a,c | first,first | depart,arrive |
|
||||
| a,j | first,second,second | depart,turn left,arrive |
|
||||
| a,f | first,first,first | depart,continue uturn,arrive |
|
||||
| d,j | first,second,second | depart,turn right,arrive |
|
||||
| d,f | first,first | depart,arrive |
|
||||
| d,h | first,second,second | depart,turn left,arrive |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
| g,c | second,first,first | depart,turn right,arrive |
|
||||
| g,j | second,second | depart,arrive |
|
||||
| g,f | second,first,first | depart,turn left,arrive |
|
||||
| g,h | second,second,second | depart,continue uturn,arrive |
|
||||
| i,f | second,first,first | depart,turn right,arrive |
|
||||
| i,h | second,second | depart,arrive |
|
||||
| i,c | second,first,first | depart,turn left,arrive |
|
||||
| i,j | second,second,second | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,h | first,second,second | depart,turn right,arrive | a,b,h |
|
||||
| a,c | first,first | depart,arrive | a,c |
|
||||
| a,j | first,second,second | depart,turn left,arrive | a,b,j |
|
||||
| a,f | first,first,first | depart,continue uturn,arrive | a,b,f |
|
||||
| d,j | first,second,second | depart,turn right,arrive | d,e,j |
|
||||
| d,f | first,first | depart,arrive | d,f |
|
||||
| d,h | first,second,second | depart,turn left,arrive | d,e,h |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
|
||||
| g,c | second,first,first | depart,turn right,arrive | g,b,c |
|
||||
| g,j | second,second | depart,arrive | g,j |
|
||||
| g,f | second,first,first | depart,turn left,arrive | g,e,f |
|
||||
| g,h | second,second,second | depart,continue uturn,arrive | g,b,h |
|
||||
| i,f | second,first,first | depart,turn right,arrive | i,e,f |
|
||||
| i,h | second,second | depart,arrive | i,h |
|
||||
| i,c | second,first,first | depart,turn left,arrive | i,b,c |
|
||||
| i,j | second,second,second | depart,continue uturn,arrive | i,e,j |
|
||||
|
||||
Scenario: Partly Segregated Intersection, Two Segregated Roads, Intersection belongs to Second
|
||||
Given the node map
|
||||
@@ -226,23 +226,23 @@ Feature: Collapse
|
||||
| liejk | primary | second | yes | 5 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,h | first,second,second | depart,turn right,arrive |
|
||||
| a,c | first,first | depart,arrive |
|
||||
| a,j | first,second,second | depart,turn left,arrive |
|
||||
| a,f | first,first,first | depart,continue uturn,arrive |
|
||||
| d,j | first,second,second | depart,turn right,arrive |
|
||||
| d,f | first,first | depart,arrive |
|
||||
| d,h | first,second,second | depart,turn left,arrive |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
| g,c | second,first,first | depart,turn right,arrive |
|
||||
| g,j | second,second | depart,arrive |
|
||||
| g,f | second,first,first | depart,turn left,arrive |
|
||||
| g,h | second,second,second | depart,continue uturn,arrive |
|
||||
| i,f | second,first,first | depart,turn right,arrive |
|
||||
| i,h | second,second | depart,arrive |
|
||||
| i,c | second,first,first | depart,turn left,arrive |
|
||||
| i,j | second,second,second | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,h | first,second,second | depart,turn right,arrive | a,b,h |
|
||||
| a,c | first,first | depart,arrive | a,c |
|
||||
| a,j | first,second,second | depart,turn left,arrive | a,b,j |
|
||||
| a,f | first,first,first | depart,continue uturn,arrive | a,b,f |
|
||||
| d,j | first,second,second | depart,turn right,arrive | d,e,j |
|
||||
| d,f | first,first | depart,arrive | d,f |
|
||||
| d,h | first,second,second | depart,turn left,arrive | d,e,h |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
|
||||
| g,c | second,first,first | depart,turn right,arrive | g,b,c |
|
||||
| g,j | second,second | depart,arrive | g,j |
|
||||
| g,f | second,first,first | depart,turn left,arrive | g,e,f |
|
||||
| g,h | second,second,second | depart,continue uturn,arrive | g,b,h |
|
||||
| i,f | second,first,first | depart,turn right,arrive | i,e,f |
|
||||
| i,h | second,second | depart,arrive | i,h |
|
||||
| i,c | second,first,first | depart,turn left,arrive | i,b,c |
|
||||
| i,j | second,second,second | depart,continue uturn,arrive | i,e,j |
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets - Slight Angles
|
||||
Given the node map
|
||||
@@ -271,23 +271,23 @@ Feature: Collapse
|
||||
| gb | primary | first | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,l | first,second,second | depart,turn right,arrive |
|
||||
| a,d | first,first | depart,arrive |
|
||||
| a,j | first,second,second | depart,turn left,arrive |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive |
|
||||
| e,j | first,second,second | depart,turn right,arrive |
|
||||
| e,h | first,first | depart,arrive |
|
||||
| e,l | first,second,second | depart,turn left,arrive |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive |
|
||||
| k,h | second,first,first | depart,turn right,arrive |
|
||||
| k,l | second,second | depart,arrive |
|
||||
| k,d | second,first,first | depart,turn left,arrive |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive |
|
||||
| i,d | second,first,first | depart,turn right,arrive |
|
||||
| i,j | second,second | depart,arrive |
|
||||
| i,h | second,first,first | depart,turn left,arrive |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
|
||||
| a,d | first,first | depart,arrive | a,d |
|
||||
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
|
||||
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
|
||||
| e,h | first,first | depart,arrive | e,h |
|
||||
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
|
||||
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
|
||||
| k,l | second,second | depart,arrive | k,l |
|
||||
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
|
||||
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
|
||||
| i,j | second,second | depart,arrive | i,j |
|
||||
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
|
||||
|
||||
Scenario: Segregated Intersection, Cross Belonging to Mixed Streets - Slight Angles (2)
|
||||
Given the node map
|
||||
@@ -316,23 +316,23 @@ Feature: Collapse
|
||||
| gb | primary | first | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,l | first,second,second | depart,turn right,arrive |
|
||||
| a,d | first,first | depart,arrive |
|
||||
| a,j | first,second,second | depart,turn left,arrive |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive |
|
||||
| e,j | first,second,second | depart,turn right,arrive |
|
||||
| e,h | first,first | depart,arrive |
|
||||
| e,l | first,second,second | depart,turn left,arrive |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive |
|
||||
| k,h | second,first,first | depart,turn right,arrive |
|
||||
| k,l | second,second | depart,arrive |
|
||||
| k,d | second,first,first | depart,turn left,arrive |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive |
|
||||
| i,d | second,first,first | depart,turn right,arrive |
|
||||
| i,j | second,second | depart,arrive |
|
||||
| i,h | second,first,first | depart,turn left,arrive |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,l | first,second,second | depart,turn right,arrive | a,b,l |
|
||||
| a,d | first,first | depart,arrive | a,d |
|
||||
| a,j | first,second,second | depart,turn left,arrive | a,c,j |
|
||||
| a,h | first,first,first | depart,continue uturn,arrive | a,c,h |
|
||||
| e,j | first,second,second | depart,turn right,arrive | e,f,j |
|
||||
| e,h | first,first | depart,arrive | e,h |
|
||||
| e,l | first,second,second | depart,turn left,arrive | e,g,l |
|
||||
| e,d | first,first,first | depart,continue uturn,arrive | e,g,d |
|
||||
| k,h | second,first,first | depart,turn right,arrive | k,g,h |
|
||||
| k,l | second,second | depart,arrive | k,l |
|
||||
| k,d | second,first,first | depart,turn left,arrive | k,b,d |
|
||||
| k,j | second,second,second | depart,continue uturn,arrive | k,b,j |
|
||||
| i,d | second,first,first | depart,turn right,arrive | i,c,d |
|
||||
| i,j | second,second | depart,arrive | i,j |
|
||||
| i,h | second,first,first | depart,turn left,arrive | i,f,h |
|
||||
| i,l | second,second,second | depart,continue uturn,arrive | i,f,l |
|
||||
|
||||
Scenario: Entering a segregated road
|
||||
Given the node map
|
||||
@@ -353,20 +353,20 @@ Feature: Collapse
|
||||
| ge | primary | second | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
| a,f | first,first,first | depart,continue uturn,arrive |
|
||||
| a,g | first,second,second | depart,turn left,arrive |
|
||||
| d,g | first,second,second | depart,turn right,arrive |
|
||||
| g,f | second,first,first | depart,turn right,arrive |
|
||||
| g,c | second,first,first | depart,end of road left,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
|
||||
| a,f | first,first,first | depart,continue uturn,arrive | a,b,f |
|
||||
| a,g | first,second,second | depart,turn left,arrive | a,b,g |
|
||||
| d,g | first,second,second | depart,turn right,arrive | d,e,g |
|
||||
| g,f | second,first,first | depart,turn right,arrive | g,e,f |
|
||||
| g,c | second,first,first | depart,turn left,arrive | g,e,c |
|
||||
|
||||
Scenario: Do not collapse turning roads
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
c d
|
||||
a b f
|
||||
c---d
|
||||
a---b-f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -378,10 +378,10 @@ Feature: Collapse
|
||||
| bf | primary | third | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | first,first,first,first | depart,continue left,continue right,arrive |
|
||||
| a,e | first,second,second | depart,turn left,arrive |
|
||||
| a,f | first,third,third | depart,turn straight,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,d | first,first,first,first | depart,continue left,continue right,arrive | a,b,c,d |
|
||||
| a,e | first,second,second | depart,turn left,arrive | a,b,e |
|
||||
| a,f | first,third,third | depart,turn straight,arrive | a,b,f |
|
||||
|
||||
Scenario: Bridge on unnamed road
|
||||
Given the node map
|
||||
@@ -399,12 +399,14 @@ Feature: Collapse
|
||||
| waypoints | route | turns |
|
||||
| a,d | , | depart,arrive |
|
||||
|
||||
Scenario: Crossing Bridge into Segregated Turn
|
||||
# This scenario could be considered to require a `turn left`. The danger to create random/unwanted instructions
|
||||
# from a setting like this are just to big, though. Therefore I opted to use `depart,arrive` only
|
||||
Scenario: Crossing Bridge into Segregated Turn
|
||||
Given the node map
|
||||
"""
|
||||
f
|
||||
i h g e
|
||||
a b c d
|
||||
i-h-----g-e
|
||||
a-b-----c-d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -419,8 +421,8 @@ Feature: Collapse
|
||||
| hi | primary | yes | to_bridge |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,f | to_bridge,target_road,target_road | depart,turn left,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,f | to_bridge,target_road | depart,arrive | a,f |
|
||||
|
||||
Scenario: Pankenbruecke
|
||||
Given the node map
|
||||
@@ -438,8 +440,12 @@ Feature: Collapse
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway | lanes |
|
||||
| kabhj | primary | inroad | yes | 4 |
|
||||
@@ -449,17 +455,17 @@ Feature: Collapse
|
||||
| fi | primary | cross | no | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | inroad,outroad,outroad | depart,new name straight,arrive |
|
||||
| a,i | inroad,cross,cross | depart,turn left,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | inroad,outroad,outroad | depart,new name straight,arrive | a,d,g |
|
||||
| a,i | inroad,cross,cross | depart,turn left,arrive | a,f,i |
|
||||
|
||||
Scenario: Close Turns - Don't Collapse
|
||||
Given the node map
|
||||
"""
|
||||
g d
|
||||
|
||||
e b c f
|
||||
|
||||
| |
|
||||
e-b-c-f
|
||||
| |
|
||||
a h
|
||||
"""
|
||||
|
||||
@@ -472,10 +478,10 @@ Feature: Collapse
|
||||
| ch | primary | reverse |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | in,cross,out,out | depart,turn right,turn left,arrive |
|
||||
| a,h | in,cross,reverse,reverse | depart,turn right,turn right,arrive |
|
||||
| g,d | straight,cross,out,out | depart,turn left,turn left,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,d | in,cross,out,out | depart,turn right,turn left,arrive | a,b,c,d |
|
||||
| a,h | in,cross,reverse,reverse | depart,turn right,turn right,arrive | a,b,c,h |
|
||||
| g,d | straight,cross,out,out | depart,turn left,turn left,arrive | g,b,c,d |
|
||||
|
||||
Scenario: No Name During Turns
|
||||
Given the node map
|
||||
@@ -528,25 +534,6 @@ Feature: Collapse
|
||||
| waypoints | route | turns |
|
||||
| a,d | road,road | depart,arrive |
|
||||
|
||||
Scenario: Pulled Back Turn
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
a b c
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abc | tertiary | road |
|
||||
| cd | tertiary | left |
|
||||
| be | tertiary | right |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | road,left,left | depart,turn left,arrive |
|
||||
| a,e | road,right,right | depart,turn right,arrive |
|
||||
|
||||
Scenario: No Name During Turns, keep important turns
|
||||
Given the node map
|
||||
"""
|
||||
@@ -569,15 +556,15 @@ Feature: Collapse
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
a
|
||||
|
||||
g
|
||||
a .
|
||||
..
|
||||
.g
|
||||
b f
|
||||
c
|
||||
|
||||
|
||||
e
|
||||
d
|
||||
| c .
|
||||
| | . ,
|
||||
| | . .
|
||||
| | . e
|
||||
| | d
|
||||
j i
|
||||
"""
|
||||
|
||||
@@ -589,27 +576,27 @@ Feature: Collapse
|
||||
| gbj | secondary | out | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| i,h | in,road,road | depart,turn left,arrive |
|
||||
| a,d | road,road | depart,arrive |
|
||||
| a,j | road,out,out | depart,turn slight right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| i,h | in,road,road | depart,turn left,arrive | i,f,h |
|
||||
| a,d | road,road | depart,arrive | a,d |
|
||||
| a,j | road,out,out | depart,turn slight right,arrive | a,b,j |
|
||||
|
||||
Scenario: Segregated Intersection into Very Slight Turn
|
||||
Given the node map
|
||||
"""
|
||||
h
|
||||
a
|
||||
|
||||
|
||||
g
|
||||
b
|
||||
f
|
||||
c
|
||||
|
||||
|
||||
|
||||
e
|
||||
d
|
||||
a.
|
||||
.,
|
||||
..
|
||||
.g
|
||||
b.
|
||||
| f
|
||||
| c .
|
||||
| |. .
|
||||
| | . .
|
||||
| | . .
|
||||
| | . e
|
||||
| | d
|
||||
j i
|
||||
"""
|
||||
|
||||
@@ -621,17 +608,17 @@ Feature: Collapse
|
||||
| gbj | secondary | out | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| i,h | in,road,road | depart,turn slight left,arrive |
|
||||
| a,d | road,road | depart,arrive |
|
||||
| a,j | road,out,out | depart,turn slight right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| i,h | in,road,road | depart,turn slight left,arrive | i,f,h |
|
||||
| a,d | road,road | depart,arrive | a,d |
|
||||
| a,j | road,out,out | depart,turn slight right,arrive | a,b,j |
|
||||
|
||||
Scenario: Don't collapse everything to u-turn / too wide
|
||||
Given the node map
|
||||
"""
|
||||
a b e
|
||||
|
||||
d c f
|
||||
a---b---e
|
||||
|
|
||||
d---c---f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -641,18 +628,18 @@ Feature: Collapse
|
||||
| cf | secondary | bottom |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,d | depart,continue right,turn right,arrive | road,road,road,road |
|
||||
| d,a | depart,continue left,turn left,arrive | road,road,road,road |
|
||||
| waypoints | turns | route | locations |
|
||||
| a,d | depart,continue right,turn right,arrive | road,road,road,road | a,b,c,d |
|
||||
| d,a | depart,continue left,turn left,arrive | road,road,road,road | d,c,b,a |
|
||||
|
||||
Scenario: Forking before a turn
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
|
||||
c
|
||||
a b d e
|
||||
|
||||
|
|
||||
.c
|
||||
a---b-d-e
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
@@ -672,18 +659,18 @@ Feature: Collapse
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive |
|
||||
| a,e | road,road | depart,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive | a,b,g |
|
||||
| a,e | road,road | depart,arrive | a,e |
|
||||
|
||||
Scenario: Forking before a turn (narrow)
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
|
||||
c
|
||||
a b d e
|
||||
|
||||
|
|
||||
..c
|
||||
a-b---d-e
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
@@ -703,44 +690,9 @@ Feature: Collapse
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,cross,cross | depart,turn left,arrive |
|
||||
| a,e | road,road | depart,arrive |
|
||||
|
||||
Scenario: Forking before a turn (forky)
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
.
|
||||
c
|
||||
a . . b .'
|
||||
` d.
|
||||
f e
|
||||
"""
|
||||
# as it is right now we don't classify this as a sliproad,
|
||||
# check collapse-detail.feature for a similar test case
|
||||
# which removes the fork here due to it being a Sliproad.
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | highway |
|
||||
| ab | road | yes | primary |
|
||||
| bd | road | yes | primary |
|
||||
| bc | road | yes | primary |
|
||||
| de | road | yes | primary |
|
||||
| fd | cross | no | secondary |
|
||||
| dc | cross | no | secondary |
|
||||
| cg | cross | no | secondary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_left_turn |
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | road,cross,cross | depart,fork left,arrive |
|
||||
| a,e | road,road,road | depart,fork slight right,arrive |
|
||||
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | road,road,cross,cross | depart,continue slight left,turn left,arrive | a,b,c,g |
|
||||
| a,e | road,road | depart,arrive | a,e |
|
||||
|
||||
Scenario: On-Off on Highway
|
||||
Given the node map
|
||||
@@ -757,11 +709,11 @@ Feature: Collapse
|
||||
| ce | off | motorway_link | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | Hwy,Hwy | depart,arrive |
|
||||
| f,d | on,Hwy,Hwy | depart,merge slight right,arrive |
|
||||
| f,e | on,Hwy,off,off | depart,merge slight right,off ramp right,arrive |
|
||||
| a,e | Hwy,off,off | depart,off ramp right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,d | Hwy,Hwy | depart,arrive | a,d |
|
||||
| f,d | on,Hwy,Hwy | depart,merge slight right,arrive | f,b,d |
|
||||
| f,e | on,Hwy,off,off | depart,merge slight right,off ramp right,arrive | f,b,c,e |
|
||||
| a,e | Hwy,off,off | depart,off ramp right,arrive | a,c,e |
|
||||
|
||||
@negative @straight
|
||||
Scenario: Don't collapse going straight if actual turn
|
||||
@@ -808,8 +760,8 @@ Feature: Collapse
|
||||
| ge | primary | second | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
|
||||
|
||||
Scenario: Entering a segregated road slight turn
|
||||
Given the node map
|
||||
@@ -830,8 +782,8 @@ Feature: Collapse
|
||||
| ge | primary | second | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| d,c | first,first,first | depart,continue uturn,arrive | d,e,c |
|
||||
|
||||
Scenario: Do not collapse UseLane step when lanes change
|
||||
Given the node map
|
||||
@@ -855,8 +807,8 @@ Feature: Collapse
|
||||
| di | | off |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | main,main,main | depart,use lane straight,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,e | main,main,main | depart,use lane straight,arrive | a,c,e |
|
||||
|
||||
Scenario: But _do_ collapse UseLane step when lanes stay the same
|
||||
Given the node map
|
||||
@@ -912,10 +864,10 @@ Feature: Collapse
|
||||
Given the node map
|
||||
"""
|
||||
i
|
||||
j e d c h
|
||||
|
||||
|
||||
k g a b f
|
||||
j e ~ ~ ~ ~ d c h
|
||||
|
|
||||
|
|
||||
k g ~ ~ ~ ~ a b f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -930,8 +882,8 @@ Feature: Collapse
|
||||
| ej | primary | | off | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| k,j | on,ferry,road,road,ferry,off,off | depart,notification straight,notification straight,continue uturn,turn straight,notification straight,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| k,j | on,ferry,road,road,ferry,off,off | depart,notification straight,notification straight,continue uturn,turn straight,notification straight,arrive | k,g,a,b,d,e,j |
|
||||
|
||||
# http://www.openstreetmap.org/#map=19/37.78090/-122.41251
|
||||
Scenario: U-Turn onto unnamed-road
|
||||
@@ -954,8 +906,8 @@ Feature: Collapse
|
||||
| ef | secondary | | down | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,1 | up,turn,, | depart,turn right,turn sharp right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,1 | up,turn,, | depart,turn right,turn sharp right,arrive | a,b,e,_ |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/52.48778/13.30024
|
||||
Scenario: Hohenzollerdammbrücke
|
||||
@@ -1007,23 +959,21 @@ Feature: Collapse
|
||||
| os | motorway_link | a100 | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | ck | kh | k | no_right_turn |
|
||||
| restriction | bk | ki | k | no_left_turn |
|
||||
| restriction | hl | lc | l | no_right_turn |
|
||||
| restriction | gl | ld | l | no_left_turn |
|
||||
| restriction | bc | cm | c | no_right_turn |
|
||||
| restriction | bc | ck | c | no_left_turn |
|
||||
| restriction | nc | cm | c | no_left_turn |
|
||||
| restriction | nc | cd | c | no_right_turn |
|
||||
| restriction | lc | ck | c | no_left_turn |
|
||||
| restriction | lc | cd | c | no_right_turn |
|
||||
| restriction | gh | ho | h | no_right_turn |
|
||||
| restriction | gh | hl | h | no_left_turn |
|
||||
| restriction | kh | hi | h | no_left_turn |
|
||||
| restriction | kh | hl | h | no_right_turn |
|
||||
| restriction | ph | ho | h | no_left_turn |
|
||||
| restriction | ph | hi | h | no_right_turn |
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | ck | ki | k | only_straight_on |
|
||||
| restriction | bk | kh | k | only_straight_on |
|
||||
| restriction | hl | ld | l | only_straight_on |
|
||||
| restriction | gl | lc | l | only_straight_on |
|
||||
| restriction | bc | cm | c | no_right_turn |
|
||||
| restriction | bc | ck | c | no_left_turn |
|
||||
| restriction | nc | cm | c | no_left_turn |
|
||||
| restriction | nc | cd | c | no_right_turn |
|
||||
| restriction | lc | cm | c | only_straight_on |
|
||||
| restriction | gh | ho | h | no_right_turn |
|
||||
| restriction | gh | hl | h | no_left_turn |
|
||||
| restriction | kh | ho | h | only_straight_on |
|
||||
| restriction | ph | ho | h | no_left_turn |
|
||||
| restriction | ph | hi | h | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
@@ -1036,3 +986,91 @@ Feature: Collapse
|
||||
| f,e | | | |
|
||||
| q,j | a100,hohe,hohe | depart,turn right,arrive | q,p,j |
|
||||
| q,e | a100,hohebruecke,hohe | depart,turn left,arrive | q,p,e |
|
||||
|
||||
Scenario: Forking before a turn (forky)
|
||||
Given the node map
|
||||
"""
|
||||
g
|
||||
.
|
||||
c
|
||||
a . . b .'
|
||||
` d.
|
||||
f e
|
||||
"""
|
||||
#Check collapse.detail for a similar case (shorter) that does not classify these turns as a sliproad anymore
|
||||
|
||||
And the ways
|
||||
| nodes | name | oneway | highway |
|
||||
| ab | road | yes | primary |
|
||||
| bd | road | yes | primary |
|
||||
| bc | road | yes | primary |
|
||||
| de | road | yes | primary |
|
||||
| fd | cross | no | secondary |
|
||||
| dc | cross | no | secondary |
|
||||
| cg | cross | no | secondary |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bd | dc | d | no_left_turn |
|
||||
| restriction | bc | dc | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | road,road,cross,cross | depart,fork slight left,turn left,arrive | a,b,c,g |
|
||||
| a,e | road,road,road | depart,fork slight right,arrive | a,b,e |
|
||||
| a,f | road,road,cross,cross | depart,fork slight right,turn right,arrive | a,b,d,f |
|
||||
|
||||
|
||||
# http://www.openstreetmap.org/way/92415447 #3933
|
||||
Scenario: Use total angle for turn instruction if entry step has large distance
|
||||
# """
|
||||
# kf-_ a
|
||||
# | - b
|
||||
# | c
|
||||
# |d
|
||||
# e
|
||||
# |
|
||||
# i
|
||||
# """
|
||||
|
||||
And the node locations
|
||||
| node | lat | lon | #id |
|
||||
| a | -33.9644254 | 151.1378673 | 33226063 |
|
||||
| b | -33.9644373 | 151.1377172 | 1072787030 |
|
||||
| c | -33.9644791 | 151.1374452 | 4222903609 |
|
||||
| d | -33.9645661 | 151.1372654 | 4222903610 |
|
||||
| e | -33.9646986 | 151.1371539 | 4222903611 |
|
||||
| f | -33.964386 | 151.1372133 | 1072786875 |
|
||||
| i | -33.9661796 | 151.1368491 | 2781176918 |
|
||||
| k | -33.9643781 | 151.1371422 | 1684173853 |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway | #id |
|
||||
| ab | trunk | President Avenue | yes | 92415447 |
|
||||
| bcde | trunk | President Avenue | yes | 422534457 |
|
||||
| bf | trunk | President Avenue | yes | 447779786 |
|
||||
| fk | trunk | President Avenue | yes | 179293012 |
|
||||
| fei | trunk | Princes Highway | yes | 130099670 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,i | President Avenue,Princes Highway,Princes Highway | depart,turn left,arrive | a,b,i |
|
||||
|
||||
|
||||
Scenario: Don't combine uturns
|
||||
Given the node map
|
||||
"""
|
||||
2 d
|
||||
a - - b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c
|
||||
1
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | tertiary |
|
||||
| bc | tertiary |
|
||||
| bd | service |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | bearings | route | turns | locations |
|
||||
| 1,2 | 90 270 | ab,bd,bd,ab,ab | depart,turn left,continue uturn,turn right,arrive | _,b,d,b,_ |
|
||||
|
||||
@@ -21,20 +21,22 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abc | trunk | first | |
|
||||
| ab | trunk | first | |
|
||||
| bc | trunk | first | |
|
||||
| cd | trunk | first | |
|
||||
| bhf | trunk_link | | yes |
|
||||
| cfg | primary | second | yes |
|
||||
| ec | primary | second | |
|
||||
| cf | primary | second | yes |
|
||||
| fg | primary | second | yes |
|
||||
| ec | primary | second | no |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | cfg | c | no_right_turn |
|
||||
| restriction | bc | cf | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,second,second | depart,turn right,arrive |
|
||||
| a,1 | first,, | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | first,second,second | depart,turn right,arrive | a,b,g |
|
||||
| a,1 | first,, | depart,turn right,arrive | a,b,_ |
|
||||
|
||||
Scenario: Turn Instead of Ramp
|
||||
Given the node map
|
||||
@@ -62,9 +64,10 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | cfg | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,,second,second | depart,turn right,turn straight,arrive |
|
||||
#this is very ugly :(, but we don't have a way to overrule ramps right now, also: this tagging sucks
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive |
|
||||
|
||||
Scenario: Turning Sliproad onto a ferry
|
||||
Given the node map
|
||||
@@ -97,9 +100,9 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| restriction | abc | cf | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,i | first,,second,second,second | depart,turn right,turn straight,notification straight,arrive |
|
||||
| a,1 | first,, | depart,turn right,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,i | first,,second,second,second | depart,off ramp right,turn straight,notification straight,arrive |
|
||||
| a,1 | first,, | depart,off ramp right,arrive |
|
||||
|
||||
Scenario: Turn Instead of Ramp - Max-Speed
|
||||
Given the node map
|
||||
@@ -117,20 +120,22 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | maxspeed | oneway |
|
||||
| abc | trunk | first | 70 | |
|
||||
| ab | trunk | first | 70 | |
|
||||
| bc | trunk | first | 70 | |
|
||||
| cd | trunk | first | 2 | |
|
||||
| bhf | trunk_link | | 2 | yes |
|
||||
| cfg | primary | second | 50 | yes |
|
||||
| ec | primary | second | 50 | |
|
||||
| cf | primary | second | 50 | yes |
|
||||
| fg | primary | second | 50 | yes |
|
||||
| ec | primary | second | 50 | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | cfg | c | no_right_turn |
|
||||
| restriction | bc | cf | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,second,second | depart,turn right,arrive |
|
||||
| a,1 | first,, | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | first,second,second | depart,turn right,arrive | a,b,g |
|
||||
| a,1 | first,, | depart,turn right,arrive | a,b,_ |
|
||||
|
||||
|
||||
Scenario: Turn Instead of Ramp
|
||||
@@ -161,8 +166,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| efg | primary | second |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive | a,b,f,g |
|
||||
|
||||
Scenario: Turn Instead of Ramp
|
||||
Given the node map
|
||||
@@ -188,8 +193,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| efg | primary | second |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | first,,second,second | depart,off ramp right,turn straight,arrive | a,b,f,g |
|
||||
|
||||
Scenario: Inner city expressway with on road
|
||||
Given the node map
|
||||
@@ -208,18 +213,20 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abc | primary | road | |
|
||||
| ab | primary | road | |
|
||||
| bc | primary | road | |
|
||||
| cg | primary | road | |
|
||||
| bfd | trunk_link | | yes |
|
||||
| cde | trunk | trunk | yes |
|
||||
| cd | trunk | trunk | yes |
|
||||
| de | trunk | trunk | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | cde | c | no_right_turn |
|
||||
| restriction | bc | cd | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | road,trunk,trunk | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,e | road,trunk,trunk | depart,turn right,arrive | a,b,e |
|
||||
|
||||
|
||||
Scenario: Slipway Round U-Turn
|
||||
@@ -242,8 +249,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| def | primary | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,f | road,road,road | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
|
||||
|
||||
Scenario: Slipway Steep U-Turn
|
||||
Given the node map
|
||||
@@ -264,8 +271,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| def | primary | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,f | road,road,road | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
|
||||
|
||||
Scenario: Schwarzwaldstrasse Autobahn
|
||||
Given the node map
|
||||
@@ -309,21 +316,21 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| qe | secondary_link | Ettlinger Allee | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | ref |
|
||||
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,L561, |
|
||||
| waypoints | route | turns | ref | locations |
|
||||
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,, | a,b,o |
|
||||
|
||||
Scenario: Traffic Lights everywhere
|
||||
#http://map.project-osrm.org/?z=18¢er=48.995336%2C8.383813&loc=48.995467%2C8.384548&loc=48.995115%2C8.382761&hl=en&alt=0
|
||||
Given the node map
|
||||
"""
|
||||
a k l j
|
||||
d b c i
|
||||
|
||||
a - - k-l-. j
|
||||
''d'b-c-i
|
||||
\ |
|
||||
e g
|
||||
|
||||
1
|
||||
\|
|
||||
1\|
|
||||
h
|
||||
|
||||
|
|
||||
f
|
||||
"""
|
||||
|
||||
@@ -335,16 +342,24 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| aklbci | secondary | Ebertstrasse | yes |
|
||||
| ak | secondary | Ebertstrasse | yes |
|
||||
| klbc | secondary | Ebertstrasse | yes |
|
||||
| ci | secondary | Ebertstrasse | yes |
|
||||
| kdeh | secondary_link | | yes |
|
||||
| jcghf | primary | Brauerstrasse | yes |
|
||||
| jc | primary | Brauerstrasse | yes |
|
||||
| cgh | primary | Brauerstrasse | yes |
|
||||
| hf | primary | Brauerstrasse | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | klbc | cgh | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,i | Ebertstrasse,Ebertstrasse | depart,arrive |
|
||||
| a,l | Ebertstrasse,Ebertstrasse | depart,arrive |
|
||||
| a,f | Ebertstrasse,Brauerstrasse,Brauerstrasse | depart,turn right,arrive |
|
||||
| a,1 | Ebertstrasse,, | depart,turn slight right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,i | Ebertstrasse,Ebertstrasse | depart,arrive | a,i |
|
||||
| a,l | Ebertstrasse,Ebertstrasse | depart,arrive | a,l |
|
||||
| a,f | Ebertstrasse,Brauerstrasse,Brauerstrasse | depart,turn right,arrive | a,k,f |
|
||||
| a,1 | Ebertstrasse,, | depart,turn slight right,arrive | a,k,_ |
|
||||
|
||||
#2839
|
||||
Scenario: Self-Loop
|
||||
@@ -355,7 +370,7 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
m \
|
||||
/ i
|
||||
/ \
|
||||
| \
|
||||
| \
|
||||
| h
|
||||
| |
|
||||
n |
|
||||
@@ -390,7 +405,7 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
m \
|
||||
/ i
|
||||
/ \
|
||||
| \
|
||||
| \
|
||||
| h
|
||||
| |
|
||||
n |
|
||||
@@ -457,10 +472,10 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| g | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | # |
|
||||
| a,d | new york,new york | depart,arrive | this is the sinatra route |
|
||||
| a,j | new york,1st street,1st street | depart,turn left,arrive | |
|
||||
| a,1 | new york,m street,1st street,1st street | depart,turn right,turn left,arrive | this can false be seen as a sliproad |
|
||||
| waypoints | route | turns | locations | # |
|
||||
| a,d | new york,new york | depart,arrive | a,d | this is the sinatra route |
|
||||
| a,j | new york,1st street,1st street | depart,turn left,arrive | a,c,j | |
|
||||
| a,1 | new york,m street,1st street,1st street | depart,turn right,turn left,arrive | a,b,g,_ | this can falsly be seen as a sliproad |
|
||||
|
||||
# Merging into degree two loop on dedicated turn detection / 2927
|
||||
Scenario: Turn Instead of Ramp
|
||||
@@ -475,7 +490,7 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
\ /
|
||||
\ /
|
||||
\ /
|
||||
\ /
|
||||
b
|
||||
@@ -497,8 +512,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
|
||||
# We don't actually care about routes here, this is all about endless loops in turn discovery
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,i | road,road,road | depart,fork slight left,arrive |
|
||||
| waypoints | route |
|
||||
| a,i | road,road,road |
|
||||
|
||||
|
||||
# The following tests are current false positives / false negatives #3199
|
||||
@@ -528,9 +543,9 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| hid | residential | Waldkauzsteig |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | Nachtigallensteig,Kiebitzsteig,Kiebitzsteig | depart,turn left,arrive |
|
||||
| a,h | Nachtigallensteig,Nachtigallensteig | depart,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,d | Nachtigallensteig,Kiebitzsteig,Kiebitzsteig | depart,turn left,arrive | a,b,d |
|
||||
| a,h | Nachtigallensteig,Nachtigallensteig | depart,arrive | a,h |
|
||||
|
||||
|
||||
@sliproads
|
||||
@@ -554,8 +569,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| aeg | primary | aeg | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,f | sabc,aeg,dbef,dbef | depart,turn right,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,f | sabc,aeg,dbef,dbef | depart,turn right,turn right,arrive | s,a,e,f |
|
||||
|
||||
@sliproads
|
||||
Scenario: Through Street, not a Sliproad although obvious
|
||||
@@ -578,8 +593,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| aeg | primary | aeg | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,f | sabc,aeg,dbef,dbef | depart,turn right,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,f | sabc,aeg,dbef,dbef | depart,turn right,turn right,arrive | s,a,e,f |
|
||||
|
||||
@sliproads
|
||||
Scenario: Sliproad target turn is restricted
|
||||
@@ -614,9 +629,9 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| restriction | ae | ef | e | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,f | sabc,dbef,dbef | depart,turn right,arrive |
|
||||
| s,g | sabc,aeg,aeg | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,f | sabc,dbef,dbef | depart,turn right,arrive | s,b,f |
|
||||
| s,g | sabc,aeg,aeg | depart,turn right,arrive | s,a,g |
|
||||
|
||||
@sliproads
|
||||
Scenario: Not a Sliproad, road not continuing straight
|
||||
@@ -636,9 +651,9 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| aeg | primary | aeg | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,c | sabc,sabc | depart,arrive |
|
||||
| s,g | sabc,aeg,aeg | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,c | sabc,sabc | depart,arrive | s,c |
|
||||
| s,g | sabc,aeg,aeg | depart,turn right,arrive | s,a,g |
|
||||
|
||||
@sliproads
|
||||
Scenario: Intersection too far away with Traffic Light shortly after initial split
|
||||
@@ -671,8 +686,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| ae | primary | ae | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,f | sabc,ae,dbef,dbef | depart,turn slight right,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,f | sabc,ae,dbef,dbef | depart,turn slight right,turn right,arrive | s,a,e,f |
|
||||
|
||||
@sliproads
|
||||
Scenario: Traffic Signal on Sliproad
|
||||
@@ -704,8 +719,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| ate | primary | ate | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,f | sabc,ef,ef | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,f | sabc,ef,ef | depart,turn right,arrive | s,a,f |
|
||||
|
||||
@sliproads
|
||||
Scenario: Sliproad tagged as link
|
||||
@@ -732,8 +747,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| ae | motorway_link | ae | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,f | sabc,dbef,dbef | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,f | sabc,dbef,dbef | depart,turn right,arrive | s,a,f |
|
||||
|
||||
@sliproads
|
||||
Scenario: Sliproad with same-ish names
|
||||
@@ -759,8 +774,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| af | primary | sliproad | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,t | main,crossing,crossing | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,t | main,crossing,crossing | depart,turn right,arrive | s,a,t |
|
||||
|
||||
@sliproads
|
||||
Scenario: Not a Sliproad, name mismatch
|
||||
@@ -788,8 +803,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| af | primary | sliproad | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,t | main,away,away | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,t | main,away,away | depart,turn right,arrive | s,a,t |
|
||||
|
||||
@sliproads
|
||||
Scenario: Not a Sliproad, low road priority
|
||||
@@ -818,8 +833,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| af | service | sliproad | 30 km/h | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,t | main,away,away | depart,turn right,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,t | main,away,away | depart,turn right,arrive | s,a,t |
|
||||
|
||||
@sliproads
|
||||
Scenario: Not a Sliproad, more than three roads at target intersection
|
||||
@@ -848,8 +863,8 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| af | primary | sliproad | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| s,g | main,sliproad,another,another | depart,turn right,turn left,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| s,g | main,sliproad,another,another | depart,turn right,turn left,arrive | s,a,f,g |
|
||||
|
||||
@sliproads:
|
||||
Scenario: Throughabout-Sliproad
|
||||
@@ -927,5 +942,5 @@ Feature: Slipways and Dedicated Turn Lanes
|
||||
| restriction | bc | cd | c | only_straight |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,k | road,,, | depart,continue right,roundabout turn right exit-1,arrive | a,b,h,k |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,k | road,,, | depart,turn right,roundabout turn right exit-1,arrive | a,b,h,k |
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
@driveway @guidance
|
||||
Feature: Driveways intersections
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 5 meters
|
||||
|
||||
Scenario: Road with a turn to service road
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
~.
|
||||
b----c----d
|
||||
|
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| abc | trunk | first | yes |
|
||||
| cd | trunk | second | yes |
|
||||
| be | service | parking | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,d | first,second | depart,arrive | a,d |
|
||||
|
||||
|
||||
Scenario: Turn Instead of Ramp
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
~.
|
||||
b----c----d
|
||||
|
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | oneway |
|
||||
| ab | trunk | | yes |
|
||||
| bc | trunk | | yes |
|
||||
| cd | trunk | second | yes |
|
||||
| be | service | parking | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,d | ,second | depart,arrive | a,d |
|
||||
@@ -0,0 +1,98 @@
|
||||
@routing @guidance
|
||||
Feature: Exit Numbers and Names
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Exit number on the way after the motorway junction
|
||||
Given the node map
|
||||
"""
|
||||
a . . b . c . . d
|
||||
` e . . f
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | motorway_junction |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | junction:ref |
|
||||
| abcd | motorway | MainRoad | |
|
||||
| be | motorway_link | ExitRamp | 3 |
|
||||
| ef | motorway_link | ExitRamp | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | exits |
|
||||
| a,f | MainRoad,ExitRamp,ExitRamp | depart,off ramp slight right,arrive | ,3, |
|
||||
|
||||
|
||||
Scenario: Exit number on the way, motorway junction node tag missing, multiple numbers
|
||||
Given the node map
|
||||
"""
|
||||
a . . b . c . . d
|
||||
` e . . f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | junction:ref |
|
||||
| abcd | motorway | MainRoad | |
|
||||
| be | motorway_link | ExitRamp | 10;12 |
|
||||
| ef | motorway_link | ExitRamp | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | exits |
|
||||
| a,f | MainRoad,ExitRamp,ExitRamp | depart,off ramp slight right,arrive | ,10; 12, |
|
||||
|
||||
|
||||
Scenario: Exit number on the ways after the motorway junction, multiple exits
|
||||
Given the node map
|
||||
"""
|
||||
a . . b . c . . d
|
||||
` e . . f
|
||||
` g . . h
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | motorway_junction |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | junction:ref |
|
||||
| abcd | motorway | MainRoad | |
|
||||
| be | motorway_link | ExitRamp | 3 |
|
||||
| ef | motorway_link | ExitRamp | |
|
||||
| bg | motorway_link | ExitRamp | 3 |
|
||||
| gh | motorway_link | ExitRamp | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | exits |
|
||||
| a,f | MainRoad,ExitRamp,ExitRamp | depart,off ramp slight right,arrive | ,3, |
|
||||
| a,h | MainRoad,ExitRamp,ExitRamp | depart,off ramp right,arrive | ,3, |
|
||||
|
||||
|
||||
|
||||
# http://www.openstreetmap.org/way/417524818#map=17/37.38663/-121.97972
|
||||
Scenario: Exit 393 on Bayshore Freeway
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
` b
|
||||
` c
|
||||
. ` d
|
||||
f ` e
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| c | motorway_junction |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | junction:ref | oneway | destination |
|
||||
| abcde | motorway | Bayshore Freeway | | yes | |
|
||||
| cf | motorway_link | | 393 | yes | Great America Parkway;Bowers Avenue |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | exits | destinations |
|
||||
| a,e | Bayshore Freeway,Bayshore Freeway | depart,arrive | , | , |
|
||||
| a,f | Bayshore Freeway,, | depart,off ramp slight right,arrive | ,393,393 | ,Great America Parkway, Bowers Avenue,Great America Parkway, Bowers Avenue |
|
||||
@@ -39,8 +39,8 @@ Feature: Fork Instructions
|
||||
| bd | primary | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,bd,bd | depart,new name slight right,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,bd | depart,arrive |
|
||||
|
||||
Scenario: Don't Fork On Single Road
|
||||
Given the node map
|
||||
@@ -56,8 +56,8 @@ Feature: Fork Instructions
|
||||
| bd | primary | yes | turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | road,turn,turn | depart,new name straight,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,d | road,turn | depart,arrive |
|
||||
|
||||
Scenario: Do not fork on link type
|
||||
Given the node map
|
||||
@@ -382,6 +382,6 @@ Feature: Fork Instructions
|
||||
| ab | on | motorway_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,j | on,xbcj | depart,arrive |
|
||||
| a,i | on,off,off | depart,turn slight right,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,j | on,xbcj | depart,arrive |
|
||||
| a,i | on,off,off | depart,turn right,arrive |
|
||||
|
||||
@@ -110,9 +110,9 @@ Feature: Intersections Data
|
||||
| cf | corner |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,d | through,through | true:90,true:0 true:90 false:270,true:90 true:180 false:270;true:270 |
|
||||
| f,a | corner,through,through | true:0;true:90 false:180 true:270,true:0 false:90 true:270;true:90 |
|
||||
| waypoints | route | intersections |
|
||||
| a,d | through,through | true:90,true:0 true:90 false:270,true:90 true:180 false:270;true:270 |
|
||||
| f,a | corner,throughbridge,through | true:0;true:90 false:180 true:270,true:0 false:90 true:270;true:90 |
|
||||
|
||||
Scenario: Roundabouts
|
||||
Given the node map
|
||||
|
||||
@@ -80,8 +80,8 @@ Feature: Exceptions for routing onto low-priority roads
|
||||
| bc | service | service |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | road,service,service | depart,new name straight,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,c | road,service | depart,arrive |
|
||||
|
||||
Scenario: Straight onto low-priority, with driveway
|
||||
Given the node map
|
||||
@@ -114,6 +114,6 @@ Feature: Exceptions for routing onto low-priority roads
|
||||
| bf | driveway | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | road, | depart,arrive |
|
||||
| c,a | ,road,road | depart,new name straight,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,c | road, | depart,arrive |
|
||||
| c,a | ,road | depart,arrive |
|
||||
|
||||
@@ -354,13 +354,13 @@ Feature: Merge Segregated Roads
|
||||
| hb | road | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route | intersections |
|
||||
| a,f | depart,arrive | road,road | true:180,false:0 true:180,false:0 true:180;true:0 |
|
||||
| c,f | depart,new name straight,arrive | bridge,road,road | true:180;false:0 true:180;true:0 |
|
||||
| 1,f | depart,new name straight,arrive | bridge,road,road | true:180;false:0 true:180;true:0 |
|
||||
| f,a | depart,arrive | road,road | true:0,true:0 false:180,true:0 false:180;true:180 |
|
||||
| g,a | depart,new name straight,arrive | bridge,road,road | true:0;true:0 false:180;true:180 |
|
||||
| 2,a | depart,new name straight,arrive | bridge,road,road | true:0;true:0 false:180;true:180 |
|
||||
| waypoints | turns | route | intersections |
|
||||
| a,f | depart,arrive | road,road | true:180,false:0 true:180,false:0 true:180;true:0 |
|
||||
| c,f | depart,arrive | bridge,road | true:180,false:0 true:180;true:0 |
|
||||
| 1,f | depart,arrive | bridge,road | true:180,false:0 true:180;true:0 |
|
||||
| f,a | depart,arrive | road,road | true:0,true:0 false:180,true:0 false:180;true:180 |
|
||||
| g,a | depart,arrive | bridge,road | true:0,true:0 false:180;true:180 |
|
||||
| 2,a | depart,arrive | bridge,road | true:0,true:0 false:180;true:180 |
|
||||
|
||||
@negative
|
||||
Scenario: Traffic Circle
|
||||
@@ -501,25 +501,25 @@ Feature: Merge Segregated Roads
|
||||
| jc | vert | yes |
|
||||
| cf | vert | yes |
|
||||
| fl | vert | yes |
|
||||
| gx | horiz | no |
|
||||
| xg | horiz | no |
|
||||
| xc | horiz | no |
|
||||
| fx | horiz | no |
|
||||
| xf | horiz | no |
|
||||
| xb | horiz | no |
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bc | cf | c | no_left_turn |
|
||||
| restriction | fg | gb | g | no_left_turn |
|
||||
| restriction | cf | fg | f | no_left_turn |
|
||||
| restriction | gb | bc | b | no_left_turn |
|
||||
| restriction | xb | bc | b | no_left_turn |
|
||||
| restriction | xc | cf | c | no_left_turn |
|
||||
| restriction | xf | fg | f | no_left_turn |
|
||||
| restriction | xg | gb | g | no_left_turn |
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bc | cf | c | no_left_turn |
|
||||
| restriction | fg | gb | g | no_left_turn |
|
||||
| restriction | gb | bc | b | no_left_turn |
|
||||
| restriction | cf | fg | f | no_left_turn |
|
||||
| restriction | xb | xf | x | only_straight_on |
|
||||
| restriction | xf | xb | x | only_straight_on |
|
||||
| restriction | xg | xc | x | only_straight_on |
|
||||
| restriction | xc | xg | x | only_straight_on |
|
||||
|
||||
# the goal here should be not to mention the intersection in the middle at all and also suppress the segregated parts
|
||||
When I route I should get
|
||||
| waypoints | route | intersections |
|
||||
| a,l | horiz,vert,vert | true:90;false:0 true:60 true:90 true:180 false:270,true:60 true:120 false:240 true:300,true:0 false:90 false:180 false:240 false:270;true:180 |
|
||||
| a,d | horiz,horiz | true:90,false:0 true:60 true:90 true:180 false:270,false:0 true:90 false:180 false:270 true:300;true:270 |
|
||||
| j,h | vert,horiz,horiz | true:0;true:0 true:90 false:180 false:270 true:300,true:60 false:120 true:240 true:300,false:0 false:90 false:120 false:180 true:270;true:90 |
|
||||
| j,l | vert,vert | true:0,true:0 true:90 false:180 false:270 true:300,true:0 false:90 false:180 true:240 false:270;true:180 |
|
||||
| waypoints | route | intersections |
|
||||
| a,l | horiz,vert,vert | true:90;false:0 true:60 true:90 true:180 false:270,true:60 false:120 false:240 false:300,true:0 false:90 false:180 false:240 true:270;true:180 |
|
||||
| a,d | horiz,horiz | true:90,false:0 true:60 true:90 true:180 false:270,false:0 true:90 false:180 false:270 true:300;true:270 |
|
||||
| j,h | vert,horiz,horiz | true:0;true:0 true:90 false:180 false:270 true:300,false:60 false:120 false:240 true:300,false:0 false:90 false:120 true:180 true:270;true:90 |
|
||||
| j,l | vert,vert | true:0,true:0 true:90 false:180 false:270 true:300,true:0 false:90 false:180 true:240 false:270;true:180 |
|
||||
|
||||
@@ -3,7 +3,7 @@ Feature: New-Name Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 100 meters
|
||||
Given a grid size of 150 meters
|
||||
|
||||
Scenario: Undisturbed name Change
|
||||
Given the node map
|
||||
|
||||
@@ -97,5 +97,5 @@ Feature: Simple Turns
|
||||
| ei | left | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| g,a | in,road,road |
|
||||
| waypoints | route | turns |
|
||||
| g,a | in,road,road | depart,fork right,arrive |
|
||||
|
||||
@@ -233,9 +233,9 @@ Feature: Ramp Guidance
|
||||
| cd | motorway |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ac,cd,cd | depart,new name slight left,arrive |
|
||||
| b,d | bc,cd,cd | depart,new name slight right,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,d | ac,cd | depart,arrive |
|
||||
| b,d | bc,cd | depart,arrive |
|
||||
|
||||
Scenario: Two Ramps Joining into common Motorway Unnamed
|
||||
Given the node map
|
||||
|
||||
@@ -37,3 +37,37 @@ Feature: Basic Roundabout
|
||||
| h,a | gh,ab,ab | depart,roundabout turn left exit-3,arrive |
|
||||
| h,d | gh,cd,cd | depart,roundabout turn straight exit-2,arrive |
|
||||
| h,f | gh,ef,ef | depart,roundabout turn right exit-1,arrive |
|
||||
|
||||
# https://www.openstreetmap.org/way/223225602
|
||||
Scenario: Enter and Exit with changing mode
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
h g c d
|
||||
e
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction | highway |
|
||||
| ab | | residential |
|
||||
| cd | | residential |
|
||||
| ef | | footway |
|
||||
| gh | | footway |
|
||||
| bgecb | roundabout | residential |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive |
|
||||
| a,f | ab,ef,ef,ef | depart,roundabout turn left exit-1,notification right,arrive |
|
||||
| a,h | ab,bgecb,gh,gh | depart,roundabout turn right exit-1,notification right,arrive |
|
||||
| d,f | cd,ef,ef,ef | depart,roundabout turn sharp left exit-2,notification right,arrive |
|
||||
| d,h | cd,gh,gh,gh | depart,roundabout turn left exit-2,notification right,arrive |
|
||||
| d,a | cd,ab,ab | depart,roundabout turn right exit-1,arrive |
|
||||
| f,h | ef,gh,gh,gh | depart,roundabout turn sharp left exit-3,notification right,arrive |
|
||||
| f,a | ef,ab,ab | depart,roundabout turn straight exit-2,arrive |
|
||||
| f,d | ef,cd,cd | depart,roundabout turn right exit-1,arrive |
|
||||
| h,a | gh,ab,ab | depart,roundabout turn left exit-2,arrive |
|
||||
| h,d | gh,cd,cd | depart,roundabout turn straight exit-1,arrive |
|
||||
| h,f | gh,bgecb,ef,ef | depart,roundabout turn right exit-1,notification right,arrive |
|
||||
|
||||
@@ -222,6 +222,43 @@ Feature: Basic Roundabout
|
||||
| j,f | jkl,def,def | depart,roundabout-exit-2,arrive |
|
||||
| j,c | jkl,abc,abc | depart,roundabout-exit-3,arrive |
|
||||
|
||||
Scenario: Mixed Entry and Exit - clockwise order
|
||||
Given the node map
|
||||
"""
|
||||
c a
|
||||
j b f
|
||||
k e
|
||||
l h d
|
||||
g i
|
||||
"""
|
||||
|
||||
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-4,arrive |
|
||||
| a,l | abc,jkl,jkl | depart,roundabout-exit-3,arrive |
|
||||
| a,i | abc,ghi,ghi | depart,roundabout-exit-2,arrive |
|
||||
| a,f | abc,def,def | depart,roundabout-exit-1,arrive |
|
||||
| d,f | def,def,def | depart,roundabout-exit-4,arrive |
|
||||
| d,c | def,abc,abc | depart,roundabout-exit-3,arrive |
|
||||
| d,l | def,jkl,jkl | depart,roundabout-exit-2,arrive |
|
||||
| d,i | def,ghi,ghi | depart,roundabout-exit-1,arrive |
|
||||
| g,i | ghi,ghi,ghi | depart,roundabout-exit-4,arrive |
|
||||
| g,f | ghi,def,def | depart,roundabout-exit-3,arrive |
|
||||
| g,c | ghi,abc,abc | depart,roundabout-exit-2,arrive |
|
||||
| g,l | ghi,jkl,jkl | depart,roundabout-exit-1,arrive |
|
||||
| j,l | jkl,jkl,jkl | depart,roundabout-exit-4,arrive |
|
||||
| j,i | jkl,ghi,ghi | depart,roundabout-exit-3,arrive |
|
||||
| j,f | jkl,def,def | depart,roundabout-exit-2,arrive |
|
||||
| j,c | jkl,abc,abc | depart,roundabout-exit-1,arrive |
|
||||
|
||||
Scenario: Mixed Entry and Exit - segregated roads, different names
|
||||
Given the node map
|
||||
"""
|
||||
@@ -410,10 +447,10 @@ Feature: Basic Roundabout
|
||||
| h | give_way |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
# since we cannot handle these invalid roundabout tags yet, we cannout output roundabout taggings. This will hopefully change some day
|
||||
| waypoints | route | turns | locations |
|
||||
# since we cannot handle these invalid roundabout tags yet, we cannot output roundabout taggings. This will hopefully change some day
|
||||
#| w,x | ll,egg,egg,tr,tr | depart,roundabout-exit-1,roundabout-exit-2,arrive |
|
||||
| w,x | ll,egg,egg,tr,tr | depart,turn right,continue left,turn straight,arrive |
|
||||
| w,x | ll,egg,egg,tr,tr | depart,turn right,continue left,turn straight,arrive | w,b,d,f,x |
|
||||
|
||||
Scenario: Use Lane in Roundabout
|
||||
Given the node map
|
||||
@@ -681,3 +718,131 @@ Feature: Basic Roundabout
|
||||
| u,r | ug,ar,ar | depart,roundabout-exit-3,arrive |
|
||||
| u,s | ug,ds,ds | depart,roundabout-exit-4,arrive |
|
||||
| u,t | ug,ft,ft | depart,roundabout-exit-5,arrive |
|
||||
|
||||
|
||||
@3762
|
||||
Scenario: Only Enter
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b
|
||||
i c e ~ ~ ~ f - h
|
||||
j d
|
||||
k g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction | route |
|
||||
| ab | | |
|
||||
| ef | | ferry |
|
||||
| fh | | |
|
||||
| dg | | |
|
||||
| ic | | |
|
||||
| jk | | |
|
||||
| bcjdeb | roundabout | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,h | ab,ef,ef,fh,fh | depart,roundabout-exit-4,notification slight right,notification straight,arrive |
|
||||
|
||||
|
||||
Scenario: Drive through roundabout
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
b e d f
|
||||
c
|
||||
g h
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | junction | oneway |
|
||||
| abcda | roundabout | yes |
|
||||
| edf | | |
|
||||
| gch | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | bearings | route | turns |
|
||||
| e,f | 90 90 | edf,edf,edf | depart,roundabout-exit-1,arrive |
|
||||
| e,h | 90 135 | edf,gch,gch | depart,roundabout-exit-2,arrive |
|
||||
| g,f | 45 90 | gch,edf,edf | depart,roundabout-exit-2,arrive |
|
||||
| g,h | 45 135 | gch,gch,gch | depart,roundabout-exit-1,arrive |
|
||||
| e,e | 90 270 | edf,edf,edf | depart,roundabout-exit-3,arrive |
|
||||
|
||||
Scenario: CCW and CW roundabouts with overlaps
|
||||
Given the node map
|
||||
"""
|
||||
a d g h
|
||||
|
||||
b c j i
|
||||
f e k l
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | junction |
|
||||
| abcda | tertiary | roundabout |
|
||||
| ed | tertiary | |
|
||||
| af | tertiary | |
|
||||
| ghijg | tertiary | roundabout |
|
||||
| kg | tertiary | |
|
||||
| hl | tertiary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | distance |
|
||||
| e | f | ed,af,af | depart,roundabout-exit-1,arrive | 80.1m |
|
||||
| f | e | af,ed,ed | depart,roundabout-exit-1,arrive | 120.1m |
|
||||
| k | l | kg,hl,hl | depart,roundabout-exit-1,arrive | 80.1m |
|
||||
| l | k | hl,kg,kg | depart,roundabout-exit-1,arrive | 120.1m |
|
||||
|
||||
@4030 @4075
|
||||
Scenario: Service roundabout with service exits
|
||||
Given the node map
|
||||
"""
|
||||
g a d f
|
||||
h b1c e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | junction |
|
||||
| abcda | service | roundabout |
|
||||
| ce | service | |
|
||||
| df | service | |
|
||||
| ag | tertiary | |
|
||||
| bh | service | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| 1 | e | abcda,ce,ce | depart,roundabout-exit-1,arrive |
|
||||
| 1 | f | abcda,df,df | depart,roundabout-exit-2,arrive |
|
||||
| 1 | g | abcda,ag,ag | depart,roundabout-exit-3,arrive |
|
||||
| 1 | h | abcda,bh,bh | depart,roundabout-exit-4,arrive |
|
||||
|
||||
Scenario: Collapsing a sliproad step after roundabouts
|
||||
Given the node map
|
||||
"""
|
||||
a r j
|
||||
╱ ╲ ╱ ╲ │
|
||||
e——b——1——d———s u——f——g—h——l
|
||||
╲ ╱ ╲ ╱ `i
|
||||
c t │
|
||||
│ │ │
|
||||
m v k
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | junction | oneway | # |
|
||||
| abcda | tertiary | roundabout | | circle |
|
||||
| ebds | tertiary | | | road |
|
||||
| cm | tertiary | | | |
|
||||
| ds | tertiary | | | road |
|
||||
| rstur | tertiary | roundabout | | circle2 |
|
||||
| ufghl | tertiary | | | road |
|
||||
| tv | tertiary | | | |
|
||||
| gi | tertiary | | yes | sliproad |
|
||||
| jhik | tertiary | | | crossroad |
|
||||
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | distance |
|
||||
| e | k | ebds,ebds,ds,ufghl,jhik,jhik | depart,rotary-exit-1,rotary-exit-1,rstur-exit-2,turn right,arrive | 189.1m |
|
||||
| 1 | k | ebds,ds,ufghl,jhik,jhik | depart,rotary-exit-1,rstur-exit-2,turn right,arrive | 159.1m |
|
||||
|
||||
@@ -25,20 +25,20 @@ Feature: Staggered Intersections
|
||||
| jcdehi | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Oak St,Oak St | depart,arrive |
|
||||
| g,a | Oak St,Oak St | depart,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | Oak St,Oak St | depart,arrive | a,g |
|
||||
| g,a | Oak St,Oak St | depart,arrive | g,a |
|
||||
|
||||
Scenario: Staggered Intersection: do not collapse if long segment in between
|
||||
Given the node map
|
||||
"""
|
||||
j
|
||||
a b c
|
||||
|
||||
|
||||
|
|
||||
|
|
||||
d
|
||||
|
||||
|
||||
|
|
||||
|
|
||||
e f g
|
||||
h
|
||||
i
|
||||
@@ -51,16 +51,18 @@ Feature: Staggered Intersections
|
||||
| jcdehi | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
|
||||
| g,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | a,c,e,g |
|
||||
| g,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | g,e,c,a |
|
||||
|
||||
Scenario: Staggered Intersection: do not collapse if not left-right or right-left
|
||||
Given the node map
|
||||
"""
|
||||
j
|
||||
a b c
|
||||
|
|
||||
d
|
||||
|
|
||||
g f e
|
||||
h
|
||||
i
|
||||
@@ -73,11 +75,11 @@ Feature: Staggered Intersections
|
||||
| jcdehi | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Oak St,Oak St,Oak St | depart,continue uturn,arrive |
|
||||
| g,a | Oak St,Oak St,Oak St | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | Oak St,Oak St,Oak St | depart,continue uturn,arrive | a,c,g |
|
||||
| g,a | Oak St,Oak St,Oak St | depart,continue uturn,arrive | g,e,a |
|
||||
|
||||
Scenario: Staggered Intersection: do not collapse if the names are not the same
|
||||
Scenario: Staggered Intersection: use new-name if the names are not the same
|
||||
Given the node map
|
||||
"""
|
||||
j
|
||||
@@ -95,9 +97,9 @@ Feature: Staggered Intersections
|
||||
| jcdehi | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,g | Oak St,Cedar Dr,Elm St,Elm St | depart,turn right,turn left,arrive |
|
||||
| g,a | Elm St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,g | Oak St,Elm St | depart,arrive | a,g |
|
||||
| g,a | Elm St,Oak St | depart,arrive | g,a |
|
||||
|
||||
Scenario: Staggered Intersection: do not collapse if a mode change is involved
|
||||
Given the node map
|
||||
@@ -105,7 +107,7 @@ Feature: Staggered Intersections
|
||||
j
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
e~~f - - - - g
|
||||
h
|
||||
"""
|
||||
|
||||
@@ -117,9 +119,9 @@ Feature: Staggered Intersections
|
||||
| jcdeh | primary | road | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | modes |
|
||||
| a,g | to_sea,road,to_sea,road,road | depart,turn right,turn left,notification straight,arrive | driving,driving,ferry,driving,driving |
|
||||
| g,a | road,to_sea,road,to_sea,to_sea | depart,notification straight,turn right,turn left,arrive | driving,ferry,driving,driving,driving |
|
||||
| waypoints | route | turns | modes | locations |
|
||||
| a,g | to_sea,road,to_sea,road,road | depart,turn right,turn left,notification straight,arrive | driving,driving,ferry,driving,driving | a,c,e,f,g |
|
||||
| g,a | road,to_sea,road,to_sea,to_sea | depart,notification straight,turn right,turn left,arrive | driving,ferry,driving,driving,driving | g,f,e,c,a |
|
||||
|
||||
Scenario: Staggered Intersection: do not collapse intermediary intersections
|
||||
Given the node map
|
||||
@@ -127,7 +129,9 @@ Feature: Staggered Intersections
|
||||
j
|
||||
a b c
|
||||
e f g
|
||||
|
|
||||
d
|
||||
|
|
||||
k l m
|
||||
i
|
||||
"""
|
||||
@@ -140,6 +144,6 @@ Feature: Staggered Intersections
|
||||
| jcedki | residential | Cedar Dr |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,m | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
|
||||
| m,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,m | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | a,c,k,m |
|
||||
| m,a | Oak St,Cedar Dr,Oak St,Oak St | depart,turn right,turn left,arrive | m,k,c,a |
|
||||
|
||||
@@ -150,7 +150,7 @@ Feature: Simple Turns
|
||||
| nodes | highway | name | lanes | oneway |
|
||||
| akb | primary | road | 4 | yes |
|
||||
| hgi | primary | road | 4 | yes |
|
||||
| akcdefg | primary_link | | 1 | yes |
|
||||
| kcdefg | primary_link | | 1 | yes |
|
||||
| gj | tertiary | turn | 1 | |
|
||||
|
||||
When I route I should get
|
||||
@@ -201,14 +201,14 @@ Feature: Simple Turns
|
||||
| ef | residential | road | 2 | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations |
|
||||
| a,c | road,road | depart,arrive | a,c |
|
||||
| c,a | road,road | depart,arrive | c,a |
|
||||
| g,a | turn,road,road | depart,turn left,arrive | g,b,a |
|
||||
| g,c | turn,road,road | depart,turn right,arrive | g,b,c |
|
||||
| g,f | turn,road,road | depart,turn left,arrive | g,e,f |
|
||||
| c,f | road,road,road | depart,continue right,arrive | c,b,f |
|
||||
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
|
||||
| waypoints | route | turns | locations |
|
||||
| a,c | road,road | depart,arrive | a,c |
|
||||
| c,a | road,road | depart,arrive | c,a |
|
||||
| g,a | turn,road,road | depart,turn left,arrive | g,b,a |
|
||||
| g,c | turn,road,road | depart,turn right,arrive | g,b,c |
|
||||
| g,f | turn,road,road | depart,end of road left,arrive | g,e,f |
|
||||
| c,f | road,road,road | depart,turn right,arrive | c,b,f |
|
||||
| a,f | road,road,road | depart,continue uturn,arrive | a,b,f |
|
||||
|
||||
# http://www.openstreetmap.org/#map=19/52.48753/13.52838
|
||||
Scenario: Traffic Circle
|
||||
@@ -444,7 +444,7 @@ Feature: Simple Turns
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | locations | # |
|
||||
| g,f | turn,road | depart,arrive | g,f | #could offer an additional turn at `e` if you don't detect the turn in between as curve |
|
||||
| g,f | turn,road,road | depart,turn left,arrive | g,e,f | #could offer an additional turn at `e` if you don't detect the turn in between as curve |
|
||||
| c,f | road,road,road | depart,continue right,arrive | c,b,f | |
|
||||
|
||||
#http://www.openstreetmap.org/search?query=52.479264%2013.295617#map=19/52.47926/13.29562
|
||||
@@ -808,15 +808,15 @@ Feature: Simple Turns
|
||||
| cjk | Friede | no | | tertiary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,g | Perle,Heide,Heide | depart,turn right,arrive | true:90;true:90 true:180 false:270 true:345;true:18 |
|
||||
| a,k | Perle,Friede,Friede | depart,turn left,arrive | true:90;true:90 true:180 false:270 true:345;true:153 |
|
||||
| a,e | Perle,Perle | depart,arrive | true:90,true:90 true:180 false:270 true:345;true:270 |
|
||||
| e,k | Perle,Friede,Friede | depart,turn right,arrive | true:270;false:90 true:180 true:270 true:345;true:153 |
|
||||
| e,g | Perle,Heide,Heide | depart,turn left,arrive | true:270;false:90 true:180 true:270 true:345;true:18 |
|
||||
| h,k | Heide,Friede,Friede | depart,new name straight,arrive | true:16;true:90 true:180 true:270 true:345;true:153 |
|
||||
| h,e | Heide,Perle,Perle | depart,turn right,arrive | true:16;true:90 true:180 true:270 true:345;true:270 |
|
||||
| h,a | Heide,Perle,Perle | depart,turn left,arrive | true:16;true:90 true:180 true:270 true:345;true:90 |
|
||||
| waypoints | route | turns | intersections |
|
||||
| a,g | Perle,Heide,Heide | depart,turn right,arrive | true:90;true:90 true:180 false:270 true:345;true:18 |
|
||||
| a,k | Perle,Friede,Friede | depart,turn left,arrive | true:90;true:90 true:180 false:270 true:345;true:153 |
|
||||
| a,e | Perle,Perle | depart,arrive | true:90,true:90 true:180 false:270 true:345;true:270 |
|
||||
| e,k | Perle,Friede,Friede | depart,turn right,arrive | true:270;false:90 true:180 true:270 true:345;true:153 |
|
||||
| e,g | Perle,Heide,Heide | depart,turn left,arrive | true:270;false:90 true:180 true:270 true:345;true:18 |
|
||||
| h,k | Heide,Friede | depart,arrive | true:16,true:90 true:180 true:270 true:345;true:153 |
|
||||
| h,e | Heide,Perle,Perle | depart,turn right,arrive | true:16;true:90 true:180 true:270 true:345;true:270 |
|
||||
| h,a | Heide,Perle,Perle | depart,turn left,arrive | true:16;true:90 true:180 true:270 true:345;true:90 |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/52.53293/13.32956
|
||||
Scenario: Curved Exit from Curved Road
|
||||
@@ -852,9 +852,9 @@ Feature: Simple Turns
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,j | Siemens,Siemens,Siemens | depart,continue slight right,arrive |
|
||||
| a,g | Siemens,Erna,Erna | depart,new name slight left,arrive |
|
||||
| a,g | Siemens,Erna | depart,arrive |
|
||||
| g,j | Erna,Siemens,Siemens | depart,turn left,arrive |
|
||||
| g,a | Erna,Siemens,Siemens | depart,new name slight right,arrive |
|
||||
| g,a | Erna,Siemens | depart,arrive |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/52.51303/13.32170
|
||||
Scenario: Ernst Reuter Platz
|
||||
@@ -1188,12 +1188,12 @@ Feature: Simple Turns
|
||||
| j | traffic_signals |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | rose,trift,trift | depart,new name slight left,arrive |
|
||||
| a,k | rose,muhle,muhle | depart,turn slight right,arrive |
|
||||
| d,f | trift,rose,rose | depart,new name straight,arrive |
|
||||
| d,k | trift,muhle,muhle | depart,turn sharp left,arrive |
|
||||
| d,c | trift,trift,trift | depart,continue uturn,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,c | rose,trift | depart,arrive |
|
||||
| a,k | rose,muhle,muhle | depart,turn slight right,arrive |
|
||||
| d,f | trift,rose | depart,arrive |
|
||||
| d,k | trift,muhle,muhle | depart,turn sharp left,arrive |
|
||||
| d,c | trift,trift,trift | depart,continue uturn,arrive |
|
||||
|
||||
#http://www.openstreetmap.org/#map=19/52.50740/13.44824
|
||||
Scenario: Turning Loop at the end of the road
|
||||
@@ -1275,8 +1275,8 @@ Feature: Simple Turns
|
||||
| bcde | 6 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| a,e | ab,bcde,bcde |
|
||||
| waypoints | route |
|
||||
| a,e | ab,bcde |
|
||||
|
||||
|
||||
@3401
|
||||
@@ -1371,3 +1371,76 @@ Feature: Simple Turns
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| g,e | abcde,abcde |
|
||||
|
||||
# 4205
|
||||
# https://www.openstreetmap.org/node/36153635#map=19/51.97548/7.61795
|
||||
Scenario: merging onto a through street
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
`
|
||||
`
|
||||
`
|
||||
`
|
||||
d
|
||||
c
|
||||
a - - - - - - - b``
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
`
|
||||
`
|
||||
|
||||
`
|
||||
|
||||
|
||||
`
|
||||
|
||||
|
||||
`
|
||||
|
||||
|
||||
f
|
||||
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | name |
|
||||
| abc | yes | fww |
|
||||
| fcde | no | jahn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,f | fww,jahn,jahn | depart,turn right,arrive |
|
||||
| a,e | fww,jahn,jahn | depart,turn left,arrive |
|
||||
|
||||
@@ -3,7 +3,7 @@ Feature: Turn Lane Guidance
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 20 meters
|
||||
Given a grid size of 5 meters
|
||||
|
||||
@simple
|
||||
Scenario: Basic Turn Lane 3-way Turn with empty lanes
|
||||
@@ -134,7 +134,7 @@ Feature: Turn Lane Guidance
|
||||
| a | c | 180,180 180,180 | in,straight,straight | depart,new name straight,arrive | ,left;uturn:false straight;right:true, | a,b,c |
|
||||
| a | d | 180,180 180,180 | in,right,right | depart,turn right,arrive | ,left;uturn:false straight;right:true, | a,b,d |
|
||||
| a | e | 180,180 180,180 | in,left,left | depart,turn left,arrive | ,left;uturn:true straight;right:false, | a,b,e |
|
||||
| 1 | a | 90,2 270,2 | in,in,in | depart,turn uturn,arrive | ,left;uturn:true straight;right:false, | _,b,a |
|
||||
| 1 | a | 90,2 270,2 | in,in,in | depart,continue uturn,arrive | ,left;uturn:true straight;right:false, | _,b,a |
|
||||
|
||||
|
||||
#this next test requires decision on how to announce lanes for going straight if there is no turn
|
||||
@@ -602,6 +602,17 @@ Feature: Turn Lane Guidance
|
||||
a e
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
b d
|
||||
h c
|
||||
' -- g - - f
|
||||
@@ -609,8 +620,8 @@ Feature: Turn Lane Guidance
|
||||
|
||||
And the ways
|
||||
| nodes | name | turn:lanes:forward | oneway | highway | lanes |
|
||||
| abc | road | left\|left\|left\|through\|through | yes | primary | 5 |
|
||||
| cde | road | | yes | primary | 3 |
|
||||
| abc | road | left\|left\|left\|through\|through | yes | primary | 2 |
|
||||
| cde | road | | yes | primary | 2 |
|
||||
| hc | cross | | yes | secondary | |
|
||||
| cg | straight | | no | tertiary | |
|
||||
| cf | left | | yes | primary | |
|
||||
@@ -618,7 +629,7 @@ Feature: Turn Lane Guidance
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,f | road,left,left | depart,turn left,arrive | ,left:true left:true left:true straight:false straight:false, |
|
||||
| a,e | road,road,road | depart,turn uturn,arrive | ,left:true left:false left:false straight:false straight:false, |
|
||||
| a,e | road,road,road | depart,continue uturn,arrive | ,left:true left:false left:false straight:false straight:false, |
|
||||
| a,g | road,straight,straight | depart,new name straight,arrive | ,left:false left:false left:false straight:true straight:true, |
|
||||
|
||||
@todo @roundabout
|
||||
@@ -808,6 +819,10 @@ Feature: Turn Lane Guidance
|
||||
"""
|
||||
a b e
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
d c f
|
||||
"""
|
||||
|
||||
@@ -858,9 +873,9 @@ Feature: Turn Lane Guidance
|
||||
| ab | on | motorway_link | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,j | on,xbcj | depart,arrive | , |
|
||||
| a,i | on,off,off | depart,turn slight right,arrive | ,none:false slight right:true, |
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,j | on,xbcj | depart,arrive | , |
|
||||
| a,i | on,off,off | depart,turn right,arrive | ,none:false slight right:true, |
|
||||
|
||||
#http://www.openstreetmap.org/#map=17/52.47414/13.35712
|
||||
@todo @ramp @2645
|
||||
@@ -937,9 +952,9 @@ Feature: Turn Lane Guidance
|
||||
| dce | cross | primary | yes | | 1 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, |
|
||||
| a,e | road,cross,cross | depart,turn left,arrive | ,left:true right:false, |
|
||||
| waypoints | route | turns | lanes | locations |
|
||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, | a,b,g |
|
||||
| a,e | road,cross,cross | depart,end of road left,arrive | ,left:true right:false, | a,c,e |
|
||||
|
||||
Scenario: Partitioned turn, Slight Curve
|
||||
Given the node map
|
||||
@@ -960,9 +975,9 @@ Feature: Turn Lane Guidance
|
||||
| dce | cross | primary | yes | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, |
|
||||
| a,e | road,cross,cross | depart,turn left,arrive | ,left:true right:false, |
|
||||
| waypoints | route | turns | lanes | locations |
|
||||
| a,g | road,cross,cross | depart,turn right,arrive | ,left:false right:true, | a,b,g |
|
||||
| a,e | road,cross,cross | depart,end of road left,arrive | ,left:true right:false, | a,c,e |
|
||||
|
||||
Scenario: Lane Parsing Issue #2694
|
||||
Given the node map
|
||||
@@ -1158,3 +1173,74 @@ Feature: Turn Lane Guidance
|
||||
When I route I should get
|
||||
| waypoints | bearings | route | turns |
|
||||
| 1,a | 90,2 180,180 | | |
|
||||
|
||||
@3379
|
||||
Scenario: Don't Turn through potential through lanes
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
|
|
||||
a - - - - b - - - - - c
|
||||
|
|
||||
e
|
||||
"""
|
||||
And the ways
|
||||
| nodes | name | oneway | turn:lanes:forward |
|
||||
| ab | road | yes | left\|none\|none |
|
||||
| bc | road | yes | |
|
||||
| ebd | cross | no | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,e | road,cross,cross | depart,turn right,arrive | ,left:false none:false none:true, |
|
||||
| a,c | road,road | depart,arrive | , |
|
||||
|
||||
@3379
|
||||
Scenario: Don't Turn through potential through lanes
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
|
|
||||
a - - - - b - - - - - c
|
||||
|
|
||||
e
|
||||
"""
|
||||
And the ways
|
||||
| nodes | name | oneway | turn:lanes:forward |
|
||||
| ab | road | yes | none\|none\|right |
|
||||
| bc | road | yes | |
|
||||
| ebd | cross | no | |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes |
|
||||
| a,d | road,cross,cross | depart,turn left,arrive | ,none:true none:false right:false, |
|
||||
| a,c | road,road | depart,arrive | , |
|
||||
|
||||
@4189
|
||||
Scenario: U-turn after a traffic light
|
||||
Given the node map
|
||||
"""
|
||||
j k
|
||||
: :
|
||||
f---g-h-i
|
||||
: :
|
||||
a-b-c-d-e
|
||||
: :
|
||||
l m
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | highway |
|
||||
| b | traffic_signals |
|
||||
|
||||
And the ways
|
||||
| nodes | name | lanes | turn:lanes | oneway |
|
||||
| ab | road1 | 3 | left\|through\|through;right | yes |
|
||||
| bcde | road1 | 2 | | yes |
|
||||
| ihgf | road1 | 2 | | yes |
|
||||
| jgcl | road2 | 2 | | yes |
|
||||
| mdhk | road2 | 2 | | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | lanes | locations |
|
||||
| a,f | road1,road1,road1 | depart,continue uturn,arrive | ,left:true straight:false straight;right:false, | a,d,f |
|
||||
|
||||
+133
-44
@@ -23,15 +23,15 @@ Feature: Simple Turns
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,turn left,arrive |
|
||||
| a,e | ab,eb,eb | depart,new name straight,arrive |
|
||||
| a,e | ab,eb | depart,arrive |
|
||||
| a,d | ab,db,db | depart,turn right,arrive |
|
||||
| c,a | cb,ab,ab | depart,turn right,arrive |
|
||||
| c,d | cb,db,db | depart,new name straight,arrive |
|
||||
| c,d | cb,db | depart,arrive |
|
||||
| c,e | cb,eb,eb | depart,turn left,arrive |
|
||||
| d,a | db,ab,ab | depart,turn left,arrive |
|
||||
| d,c | db,cb,cb | depart,new name straight,arrive |
|
||||
| d,c | db,cb | depart,arrive |
|
||||
| d,e | db,eb,eb | depart,turn right,arrive |
|
||||
| e,a | eb,ab,ab | depart,new name straight,arrive |
|
||||
| e,a | eb,ab | depart,arrive |
|
||||
| e,c | eb,cb,cb | depart,turn right,arrive |
|
||||
| e,d | eb,db,db | depart,turn left,arrive |
|
||||
|
||||
@@ -53,15 +53,15 @@ Feature: Simple Turns
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,turn left,arrive |
|
||||
| a,e | ab,eb,eb | depart,new name straight,arrive |
|
||||
| a,e | ab,eb | depart,arrive |
|
||||
| a,d | ab,db,db | depart,turn right,arrive |
|
||||
| c,a | cb,ab,ab | depart,turn right,arrive |
|
||||
| c,d | cb,db,db | depart,new name straight,arrive |
|
||||
| c,d | cb,db | depart,arrive |
|
||||
| c,e | cb,eb,eb | depart,turn left,arrive |
|
||||
| d,a | db,ab,ab | depart,turn left,arrive |
|
||||
| d,c | db,cb,cb | depart,new name straight,arrive |
|
||||
| d,c | db,cb | depart,arrive |
|
||||
| d,e | db,eb,eb | depart,turn right,arrive |
|
||||
| e,a | eb,ab,ab | depart,new name straight,arrive |
|
||||
| e,a | eb,ab | depart,arrive |
|
||||
| e,c | eb,cb,cb | depart,turn right,arrive |
|
||||
| e,d | eb,db,db | depart,turn left,arrive |
|
||||
|
||||
@@ -86,10 +86,10 @@ Feature: Simple Turns
|
||||
| a,e | abe,abe | depart,arrive |
|
||||
| a,d | abe,db,db | depart,turn right,arrive |
|
||||
| c,a | cb,abe,abe | depart,turn right,arrive |
|
||||
| c,d | cb,db,db | depart,new name straight,arrive |
|
||||
| c,d | cb,db | depart,arrive |
|
||||
| c,e | cb,abe,abe | depart,turn left,arrive |
|
||||
| d,a | db,abe,abe | depart,turn left,arrive |
|
||||
| d,c | db,cb,cb | depart,new name straight,arrive |
|
||||
| d,c | db,cb | depart,arrive |
|
||||
| d,e | db,abe,abe | depart,turn right,arrive |
|
||||
| e,a | abe,abe | depart,arrive |
|
||||
| e,c | abe,cb,cb | depart,turn right,arrive |
|
||||
@@ -139,9 +139,9 @@ Feature: Simple Turns
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | ab,cb,cb | depart,turn left,arrive |
|
||||
| a,d | ab,db,db | depart,new name straight,arrive |
|
||||
| a,d | ab,db | depart,arrive |
|
||||
| d,c | db,cb,cb | depart,turn right,arrive |
|
||||
| d,a | db,ab,ab | depart,new name straight,arrive |
|
||||
| d,a | db,ab | depart,arrive |
|
||||
|
||||
Scenario: Three Way Intersection - Meeting Oneways
|
||||
Given the node map
|
||||
@@ -208,7 +208,7 @@ Feature: Simple Turns
|
||||
| b,c | ab,ac,ac | depart,turn sharp left,arrive |
|
||||
| b,d | ab,ad,ad | depart,turn left,arrive |
|
||||
| b,e | ab,ae,ae | depart,turn slight left,arrive |
|
||||
| b,f | ab,af,af | depart,new name straight,arrive |
|
||||
| b,f | ab,af | depart,arrive |
|
||||
| b,g | ab,ag,ag | depart,turn slight right,arrive |
|
||||
| b,h | ab,ah,ah | depart,turn right,arrive |
|
||||
| b,i | ab,ai,ai | depart,turn sharp right,arrive |
|
||||
@@ -241,7 +241,7 @@ Feature: Simple Turns
|
||||
| b,c | ab,ac,ac | depart,turn sharp left,arrive |
|
||||
| b,d | ab,ad,ad | depart,turn left,arrive |
|
||||
| b,e | ab,ae,ae | depart,turn slight left,arrive |
|
||||
| b,f | ab,af,af | depart,new name straight,arrive |
|
||||
| b,f | ab,af | depart,arrive |
|
||||
| b,g | ab,ag,ag | depart,turn slight right,arrive |
|
||||
| b,h | ab,ah,ah | depart,turn right,arrive |
|
||||
| b,i | ab,ai,ai | depart,turn sharp right,arrive |
|
||||
@@ -743,10 +743,10 @@ Feature: Simple Turns
|
||||
| be | primary | no |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| d,e | db,be,be | depart,new name slight right,arrive |
|
||||
| e,d | be,db,db | depart,new name slight left,arrive |
|
||||
| waypoints | route | turns |
|
||||
| a,c | abc,abc | depart,arrive |
|
||||
| d,e | db,be | depart,arrive |
|
||||
| e,d | be,db | depart,arrive |
|
||||
|
||||
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 1
|
||||
Given the node map
|
||||
@@ -904,19 +904,19 @@ Feature: Simple Turns
|
||||
| bd | residential | in |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,c | depart,arrive | road,road |
|
||||
| d,a | depart,turn left,arrive | in,road,road |
|
||||
| d,c | depart,new name straight,arrive | in,road,road |
|
||||
| waypoints | turns | route |
|
||||
| a,c | depart,arrive | road,road |
|
||||
| d,a | depart,turn left,arrive | in,road,road |
|
||||
| d,c | depart,arrive | in,road |
|
||||
|
||||
Scenario: Channing Street
|
||||
Given the node map
|
||||
"""
|
||||
g f
|
||||
|
||||
d c b a
|
||||
|
||||
|
||||
| |
|
||||
d---c-b-a
|
||||
| |
|
||||
| |
|
||||
h e
|
||||
"""
|
||||
|
||||
@@ -1030,9 +1030,9 @@ Feature: Simple Turns
|
||||
| ec | Molkenmarkt | secondary | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,d | depart,new name straight,arrive | Molkenmarkt,Stralauer Str,Stralauer Str |
|
||||
| e,d | depart,new name slight left,arrive | Molkenmarkt,Stralauer Str,Stralauer Str |
|
||||
| waypoints | turns | route |
|
||||
| a,d | depart,arrive | Molkenmarkt,Stralauer Str |
|
||||
| e,d | depart,arrive | Molkenmarkt,Stralauer Str |
|
||||
|
||||
# http://www.openstreetmap.org/#map=18/39.28158/-76.62291
|
||||
@3002
|
||||
@@ -1149,19 +1149,19 @@ Feature: Simple Turns
|
||||
| a,c | in,through,through | depart,turn left,arrive |
|
||||
|
||||
# http://www.openstreetmap.org/#map=19/52.51556/13.41832
|
||||
Scenario: No Slight Right over Jannowitzbruecke
|
||||
Scenario: No Slight Right at Stralauer Strasse
|
||||
Given the node map
|
||||
"""
|
||||
l m
|
||||
| |
|
||||
f._ | |
|
||||
' g---h.
|
||||
| | '.
|
||||
| | i
|
||||
| | '-i
|
||||
| |
|
||||
a_ | |
|
||||
''.b---c
|
||||
| |'d._
|
||||
| | 'e
|
||||
| |' d._
|
||||
| | 'e
|
||||
j k
|
||||
"""
|
||||
|
||||
@@ -1175,20 +1175,20 @@ Feature: Simple Turns
|
||||
| kchm | Alexanderstr | primary | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,e | depart,new name straight,arrive | Stralauer Str,Holzmarktstr,Holzmarktstr |
|
||||
| waypoints | turns | route |
|
||||
| a,e | depart,arrive | Stralauer Str,Holzmarktstr |
|
||||
|
||||
Scenario: No Slight Right over Jannowitzbruecke -- less extreme
|
||||
Scenario: No Slight Right at Stralauer Strasse -- less extreme
|
||||
Given the node map
|
||||
"""
|
||||
l m
|
||||
| |
|
||||
f_ | |
|
||||
' 'g h_
|
||||
' 'g---h_
|
||||
| | '\_
|
||||
| | i
|
||||
a_ | |
|
||||
'_ b c_
|
||||
'_ b___c_
|
||||
| | \_
|
||||
| | e
|
||||
j k
|
||||
@@ -1204,20 +1204,20 @@ Feature: Simple Turns
|
||||
| kchm | Alexanderstr | primary | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | turns | route |
|
||||
| a,e | depart,new name straight,arrive | Stralauer Str,Holzmarktstr,Holzmarktstr |
|
||||
| waypoints | turns | route |
|
||||
| a,e | depart,arrive | Stralauer Str,Holzmarktstr |
|
||||
|
||||
Scenario: No Slight Right over Jannowitzbruecke
|
||||
Scenario: No Slight Right at Stralauer Strasse
|
||||
Given the node map
|
||||
"""
|
||||
l m
|
||||
| |
|
||||
| |
|
||||
_ _ g h_
|
||||
_ _ g---h_
|
||||
f' | | '_
|
||||
| | i
|
||||
| |
|
||||
_ _b c__
|
||||
_ _b---c__
|
||||
a' | | 'd
|
||||
| |
|
||||
j k
|
||||
@@ -1260,3 +1260,92 @@ Feature: Simple Turns
|
||||
| waypoints | route | turns |
|
||||
| a,d | Goethe,Fried,Fried | depart,continue left,arrive |
|
||||
| a,g | Goethe,Fried,Fried | depart,turn right,arrive |
|
||||
|
||||
# Conflicting roads (https://www.openstreetmap.org/export#map=19/37.57805/-77.46049)
|
||||
Scenario: Turning at forklike structure
|
||||
Given the node map
|
||||
"""
|
||||
c d
|
||||
- - - b - - - a
|
||||
-
|
||||
e
|
||||
"""
|
||||
And the ways
|
||||
| nodes | name | oneway | highway |
|
||||
| abc | foo | no | residential |
|
||||
| bd | bar | yes | residential |
|
||||
| eb | some | yes | tertiary_link |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | foo,bar,bar | depart,turn slight right,arrive |
|
||||
|
||||
Scenario: UTurn onto ramp
|
||||
Given the node map
|
||||
"""
|
||||
a - - - b - c
|
||||
.|
|
||||
_________________ de
|
||||
h-g-----------------------f
|
||||
"""
|
||||
And the ways
|
||||
| nodes | name | ref | oneway | highway |
|
||||
| abc | Road | | yes | primary |
|
||||
| ce | other | | yes | primary |
|
||||
| cdg | | | yes | motorway_link |
|
||||
| fgh | | C 42 | yes | motorway |
|
||||
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | ref | turns |
|
||||
| a,h | Road,,, | ,,C 42,C 42 | depart,on ramp right,merge slight left,arrive |
|
||||
|
||||
Scenario: UTurn onto ramp (same ref)
|
||||
Given the node map
|
||||
"""
|
||||
a - - - b - c
|
||||
.|
|
||||
_________________ de
|
||||
h-g-----------------------f
|
||||
"""
|
||||
And the ways
|
||||
| nodes | name | ref | oneway | highway |
|
||||
| abc | Road | C 42 | yes | primary |
|
||||
| ce | other | | yes | primary |
|
||||
| cdg | | | yes | motorway_link |
|
||||
| fgh | | C 42 | yes | motorway |
|
||||
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | ref | turns |
|
||||
| a,h | Road,,, | C 42,,C 42,C 42 | depart,on ramp right,merge slight left,arrive |
|
||||
|
||||
Scenario: End of road, T-intersection, no obvious turn, only one road allowed
|
||||
Given the node map
|
||||
"""
|
||||
d
|
||||
.
|
||||
a . b . . c
|
||||
' .
|
||||
'e
|
||||
.
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway | ref |
|
||||
| ab | primary | | B 191 |
|
||||
| bc | primary | | B 191 |
|
||||
| be | primary_link | yes | |
|
||||
| dc | primary | | B 4;B 191 |
|
||||
| ce | primary | | B 4 |
|
||||
| ef | primary | | B 4 |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | bc | ce | c | no_right_turn |
|
||||
| restriction | be | ef | e | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,d | ab,dc,dc | depart,turn left,arrive |
|
||||
|
||||
@@ -77,7 +77,8 @@ class OSRMDirectLoader extends OSRMBaseLoader {
|
||||
osrmUp (callback) {
|
||||
if (this.osrmIsRunning()) return callback(new Error("osrm-routed already running!"));
|
||||
|
||||
this.child = this.scope.runBin('osrm-routed', util.format("%s -p %d", this.inputFile, this.scope.OSRM_PORT), this.scope.environment, (err) => {
|
||||
const command_arguments = util.format('%s -p %d -a %s', this.inputFile, this.scope.OSRM_PORT, this.scope.ROUTING_ALGORITHM);
|
||||
this.child = this.scope.runBin('osrm-routed', command_arguments, this.scope.environment, (err) => {
|
||||
if (err && err.signal !== 'SIGINT') {
|
||||
this.child = null;
|
||||
throw new Error(util.format('osrm-routed %s: %s', errorReason(err), err.cmd));
|
||||
@@ -115,7 +116,8 @@ class OSRMDatastoreLoader extends OSRMBaseLoader {
|
||||
osrmUp (callback) {
|
||||
if (this.osrmIsRunning()) return callback();
|
||||
|
||||
this.child = this.scope.runBin('osrm-routed', util.format('--shared-memory=1 -p %d', this.scope.OSRM_PORT), this.scope.environment, (err) => {
|
||||
const command_arguments = util.format('--shared-memory=1 -p %d -a %s', this.scope.OSRM_PORT, this.scope.ROUTING_ALGORITHM);
|
||||
this.child = this.scope.runBin('osrm-routed', command_arguments, this.scope.environment, (err) => {
|
||||
if (err && err.signal !== 'SIGINT') {
|
||||
this.child = null;
|
||||
throw new Error(util.format('osrm-routed %s: %s', errorReason(err), err.cmd));
|
||||
|
||||
@@ -36,7 +36,7 @@ module.exports = function (expected, actual) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (!tableError) return null;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ module.exports = function (expected, actual) {
|
||||
// header row
|
||||
cells = []
|
||||
headers.forEach( (key) => {
|
||||
var content = key.padRight(' ', widths[key] );
|
||||
var content = String(key).padRight(' ', widths[key] );
|
||||
if (columnStatus[key] == false )
|
||||
content = okStr + content;
|
||||
cells.push( chalk.white( content ) );
|
||||
@@ -83,7 +83,7 @@ module.exports = function (expected, actual) {
|
||||
// expected row
|
||||
cells = []
|
||||
headers.forEach( (key) => {
|
||||
var content = row[key].padRight(' ', widths[key] );
|
||||
var content = String(row[key]).padRight(' ', widths[key] );
|
||||
if (statusRows[i][key] == false)
|
||||
cells.push( chalk.yellow( wantStr + content) );
|
||||
else {
|
||||
@@ -105,7 +105,7 @@ module.exports = function (expected, actual) {
|
||||
if (rowError) {
|
||||
cells = []
|
||||
headers.forEach( (key) => {
|
||||
var content = actual[i][key].padRight(' ', widths[key] );
|
||||
var content = String(actual[i][key]).padRight(' ', widths[key] );
|
||||
if (statusRows[i][key] == false)
|
||||
cells.push( chalk.red( gotStr + content) );
|
||||
else {
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
@prepare @options @files
|
||||
Feature: osrm-contract command line options: datasources
|
||||
# expansions:
|
||||
# {processed_file} => path to .osrm file
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
Given the extract extra arguments "--generate-edge-lookup"
|
||||
And the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
And the speed file
|
||||
"""
|
||||
1,2,50
|
||||
2,1,50
|
||||
2,3,50
|
||||
3,2,50
|
||||
1,4,50
|
||||
4,1,50
|
||||
"""
|
||||
And the data has been extracted
|
||||
|
||||
Scenario: osrm-contract - Passing base file
|
||||
When I run "osrm-contract --segment-speed-file {speeds_file} {processed_file}"
|
||||
Then datasource names should contain "lua profile,27_osrmcontract_passing_base_file_speeds"
|
||||
And it should exit successfully
|
||||
@@ -20,11 +20,31 @@ Feature: osrm-contract command line option: edge-weight-updates-over-factor
|
||||
And the data has been saved to disk
|
||||
|
||||
Scenario: Logging weight with updates over factor of 2, long segment
|
||||
When I run "osrm-extract --profile {profile_file} {osm_file} --generate-edge-lookup"
|
||||
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
||||
And the data has been partitioned
|
||||
When I run "osrm-contract --edge-weight-updates-over-factor 2 --segment-speed-file {speeds_file} {processed_file}"
|
||||
And stderr should contain "weight updates"
|
||||
And stderr should contain "New speed: 100 kph"
|
||||
Then stderr should not contain "Speed values were used to update 2 segment(s)"
|
||||
And stderr should contain "Segment: 1,2"
|
||||
And stderr should contain "Segment: 1,3"
|
||||
And I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 100 km/h |
|
||||
| a | c | ac,ac | 100 km/h |
|
||||
|
||||
|
||||
Scenario: Logging using weigts as durations for non-duration profile
|
||||
Given the profile file "testbot" extended with
|
||||
"""
|
||||
properties.weight_name = 'steps'
|
||||
function way_function(way, result)
|
||||
result.forward_mode = mode.driving
|
||||
result.backward_mode = mode.driving
|
||||
result.weight = 1
|
||||
result.duration = 1
|
||||
end
|
||||
"""
|
||||
And the data has been saved to disk
|
||||
|
||||
When I run "osrm-extract --profile {profile_file} {osm_file}"
|
||||
When I run "osrm-contract --edge-weight-updates-over-factor 2 --segment-speed-file {speeds_file} {processed_file}"
|
||||
Then stderr should contain "Speed values were used to update 2 segments for 'steps' profile"
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
@prepare @options @invalid
|
||||
Feature: osrm-contract command line options: invalid options
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
And the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
And the data has been extracted
|
||||
|
||||
Scenario: osrm-contract - Non-existing option
|
||||
When I try to run "osrm-contract --fly-me-to-the-moon"
|
||||
Then stdout should be empty
|
||||
And stderr should contain "option"
|
||||
And stderr should contain "fly-me-to-the-moon"
|
||||
And it should exit with an error
|
||||
|
||||
# This tests the error messages when you try to use --segment-speed-file,
|
||||
# but osrm-extract has not been run with --generate-edge-lookup
|
||||
Scenario: osrm-contract - Someone forgot --generate-edge-lookup on osrm-extract
|
||||
When I try to run "osrm-contract --segment-speed-file /dev/null {processed_file}"
|
||||
Then stderr should contain "Error while trying to mmap"
|
||||
Then stderr should contain ".osrm.turn_penalties_index"
|
||||
And it should exit with an error
|
||||
@@ -1,4 +1,4 @@
|
||||
@prepare @options @version
|
||||
@contract @options @version
|
||||
Feature: osrm-contract command line options: version
|
||||
# the regex will match these two formats:
|
||||
# v0.3.7.0 # this is the normal format when you build from a git clone
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
@customize @options @files
|
||||
Feature: osrm-contract command line options: files
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
And the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
And the data has been extracted
|
||||
And the data has been partitioned
|
||||
|
||||
Scenario: osrm-customize - Passing base file
|
||||
When I run "osrm-customize {processed_file}"
|
||||
Then it should exit successfully
|
||||
|
||||
Scenario: osrm-customize - Missing input file
|
||||
When I try to run "osrm-customize over-the-rainbow.osrm"
|
||||
And stderr should contain "over-the-rainbow.osrm"
|
||||
And stderr should contain "not found"
|
||||
And it should exit with an error
|
||||
@@ -0,0 +1,35 @@
|
||||
@contract @options @help
|
||||
Feature: osrm-customize command line options: help
|
||||
|
||||
Scenario: osrm-customize - Help should be shown when no options are passed
|
||||
When I try to run "osrm-customize"
|
||||
Then stderr should be empty
|
||||
And stdout should contain /osrm-customize(.exe)? <input.osrm> \[options\]:/
|
||||
And stdout should contain "Options:"
|
||||
And stdout should contain "--version"
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--threads"
|
||||
And it should exit with an error
|
||||
|
||||
Scenario: osrm-customize - Help, short
|
||||
When I run "osrm-customize -h"
|
||||
Then stderr should be empty
|
||||
And stdout should contain /osrm-customize(.exe)? <input.osrm> \[options\]:/
|
||||
And stdout should contain "Options:"
|
||||
And stdout should contain "--version"
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--threads"
|
||||
And it should exit successfully
|
||||
|
||||
Scenario: osrm-customize - Help, long
|
||||
When I run "osrm-customize --help"
|
||||
Then stderr should be empty
|
||||
And stdout should contain /osrm-customize(.exe)? <input.osrm> \[options\]:/
|
||||
And stdout should contain "Options:"
|
||||
And stdout should contain "--version"
|
||||
And stdout should contain "--help"
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--threads"
|
||||
And it should exit successfully
|
||||
@@ -0,0 +1,20 @@
|
||||
@prepare @options @invalid
|
||||
Feature: osrm-customize command line options: invalid options
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
And the node map
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
And the data has been extracted
|
||||
|
||||
Scenario: osrm-customize - Non-existing option
|
||||
When I try to run "osrm-customize --fly-me-to-the-moon"
|
||||
Then stdout should be empty
|
||||
And stderr should contain "option"
|
||||
And stderr should contain "fly-me-to-the-moon"
|
||||
And it should exit with an error
|
||||
@@ -0,0 +1,19 @@
|
||||
@prepare @options @version
|
||||
Feature: osrm-customize command line options: version
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
Scenario: osrm-customize - Version, short
|
||||
When I run "osrm-customize --v"
|
||||
Then stderr should be empty
|
||||
And stdout should contain 1 line
|
||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||
And it should exit successfully
|
||||
|
||||
Scenario: osrm-customize - Version, long
|
||||
When I run "osrm-customize --version"
|
||||
Then stderr should be empty
|
||||
And stdout should contain 1 line
|
||||
And stdout should contain /(v\d{1,2}\.\d{1,2}\.\d{1,2}|\w*-\d+-\w+)/
|
||||
And it should exit successfully
|
||||
@@ -14,7 +14,6 @@ Feature: osrm-extract command line options: help
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--profile"
|
||||
And stdout should contain "--threads"
|
||||
And stdout should contain "--generate-edge-lookup"
|
||||
And stdout should contain "--small-component-size"
|
||||
And it should exit successfully
|
||||
|
||||
@@ -28,7 +27,6 @@ Feature: osrm-extract command line options: help
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--profile"
|
||||
And stdout should contain "--threads"
|
||||
And stdout should contain "--generate-edge-lookup"
|
||||
And stdout should contain "--small-component-size"
|
||||
And it should exit successfully
|
||||
|
||||
@@ -42,6 +40,5 @@ Feature: osrm-extract command line options: help
|
||||
And stdout should contain "Configuration:"
|
||||
And stdout should contain "--profile"
|
||||
And stdout should contain "--threads"
|
||||
And stdout should contain "--generate-edge-lookup"
|
||||
And stdout should contain "--small-component-size"
|
||||
And it should exit successfully
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user