Compare commits
1872 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| d28713b845 | |||
| 2e6428e917 | |||
| 1f3a8d4538 | |||
| 140f1ad923 | |||
| 1c25070572 | |||
| 24fe881d03 | |||
| 25ab51f4f0 | |||
| 46f96af360 | |||
| ce685da92c | |||
| 2218658969 | |||
| 3e2db47cc8 | |||
| 28a8154cee | |||
| 005124fe1c | |||
| 1e4c8eeeb6 | |||
| 72455a2733 | |||
| 112cf55aae | |||
| aa3f208032 | |||
| 919386bdaf | |||
| ae835cc04f | |||
| ef4d32a492 | |||
| 2a5ebf84bc | |||
| 768dc8d817 | |||
| 0c04c6cafb | |||
| bf690df97a | |||
| 880b982eeb | |||
| 53011755a2 | |||
| ddb60c34e6 | |||
| 543f0e5e44 | |||
| 1e9e420d91 | |||
| c885d03830 | |||
| ab91a05680 | |||
| 84261fd214 | |||
| 734df348cb | |||
| 41064e2d7b | |||
| 8d7aae8687 | |||
| 7256b6d0d4 | |||
| 3106b5dd9e | |||
| f1427a834d | |||
| 04954de9c6 | |||
| a6cd0863bc | |||
| 9f28873cb1 | |||
| 10c5d76909 | |||
| d81ef3f4db | |||
| 3abab16bf3 | |||
| 6e1c4bfecd | |||
| cedeb15ade | |||
| f2663acfc6 | |||
| c48fc58eb2 | |||
| 5f1c7efd41 | |||
| 9e5d45d86a | |||
| 5fd6355829 | |||
| 6da4d918d0 | |||
| 1628ebb871 | |||
| eaed5c7a8e | |||
| 9d2628b74f | |||
| 11ee632cfe | |||
| 97c0a74c04 | |||
| b3ef27d104 | |||
| c22ce3ae1f | |||
| 36c944ef53 | |||
| 5b24758742 | |||
| a572719484 | |||
| ad594cb2e4 | |||
| 6b143c5e1d | |||
| 25baf51a2c | |||
| c059d15cb9 | |||
| 279f8aabfb | |||
| e463733138 | |||
| 7deff5837c | |||
| 46ac9d05d9 | |||
| c7640903c3 | |||
| 445225bf6d | |||
| 47b1a56b12 | |||
| b5e289adc3 | |||
| e0a1a43449 | |||
| 337ecefa45 | |||
| 7961fa8863 | |||
| 88eb9e5499 | |||
| df449d3b5c | |||
| 6f27aae022 | |||
| d8c54fb815 | |||
| 5c93609142 | |||
| c277b95f03 | |||
| b1f1c26703 | |||
| a5d0707dd0 | |||
| d129b0ef24 | |||
| f2c3b9859e | |||
| bb1f4a025a | |||
| 8c36012653 | |||
| 66cb75f4a3 | |||
| 0c6dee4bef | |||
| 49d3467ec7 | |||
| a48cf58468 | |||
| fbc7189cf8 | |||
| e8167b2e4e | |||
| c03aa8a273 | |||
| a40abacfca | |||
| b8beac2d00 | |||
| 75e0b5a5c4 | |||
| c03b230e84 | |||
| 6b06c5bd32 | |||
| 226ee62981 | |||
| fce3bb180c | |||
| 1ae69fe40d | |||
| e4dc2aa45c | |||
| d0f1347ff1 | |||
| 70e899378d | |||
| dbd70d4884 | |||
| 71044e88f3 | |||
| b8f631f6f6 | |||
| 3837f9d015 | |||
| 763ad0d047 | |||
| b6f9ec2a33 | |||
| 5d3a348b76 | |||
| 104e23abf3 | |||
| a7bb26f2d6 | |||
| 710ba20acc | |||
| fce8d72895 | |||
| 774b8688ca | |||
| fe2beb6f68 | |||
| 71e7d6d6b8 | |||
| 29f736f1c8 | |||
| bb4f13a47c | |||
| bb0b03bbce | |||
| 59ad7dddb2 | |||
| f12fdeb23e | |||
| f896aaf881 | |||
| a2a2cf84d1 | |||
| 4e897aad50 | |||
| 5e8bdbfa0c | |||
| fd57c5b48b | |||
| 1d4d3b80b5 | |||
| f82740ed93 | |||
| c1f833c80f | |||
| 813e16b9b4 | |||
| 06ef3053de | |||
| 9fa7e6c74f | |||
| a7d63283ab | |||
| 78a443bfb2 | |||
| 84b8d3cfb9 | |||
| b3483f95a7 | |||
| 32f63e5e0c | |||
| 185e9dc7f3 | |||
| 6794f52cb2 | |||
| 06e6b9ea6f | |||
| 93d89ad686 | |||
| 7c8176b077 | |||
| 7ef95e9918 | |||
| f313cb9913 | |||
| 15c8fd326f | |||
| f7e8581a1b | |||
| c01ea2ea3e | |||
| 1153b78c06 | |||
| b5d5f309a3 | |||
| 5100f2cc7b | |||
| f6fef5c166 | |||
| 559c88b36d | |||
| 7dea7476f1 | |||
| dc81f581a0 | |||
| 300283d572 | |||
| aad2124faa | |||
| aced058c4a | |||
| 24ab71a346 | |||
| 2640a319c1 | |||
| e6ff17ab2a | |||
| f7ad2e1e26 | |||
| 2ed6b181c8 | |||
| f48bbb78de | |||
| bd2a5ebe10 | |||
| f8499957fa | |||
| 5db134bbba | |||
| 8645d8c7fc | |||
| b8e13d9b1b | |||
| 421caa1856 | |||
| ed9d10e96c | |||
| 0f3a463854 | |||
| b9b52cb857 | |||
| 9af67c5a9f | |||
| 8ffe915395 | |||
| b376c97db8 | |||
| 7b11cd3a11 | |||
| 76de3b6ace | |||
| bc081b7132 | |||
| 3cbac0f012 | |||
| f40b34af9d | |||
| cc14fb8bff | |||
| c5e3fa916f | |||
| dff7fe214b | |||
| 3b2ca720a8 | |||
| df4231341f | |||
| 0a2f934c87 | |||
| 3721f8c887 | |||
| 1ba5ff44cc | |||
| 5ecd2e4c67 | |||
| b1f6797aab | |||
| f04d146ca3 | |||
| 8c50a42ec4 | |||
| c4b3cdfd80 | |||
| 37051e1583 | |||
| d3ef993d5f | |||
| 9832825abd | |||
| d584bcad11 | |||
| e48ca65af4 | |||
| f429e08851 | |||
| de062d4ca3 | |||
| d83ab9d905 | |||
| 4618b502ac | |||
| 94854b5c90 | |||
| f8dd965435 | |||
| 6e29f9889b | |||
| 48d4e91d98 | |||
| 708ac04562 | |||
| 38b2ad298d | |||
| a51ef67db8 | |||
| 67ce19cb14 | |||
| 1b51163b1d | |||
| 84b618ed1a | |||
| dc8e6bd8d9 | |||
| 68e38880df | |||
| d5904d5756 | |||
| 0f59b78c02 | |||
| 6e7fe5feb0 | |||
| 3dfbf42e61 | |||
| f88f51fd98 | |||
| 98659fb0a0 | |||
| 8a1afe456f | |||
| f1384f5e44 | |||
| 1cd5394a16 | |||
| 8c7f744b1a | |||
| 896445a337 | |||
| 8c21e1267e | |||
| ad3fd46da5 | |||
| 62f0e11bfa | |||
| 03d653c0bb | |||
| cbfb055f81 | |||
| 2288704bb5 | |||
| 97dcf4eef9 | |||
| 17e15033e1 | |||
| 875f482203 | |||
| df3c39cef5 | |||
| a28a20a1ba | |||
| 17a18b5c7c | |||
| 423c083038 | |||
| 468d8c0031 | |||
| 6f4c6e84ae | |||
| 4b1aae40af | |||
| 0e6863aec1 | |||
| 949d505783 | |||
| d11927046f | |||
| 9461c83511 | |||
| 532cbfce13 | |||
| 0fbd18b0dd | |||
| 3f07a830e6 | |||
| 24b01fae00 | |||
| 0817cd6dfd | |||
| 9d8b92f418 | |||
| 928a6f0c7d | |||
| 29b3caf529 | |||
| 20c8ac0272 | |||
| c99c8bccbc | |||
| 735191255d | |||
| da6ca640a7 | |||
| f6f7a9290f | |||
| 9687a9325c | |||
| 43566bfd14 | |||
| 110e6c3689 | |||
| 561b7cc58e | |||
| 5775679f64 | |||
| 560d8ffec0 | |||
| 2544c3f20e | |||
| 5a311012af | |||
| ef087f963d | |||
| a1127c3e09 | |||
| 01a57ff1d8 | |||
| 37824e2954 | |||
| 4489c8dfc2 | |||
| ee63e39ff5 | |||
| ce5bcc797b | |||
| fe5cc55b0e | |||
| 12d58ace10 | |||
| 4636aaabfe | |||
| 186cc8340a | |||
| e343f71541 | |||
| 0df0d31d83 | |||
| aaf42a1caf | |||
| d02dd67e95 | |||
| a49bd70985 | |||
| b2c27fbd25 | |||
| 9fe0e91d92 | |||
| 08b7270f5c | |||
| fc52dd85fe | |||
| 6d961d4a15 | |||
| 0bd08224bf | |||
| 2a383efbf6 | |||
| b84d70d305 | |||
| 3bade8625f | |||
| 844300b95a | |||
| dd811539a3 | |||
| 79c2ae46d8 | |||
| d023e7c581 | |||
| 4ccb08983f | |||
| 8c941d1344 | |||
| 841c032a0d | |||
| a764fd1f29 | |||
| 3687864cc1 | |||
| 4b5466629f | |||
| f19bf70b55 | |||
| 24fa94af59 | |||
| 95a584a30d | |||
| 6ba36a2bc7 | |||
| 039989a339 | |||
| a7559077a0 | |||
| bbe80192aa | |||
| 9b16b757a4 | |||
| 3680fc9d90 | |||
| 836e8bdff0 | |||
| 3d4b39be7d | |||
| 193dfd9d8b | |||
| 305e813489 | |||
| a5756fc764 | |||
| f5bf788814 | |||
| 00f7d7776d | |||
| dce685c780 | |||
| 173a39fd8b | |||
| 5d564ee510 | |||
| 24c2708d1e | |||
| d87a972c66 | |||
| f90736b6b3 | |||
| 9aeb3086cb | |||
| 9e361a8178 | |||
| c3aeef4e09 | |||
| 50090e6447 | |||
| b9e5d26e3a | |||
| 184cfab33b | |||
| fd95b2da76 | |||
| ce04a608b8 | |||
| cff69178e8 | |||
| 6c682b2258 | |||
| c1087eaecc | |||
| 8bb183bc8c | |||
| 15359befdc | |||
| 2c9e18d5a9 | |||
| 4f81e31d63 | |||
| b73c59088c | |||
| 44e4728bde | |||
| ba2629456f | |||
| 1b4779a58c | |||
| 1eaf9f3269 | |||
| 73e365d398 | |||
| d5bf508046 | |||
| 47b097038a | |||
| a4264c7849 | |||
| 463228d0bf | |||
| 6f885b5bdb | |||
| 1dde5d288d | |||
| 820feb3a04 | |||
| 46b00e1378 | |||
| eb12c16fd6 | |||
| 17c32f5ce7 | |||
| 53ef2e2955 | |||
| 7b1131b982 | |||
| 1fc969e6c8 | |||
| 49f960064c | |||
| 83a9d0590d | |||
| d8b016b92a | |||
| 608044305d | |||
| 4760b85930 | |||
| 9e2782d923 | |||
| 2dfeb0cabc | |||
| 2f9b5788d0 | |||
| be496eb4e3 | |||
| 97244557b1 | |||
| e2e5eb0169 | |||
| 6949d7ee5b | |||
| 02303904b8 | |||
| 4ad6d88888 | |||
| e226b52f21 | |||
| b1125b7f1f | |||
| 33ff92d27e | |||
| de4fd76d57 | |||
| bf6df74d44 | |||
| 8f6dd805e5 | |||
| 3235f30a98 | |||
| 7e4020c010 | |||
| 538bbd47d1 | |||
| 78583d2c8c | |||
| fa1a0a1325 | |||
| 6df1437cfc | |||
| 15ed53d4a7 | |||
| 63be191775 | |||
| 6ec505281e | |||
| 5a293e891b | |||
| b57169e221 | |||
| 045d25041f | |||
| 170923874b | |||
| 8137e95fbb | |||
| 0375af197d | |||
| babbda98a6 | |||
| 72bfbed1f1 | |||
| feeae05f1c | |||
| f88ac989ea | |||
| 41f083cded | |||
| 12ded539aa | |||
| 827a1fbd7a | |||
| e84a0ea37c | |||
| 88208bfa5d | |||
| 7073403f1b | |||
| 2501882adb | |||
| 4f2bb19b0f | |||
| de77befb23 | |||
| a5db3d72f1 | |||
| b8898ef410 | |||
| d0543e6c3b | |||
| cef53c4b56 | |||
| 481b03baeb | |||
| f96e61ee06 | |||
| d21c8e3800 | |||
| af7960a796 | |||
| 4c6d6aeaa7 | |||
| ef2261661c | |||
| 9c11f4231c | |||
| 837ab105ad | |||
| 6ac9617d49 | |||
| ccdebccde1 | |||
| c1651ccb12 | |||
| f33180f092 | |||
| 1b03b8df6d | |||
| 3eeb3cb6c6 | |||
| 3e18e31bc9 | |||
| 2fb40944bf | |||
| b108d8ea21 | |||
| 79917d2c8e | |||
| d2cd4fac2d | |||
| cd03877c90 | |||
| 388d84a89e | |||
| 9d24a4422a | |||
| 9693f9269b | |||
| 08a5648e3e | |||
| ccf5552406 | |||
| b749d9bd2f | |||
| d342a18324 | |||
| 8f00936790 | |||
| 8a3aec301a | |||
| faa5185440 | |||
| 4ba8ccfcce | |||
| c30f43b148 | |||
| 5da63998d6 | |||
| 6fc0609a62 | |||
| f02b7b0910 | |||
| 9435254661 | |||
| de14a72931 | |||
| 164f4ffc32 | |||
| b5c77de923 | |||
| 6067fdf27f | |||
| a34a885031 | |||
| f39eb999e5 | |||
| 87d09f78e6 | |||
| 83b7d75121 | |||
| 4598599f52 | |||
| da77edfc83 | |||
| 2917122287 | |||
| a22e0fa62e | |||
| dc7e61c25d | |||
| 8dc667f20d | |||
| 8ff4bc09ac | |||
| 88c3f4c481 | |||
| 01a2c66472 | |||
| cf35bbeb50 | |||
| fe94977c9b | |||
| 69a60686dc | |||
| 7b97e1035f | |||
| c4f010e363 | |||
| 51ebadfc45 | |||
| ceddfada3d | |||
| a933b5d949 | |||
| ba5871cfa1 | |||
| e8b947bca6 | |||
| 7753845f5c | |||
| 19eec48207 | |||
| 293856981f | |||
| 86b70f2632 | |||
| 1905a0f473 | |||
| d05b85c227 | |||
| 19f00589de | |||
| 7f28a14c76 | |||
| fead71da54 | |||
| c26e90cac0 | |||
| d4e5710928 | |||
| 5c2783310a | |||
| b8795c7341 | |||
| 1d994da12b | |||
| 46994e87be | |||
| 40bfe89d97 | |||
| e3c2d4dddc | |||
| 502d9e10c2 | |||
| 865c6590fa | |||
| c30784895d | |||
| fa1fc810ea | |||
| 052b0e831d | |||
| 42271d99b2 | |||
| ecee13bffa | |||
| 5e167b8745 | |||
| 1f8ca2879f | |||
| 2d13116487 | |||
| 316ef305de | |||
| ab1a9271c8 | |||
| 18bc02f087 | |||
| 2a2abe9e0f | |||
| b7ee38eca7 | |||
| ae157d0b4f | |||
| 769485cc2f | |||
| 983ad3513a | |||
| ca914b8b1f | |||
| ca21b8833a | |||
| 3f0f0e306b | |||
| f77a2474ea | |||
| 8205c34abe | |||
| ee4fb89336 | |||
| 81c5cba0e5 | |||
| caa7c994a0 | |||
| 847f530c8e | |||
| c69545c47a | |||
| 1557ff81bc | |||
| ebac9f586b | |||
| 2512cf386d | |||
| da04563e26 | |||
| ceaf362326 | |||
| 9af00b1925 | |||
| f540485cb0 | |||
| 5617d3886d | |||
| 06d13b6954 | |||
| d0c142b9c7 | |||
| ef1f14550f | |||
| 5839bf334b | |||
| 46c936b48e | |||
| 8ed6bb8a1b | |||
| b72dc8c0cf | |||
| 72fa35da10 | |||
| 17eb664597 | |||
| 77931ffe24 | |||
| 45df2c991f | |||
| 615e302b8c | |||
| 1ed8e7e98c | |||
| ee012ae2da | |||
| 32dcce88f7 | |||
| a13cf3f2be | |||
| 6cf99c886f | |||
| 7cbb1807e7 | |||
| d47d03c15b | |||
| 240a7696da | |||
| 14b024e4dc | |||
| 339ebe8f81 | |||
| 9eb7fc03ce | |||
| 036475afd0 | |||
| 378322f6e3 | |||
| d964b81308 | |||
| 49a28b478c | |||
| a75e16e26b | |||
| 73179641b1 | |||
| 58316c608d | |||
| 1c2ead8fb8 | |||
| 66f2cc5184 | |||
| dbd108df8c | |||
| ff1ab217ba | |||
| 49a9d7f57a | |||
| da15c014f5 | |||
| 9a85a50586 | |||
| 94ca782816 | |||
| d17eacc52b | |||
| d86bba3e24 | |||
| 7f7b47611d | |||
| 2d4c128ea2 | |||
| 5d9fc83db4 | |||
| 879f7eb042 | |||
| 5b4e2950d9 | |||
| 050585bbd9 | |||
| 89007ae669 | |||
| b821a1dd98 | |||
| d1f1358e48 | |||
| 805d93912d | |||
| 0b7b16abc0 | |||
| 3dd7732ffc | |||
| c8eb2b2d11 | |||
| 14e7460465 | |||
| 6290aeea93 | |||
| 10b93c6908 | |||
| e4d0d49300 | |||
| cbb96ce7f4 | |||
| 54aaf574d9 | |||
| a824e64682 | |||
| df6186f0f1 | |||
| 78d530ddae | |||
| da15e1fc5e | |||
| 7e2663f2ad | |||
| 1a96483f7b | |||
| 3d5a53566c | |||
| eafe3fa928 | |||
| 6cfb1d6a85 | |||
| 0abd32fca3 | |||
| d1f555dcef | |||
| 6cfd1c92e1 | |||
| bbbbacb073 | |||
| e7b2f85a20 | |||
| 75de7c8eaf | |||
| 3f3c85ba72 | |||
| 89264eb89b | |||
| fa5714ab82 | |||
| 8aa93f32cc | |||
| 60010dd998 | |||
| 7ffe832ff8 | |||
| a63b10972b | |||
| 3eac6effbb | |||
| 7d124ce54d | |||
| 8522cddd61 | |||
| bf2b1a64b9 | |||
| 70ee624e5c | |||
| 3a49635eb7 | |||
| aa5f8dce23 | |||
| c186e51a08 | |||
| 861314256e | |||
| 38f5adbe5c | |||
| 092e77e89b | |||
| 64a72f574d | |||
| 1b4a52e99c | |||
| 1d94eb88f6 | |||
| b3c5a9c010 | |||
| e3c1b133bf | |||
| e6fe9d0d67 | |||
| 05c1fe7f46 | |||
| e3a38a6b0d | |||
| 2b9cf742c5 | |||
| a289e1cd96 | |||
| c306a59854 | |||
| dcc1b5ab2b | |||
| 938dff011f | |||
| 9123c93a90 | |||
| a551286a8f | |||
| 86fd04e556 | |||
| b6dbf81206 | |||
| af47252efe | |||
| 3b81b39998 | |||
| 802b93fa9a | |||
| 7899444135 | |||
| 1ab2b87cc0 | |||
| 97c66c6c82 | |||
| 733207d4a1 | |||
| a0ed70f0a2 | |||
| d3a6b5a77e | |||
| 7a523713c7 | |||
| f7265892ed | |||
| be266c7c2b | |||
| b1b41435b6 | |||
| 8f32a80778 | |||
| 5d79e0ac2f | |||
| 47a6cd5462 | |||
| 7528b27f99 | |||
| a4f9499305 | |||
| bb244e28bb | |||
| 6fac14dbd8 | |||
| 8b144f22c9 | |||
| 146eb3a20e | |||
| d8e444e620 | |||
| da9d63a384 | |||
| c5e85f3d6d | |||
| e05750547c | |||
| 315823cce1 | |||
| 6ff07f4e82 | |||
| 41b54cf25d | |||
| 5ee15ee339 | |||
| 01b0bce2d5 | |||
| cb57ccacef | |||
| 7e0d14b113 | |||
| d06eec5e42 | |||
| 9648821a79 | |||
| 21fb18fe5e | |||
| 6a2518c0df | |||
| 7886d06839 | |||
| 5a9eb6ef72 | |||
| b6c3d1d5bf | |||
| 9b2f6585fb | |||
| 46fd17a9ff | |||
| da73bae9c6 | |||
| 766e2713ab | |||
| 9957254a5a | |||
| 9f6859561c | |||
| 88573a66cd | |||
| 3ccbe9842c | |||
| 5971822f82 | |||
| cdf6baba1d | |||
| 4b7ddb6826 | |||
| 06b74c1f08 | |||
| 3a0eed2ee5 | |||
| 2557bdcf39 | |||
| 12d478784b | |||
| 38fef77d70 | |||
| e8bae78749 | |||
| e14bc30428 | |||
| 9485c97738 | |||
| 11aed6c93e | |||
| d53c267129 | |||
| 2f6de614c1 | |||
| 087080a6c3 | |||
| 41b22916f3 | |||
| 89f1071947 | |||
| 464de785cb | |||
| 8986777c58 | |||
| 65def1a9e2 | |||
| 176c2244ad | |||
| b161e10b73 | |||
| 5bef5dcb04 | |||
| 46a4c27582 | |||
| acc6da86de | |||
| 4d84bc0f01 | |||
| c737635a3b | |||
| b7eeafb183 | |||
| 677306eeee | |||
| 2284ebaacb | |||
| 6b4975b2e4 | |||
| 94c38d115a | |||
| b1e309b4eb | |||
| e8ce119972 | |||
| 8b7cd2931b | |||
| 8bee57b0b0 | |||
| 6bfe3a2d41 | |||
| 7f71f0ed12 | |||
| 583aaff286 | |||
| b24f5c7c1a | |||
| 026f71934b | |||
| 1353d55880 | |||
| b09f637d02 | |||
| 979f9cab20 | |||
| eb6083daf5 | |||
| c4718495a0 | |||
| 0d36d472c9 | |||
| 35422a0fb5 | |||
| d012b44b7f | |||
| eda6d9dc7c | |||
| 63c86198a3 | |||
| 33bdfe9cf9 | |||
| a87c5998a1 | |||
| c918a7957b | |||
| 61e6afdef0 | |||
| 95dc36e908 | |||
| 951a4dc112 | |||
| c09b9b4c99 | |||
| b0873e2aa4 | |||
| 2bdb8fce63 | |||
| d8a692740a | |||
| 14797c421e | |||
| 280b000f07 | |||
| fb4834458e | |||
| c7a1576100 | |||
| aebf6fa0b1 | |||
| f76e3d4522 | |||
| eaf42ba437 | |||
| e83905b783 | |||
| 0b868969be | |||
| b4710633b1 | |||
| 7d076e9344 | |||
| 71d64e8cd9 | |||
| 748fd3efa9 | |||
| 1fc63e1e72 | |||
| fd6bb5ec1f | |||
| 261dbf3edd | |||
| 9e323d2d42 | |||
| 1309dd2a0f | |||
| 9b737230d6 | |||
| ecbd709535 | |||
| 060ec99678 | |||
| 3601d1d262 | |||
| 41ba20ca9a | |||
| 57e3f173d3 | |||
| 92c298c7cf | |||
| b25011ee60 | |||
| 0e017a6ce5 | |||
| 2431e15ffa | |||
| 396add1e9d | |||
| 86241a2793 | |||
| ee47afbe17 | |||
| 8831ca2f32 | |||
| abde215bc3 | |||
| 130d5298fc | |||
| 50cbba1620 | |||
| 2cc293ad16 | |||
| 6ac65a922f | |||
| 3d80f989d0 | |||
| 4fcb5d28a4 | |||
| 3ebdacf369 | |||
| 2ddc00c21e | |||
| e76e39a398 | |||
| 04667f1ed8 | |||
| 2091c3443b | |||
| 2b466b2fb2 | |||
| e17b306265 | |||
| b00b15ab98 | |||
| f4db79fe9b | |||
| 0e4061f858 | |||
| 043a1446e1 | |||
| 49221995e8 | |||
| 247a7488b8 | |||
| 1806198971 | |||
| 375331b80c | |||
| 8fdbe965cc | |||
| dc77d02e8a | |||
| 6265b8fa77 | |||
| 311b348d09 | |||
| ec02cdc4cc | |||
| 5905708111 | |||
| 5d91b759d1 | |||
| ec0a1a4ab1 | |||
| efa29edf09 | |||
| 2a05b70dfc | |||
| 8693e68271 | |||
| d21a9a514d | |||
| e03d132823 | |||
| 61ba985bc9 | |||
| 4629a20fe4 | |||
| a28125ee9a | |||
| df877aca1b | |||
| 05dc415aba | |||
| 6dedd9cb72 | |||
| 256d39b572 | |||
| d186ae1863 | |||
| fddc19e98d | |||
| 2592cd2e58 | |||
| 93b6438cea | |||
| f6746d88b7 | |||
| 34ace4dd4b | |||
| 41d0f42ddf | |||
| 2868f702a5 | |||
| ec4dcee8bd | |||
| 8c378191df | |||
| b98431e8e6 | |||
| 3c8781855e | |||
| 27a94f3ca6 | |||
| 04e334e3e2 | |||
| 12d4832037 | |||
| 6e4f6fec91 | |||
| 57c9525e5c | |||
| 543e4fb57d | |||
| 3881ead8e5 | |||
| 911d1e81b6 | |||
| ae06300c17 | |||
| 26879ca91a | |||
| 306744e5cb | |||
| 3ca32898a1 | |||
| 532fda267f | |||
| 494845b160 | |||
| 0fc823041e | |||
| 71eae4137d | |||
| 47b19f209b | |||
| 2b5355edca | |||
| e9a0beb4e8 | |||
| 6bdfe68897 | |||
| cf2d2b6763 | |||
| 95cd44f34f | |||
| d330e60d40 | |||
| 99004bbec8 | |||
| bbcc728a07 | |||
| 033dc0a72d | |||
| 1c140a112a | |||
| 312e86eb58 | |||
| 1dfdb38d4a | |||
| dfafe7dc5f | |||
| 6ecc123d15 | |||
| 6f322d2140 | |||
| dfa762bccc | |||
| 87f00d2c4c | |||
| 6f94e0dfb8 | |||
| ad70759f91 | |||
| 27c4e8ddd0 | |||
| 805d74b6ae | |||
| 4ad78309e2 | |||
| b78207ddd8 | |||
| b6834da9a4 | |||
| 801cc72691 | |||
| e198709643 | |||
| ed8d5e0b0a | |||
| e8fb312703 | |||
| 058b8c3b31 | |||
| ae3ccb009e | |||
| 0c60a2aef8 | |||
| 44fdf86702 | |||
| 1659bbf7b1 | |||
| 46b58fba83 | |||
| 84da86ba4a | |||
| 6777127497 | |||
| a4ac07866a | |||
| 448f8377fb | |||
| c490752ca7 | |||
| 6edc565c01 | |||
| bb0c2754d3 | |||
| 58d6e8f4d0 | |||
| bdc66049a5 | |||
| 0a53775fb3 | |||
| 9cdc9008aa | |||
| bd707b0cfc | |||
| a85f39c140 | |||
| ef7b36da32 | |||
| 14fdf861ca | |||
| 7641b12b08 | |||
| e7159adf59 | |||
| 51f08f2994 | |||
| a03eac8e48 | |||
| 503137221d | |||
| fb9205bf81 | |||
| bfbb313088 | |||
| 25d3c4b843 | |||
| 371c06d66d | |||
| 3e5c978719 | |||
| 843f1a6356 | |||
| a5c5faa21d | |||
| 6a1e17c6fa | |||
| cd30f370b8 | |||
| 4ae8abe6a3 | |||
| 82bfd4ee40 | |||
| e08c4cff13 | |||
| 6e16eab6ec | |||
| 21c47514da | |||
| d6de2ca71c | |||
| 451a0d9090 | |||
| 262354f733 | |||
| 498370330d | |||
| 6865853776 | |||
| 1418c0dbbc | |||
| bbc79dd49f | |||
| 8036320d94 | |||
| c30f69d6e9 | |||
| 2e2f34f241 | |||
| cbbeef5c46 | |||
| 823ee54f22 | |||
| 3d03797e53 | |||
| 089e60fa1e | |||
| baf8e4784b | |||
| d53350b263 | |||
| 824afdceca | |||
| a8230e976f | |||
| 6af7e6866c | |||
| aaa27333ba | |||
| 797f2a196b | |||
| 51066ff18f | |||
| 4de64a92cb | |||
| a21fd2ea18 | |||
| 0df0b4305d | |||
| a5ed53e7aa | |||
| 0587c5f5c4 | |||
| 57dbb18c4c | |||
| 4d92f08424 | |||
| 254ee07942 | |||
| 0bf8bd2230 | |||
| b5225f07cb | |||
| abed7690d0 | |||
| f96174ddbe | |||
| e5b713841a | |||
| 3b1b12069f | |||
| 1635f7351d | |||
| ce5ae411c1 | |||
| d1bc32fb31 | |||
| f9f87f25d4 | |||
| 89aa6b7881 | |||
| edf9e0c1ed | |||
| c2e520ad9d | |||
| 7649187095 | |||
| fe39d0fd10 | |||
| 98b83b7208 | |||
| 57321979ae | |||
| e3ce0c5887 | |||
| 95af72c70c | |||
| 3b37769624 | |||
| d150df1c5c | |||
| a322e27e05 | |||
| 98fe0badbe | |||
| 44b841a25d | |||
| 9c8bf820de | |||
| 4d9aa65e78 | |||
| 0f3942558f | |||
| ba074b0116 | |||
| 6aa97048df | |||
| d9a5c79ea6 | |||
| 9d7714c714 | |||
| 8291be375a | |||
| 0a73737f69 | |||
| 2fd1b6c913 | |||
| ea38a1d880 | |||
| f576e13c51 | |||
| ee7bb8731a | |||
| da0c3ff394 | |||
| 6ae559b42b | |||
| 95ca6ebdaa | |||
| 0d6964d9c8 | |||
| ba386d4b2c | |||
| b5ffb51e18 | |||
| a9f674497a | |||
| 1e8a92ccb4 | |||
| b9178bb8c7 | |||
| 520b29d0d5 | |||
| fe397e6953 | |||
| dcb741d827 | |||
| 508c205d35 | |||
| d5294bb5d0 | |||
| 6ed9be31ca | |||
| 3bbd3a8a65 | |||
| 73a608895a | |||
| 96c73baeb3 | |||
| 73113f5eb8 | |||
| 7b74b86891 | |||
| 0903b8227f | |||
| fa525ad610 | |||
| 0f2bb5dde5 | |||
| 84dc1b6845 | |||
| 4ce1a37772 | |||
| 8dd4cc5c40 | |||
| 6aed145dae | |||
| d15cc77b0b | |||
| 24a75d37fb | |||
| 7e80dae59b | |||
| 7316c48e9f | |||
| c520c7a24a | |||
| 7564633045 | |||
| 7174c5d036 | |||
| ddd128ce0e | |||
| f5aa5c0769 | |||
| 2acde49f0f | |||
| 8849015bbf | |||
| 70cd7a94ec | |||
| 3984dea34b | |||
| b11b471aa4 | |||
| 63754df4d4 | |||
| e644424508 | |||
| 4f6eef3d16 | |||
| e2e8104864 | |||
| 96127c289c | |||
| cfed65f7ea | |||
| c2263fec9b | |||
| 497720d060 | |||
| 238366e71f | |||
| 2c8cf26e74 | |||
| c87ae5612a | |||
| a2d83753bc | |||
| eedf75d951 | |||
| 3f51a1ae2e | |||
| a000f80705 | |||
| 7030bff7f7 | |||
| bb0b7fd2d1 | |||
| 71e1f3679e | |||
| b33517b099 | |||
| f3d5336892 | |||
| d81f25d54e | |||
| 44ebdfeb2d | |||
| a5a7a03fa0 | |||
| 363d2145bd | |||
| c7e19396a4 | |||
| 445e5bed49 | |||
| 4cf94319df | |||
| 1bb88b374e | |||
| 35fac07581 | |||
| 9287475b2a | |||
| b4976f89f2 | |||
| 93c8674a40 | |||
| d5f21fd13a | |||
| 04eef0463a | |||
| 82c3bc7b0e | |||
| 1d33cb96f5 | |||
| 648646068c | |||
| f251f93a11 | |||
| aab1aad8f4 | |||
| 65a6dc704e | |||
| 6018fcf490 | |||
| 1e6888c0d3 | |||
| c7303be33b | |||
| d8acf76f2d | |||
| 08248e3853 | |||
| 78acc6f215 | |||
| a4f1dc536d | |||
| 57a30dd375 | |||
| 5517ee334f | |||
| 30af544919 | |||
| f0069d3dcc | |||
| 206bdff9e7 | |||
| c32270b2b8 | |||
| cc03402570 | |||
| 21a76f1867 | |||
| 212ad94c90 | |||
| 378d9f4112 | |||
| e341d367d8 | |||
| 98937b187f | |||
| 59168e21b4 | |||
| d12a95b4ef | |||
| 83482afa02 | |||
| e470d1ae1c | |||
| e504128587 | |||
| 1ab6c07bad | |||
| 5ce465ce23 | |||
| a8b730576f | |||
| b796033473 | |||
| d078ed67ca | |||
| 346146d834 | |||
| 64307ea882 | |||
| 578eda7d28 | |||
| 505f4cb4a2 | |||
| bac6b729bf | |||
| d3a5cadb6c | |||
| 65351faf83 | |||
| 3aa1c5f13c | |||
| 8f3fe410b8 | |||
| ff3bf32b11 | |||
| 38cb01a30e | |||
| b8f7569e93 | |||
| cf17bd38eb | |||
| 930f6df2cb | |||
| e88106e990 | |||
| 21f64c75eb | |||
| 5186b9490d | |||
| e9e935303c | |||
| a154d71841 | |||
| fddb035539 | |||
| 1544a08ea2 | |||
| 8d68d4c050 | |||
| 62a1290043 | |||
| c5e1742150 | |||
| 754bc2d274 | |||
| 3ac061c546 | |||
| e59a7926a2 | |||
| be5b49e391 | |||
| 7b32d3184c | |||
| d770c35245 | |||
| e04baef3bb | |||
| 9d3ad22bc7 | |||
| cc35d15b2d | |||
| 15e3928906 | |||
| 4363fd64c4 | |||
| dac2f93383 | |||
| 82372bb2ab | |||
| b0c67c9019 | |||
| d83a34f72b | |||
| a16f156203 | |||
| 807aa71a7c | |||
| 14d9b67b58 | |||
| 82df0ca766 | |||
| a6c7529a4e | |||
| 202bb6d3e2 | |||
| bc514926bf | |||
| 9fc16b6a83 | |||
| 2125e0175d | |||
| 6b5982d389 | |||
| a4a8aa63d4 | |||
| bedf451952 | |||
| 93b8f1993c | |||
| c693f4806b | |||
| b07275694a | |||
| 82177c101b | |||
| da6dbd2159 | |||
| b3957d87b4 | |||
| 5f9ccadd6c | |||
| 6e04da9f8f | |||
| 58c13d2c07 | |||
| bca8593eef | |||
| 3e2e10a4c3 | |||
| 6979763292 | |||
| 324f1739e4 | |||
| 1489662f57 | |||
| 1c1f407f67 | |||
| 8fb631417b | |||
| ae45ad1ad2 | |||
| 6b89803534 | |||
| d01b34f501 | |||
| fcad2fa471 | |||
| 589767fe6d | |||
| d6407e5095 | |||
| 8ff8dc7200 | |||
| 2f7b02c96f | |||
| 669e2a767a | |||
| 2b4f9feeab | |||
| 1554916639 | |||
| 32a3651231 | |||
| dbd4ecf89b | |||
| 7416653874 | |||
| 621ed970da | |||
| 457ba9ac62 | |||
| f9da5f2c80 | |||
| b6a793a1e2 | |||
| bf2ab3d8af | |||
| 02f75236cb | |||
| 5dff83c6e9 | |||
| 43725bae89 | |||
| 59c12506cf | |||
| be15a3b739 | |||
| 9f515dad09 | |||
| 5052c4ae3a | |||
| 9a617f5d41 | |||
| 4886d46d91 | |||
| 67834def5f | |||
| c51ffeb65a | |||
| 68ee4eab61 | |||
| fa6d4ac0bc | |||
| 3fa533d91e | |||
| c0db144906 | |||
| ea2ec168b0 | |||
| cb18c1a54d | |||
| 45bcb22270 | |||
| 2539fd53dc | |||
| 8a2bd09fd0 | |||
| def89ac079 | |||
| fe08726387 | |||
| 9bb4a68599 | |||
| 996a27dbd1 | |||
| 58ebadd7b3 | |||
| cae06ba2c1 | |||
| 0274afa0f7 | |||
| 221f70ac7b | |||
| d3dbca374d | |||
| 6f0b6a8158 | |||
| b25cd6aaf2 | |||
| d27025003a | |||
| 66eb90d9d0 | |||
| 6a81a9d191 | |||
| 64cb134113 | |||
| 891ff7dd80 | |||
| 6643e7f499 | |||
| fcbf527ba5 | |||
| dfd180a292 | |||
| fa0a5040e5 | |||
| 56ba2cb251 | |||
| dea12779cf | |||
| 6033c05ff0 | |||
| 407da8bd15 | |||
| 43413ff980 | |||
| 4d864b8267 | |||
| a516245c94 | |||
| b1ed268d0e | |||
| 83b86bf092 | |||
| 954caa6804 | |||
| 8b6da4d2fe | |||
| f2d70d972d | |||
| b20de76037 | |||
| a33bd9dfe6 | |||
| f2443c64db | |||
| 278ec04f5e | |||
| 95787255a1 | |||
| eaf9993dd9 | |||
| 470d7600b8 | |||
| 849baea544 | |||
| 4f1ca20dda | |||
| 97401ad99a | |||
| 59f5e364c1 | |||
| 29c2a117c0 | |||
| c209e31ce1 | |||
| 12608889e2 | |||
| 3343882876 | |||
| 6e50b5fc60 | |||
| c540c85cf8 | |||
| b17491ebe5 | |||
| 76b410b2ca | |||
| 069388eae0 | |||
| c6c25e609b | |||
| 9b52dd8bf7 | |||
| 2cf19010e3 | |||
| 89d56e1cd1 | |||
| ef1fb08723 | |||
| e60ebee3f2 | |||
| 4c88fe0fb1 | |||
| 13338414db | |||
| 96f49f3b53 | |||
| 75979d7e1c | |||
| 29a2447906 | |||
| 2f702f61a4 | |||
| 5a71acbe3c | |||
| ca3e8ef09e | |||
| 8c44084af1 | |||
| d829a390fd | |||
| 6b6597e453 | |||
| 97c550d5f6 | |||
| acfd6ab141 | |||
| 7e790c1aa6 | |||
| d1e2aa57a8 | |||
| 2e6e3bf0b0 | |||
| e5025665fc | |||
| 1a8097f810 | |||
| f45daad6ca | |||
| e4e85e6f7e | |||
| 5beaf695ed | |||
| d09827b501 | |||
| 97722adbfa | |||
| 006a8833d3 | |||
| 8111baa8f9 | |||
| d6e4dc0aa2 | |||
| 497da1d29b | |||
| cbc8b64854 | |||
| c06f2a50f1 | |||
| 825a422721 | |||
| 2c4ba90abb | |||
| 6dda899a60 | |||
| 8725e2f40d | |||
| 35c501c203 | |||
| 30a9bc3179 | |||
| f9350a276c | |||
| cd9addf0e2 | |||
| 2219b6507c | |||
| 09931d7ad8 | |||
| 7ce0c0ef9a | |||
| 49e2cb6c36 | |||
| 4b60fc4747 | |||
| 164fb09f2c | |||
| 5647e6c199 | |||
| a4d6544764 | |||
| e942f6e420 | |||
| 7174baa91e | |||
| 5c8b7542d0 | |||
| e8035ced5a | |||
| 70a086a9e1 | |||
| 08cb6d1f63 | |||
| c7f3645fe2 | |||
| 4b6a85aae0 | |||
| c8a8859d2f | |||
| 8c0f47f06c | |||
| 926290dd9c | |||
| 6ae3315bb9 | |||
| 8621b1890e | |||
| c726001a0e | |||
| eba5f7d275 | |||
| 2f793473cc | |||
| 91567cad9e | |||
| d48ee84ae7 | |||
| fd000cad86 | |||
| 6244063073 | |||
| f34de8422e | |||
| a33edd15b4 | |||
| 6a65261765 | |||
| 07f3e2d457 | |||
| 958199ffef | |||
| e5ebf74d76 | |||
| 126d2f85ac | |||
| 908e3a2af6 | |||
| 25e40d723a | |||
| 7a764ce78b | |||
| 8947c789a9 | |||
| 8ac403abb9 | |||
| 9752cb8e4d | |||
| e9be9dd8d0 | |||
| 5e6d638c6f | |||
| c47f6e2ca5 | |||
| cc09df1961 | |||
| db26d2b2d7 | |||
| 5b33efeecc | |||
| fda4656630 | |||
| 5829bbe22d | |||
| f4cfde719d | |||
| 1fd66f55c1 | |||
| a964bec0f8 | |||
| b65ba5c394 | |||
| d51eefa1c4 | |||
| 4025cbd555 | |||
| 3da27c06c3 | |||
| bc7824812b | |||
| baf7822340 | |||
| 82ee08fcaf | |||
| 51d153a5f7 | |||
| df608e8b43 | |||
| 8e477437a6 | |||
| e70f0eea02 | |||
| 8be93a0202 | |||
| d4f7f19a22 | |||
| 4441381042 | |||
| 61c9c69718 | |||
| 5beaab97da | |||
| 843a4b8eae | |||
| 9ec46222e3 | |||
| 210da11fbb | |||
| ee61ae360d | |||
| 890e0f4995 | |||
| 224c66e0dc | |||
| 88052cd194 | |||
| c22453f24a | |||
| 099a805260 | |||
| 7ed474af8d | |||
| 9d893d6d4d | |||
| e55af0c274 | |||
| 803fbf2541 | |||
| 061b2b63e9 | |||
| 1486098065 | |||
| 0f0db4c823 | |||
| c3e7e96dce | |||
| 3c5f6bd8ac | |||
| b6b59e5c08 | |||
| a7aa27c87c | |||
| 735b325d74 | |||
| f948380fa2 | |||
| 79cf1880fc | |||
| ca130e1dc4 | |||
| d67ce81438 | |||
| ec1a84c57a | |||
| 59163cb2fc | |||
| 419cf9e2b0 | |||
| 95c78eac9c | |||
| 51a4cf5e46 | |||
| 2472c5d6a1 | |||
| 59fbb289b9 | |||
| e82bc20422 | |||
| 1e753e98ce | |||
| 39b3cab1da | |||
| 87fbfc6475 | |||
| cb8bfa027e | |||
| 1b1274fd56 | |||
| 38db495879 | |||
| a781c36876 | |||
| 71c336d9dd | |||
| e10e8910f3 | |||
| 253496c7ee | |||
| 30a3ab68c0 | |||
| 663a7c52c7 | |||
| 4e8ccd6f7d | |||
| 879ccfc8c2 | |||
| a77574b3d7 | |||
| 50738f8ce0 | |||
| 5c01878542 | |||
| ea93f6f560 | |||
| 7bab34eeda | |||
| 0cc23dec6f | |||
| 71c0d5253d | |||
| a674028c37 | |||
| 29fff4f51b | |||
| 4309ccfa02 | |||
| 4e8fe89faa | |||
| 8218d5a47e | |||
| 4bbb587280 | |||
| 0f04fe75bd | |||
| 11b356e55f | |||
| 80f008684d | |||
| c9c2d8133c | |||
| ac9a4d1e0d | |||
| d7dd6acd9d | |||
| b5739cb3d8 | |||
| ea93d56ca8 | |||
| 10097a946f | |||
| c439594403 | |||
| 29cf9e05db | |||
| 298f68c966 | |||
| 0b3289ea37 | |||
| 5f457bff12 | |||
| 6c00ccca9a | |||
| 7e679ab252 | |||
| 0ca21dbc91 | |||
| d2590f1078 | |||
| eb3f550e26 | |||
| 06aa6dedab | |||
| f769478abe | |||
| ba5f0af5a4 | |||
| 5e5f72ae57 | |||
| f36037ebf2 | |||
| 0c276ac71e | |||
| 9e95d1f1fd | |||
| e00bda37a5 | |||
| e7ea5f500d | |||
| a8fc95d4e4 | |||
| 3f598a5121 | |||
| 81c5ec0777 | |||
| 32bb58b272 | |||
| aa4b786ab3 | |||
| 3f5968b60c | |||
| 251eeb534a | |||
| 90add9f840 | |||
| 770624d492 | |||
| c59758ef65 | |||
| 15752335f4 | |||
| 3e4b48e206 | |||
| 25c685527a | |||
| fbabd137c2 | |||
| 6e7cf68164 | |||
| b47a532eb4 | |||
| 7c30ea32bf | |||
| bb06e044f5 | |||
| 01318a08b4 | |||
| 119487f1aa | |||
| 911427a361 | |||
| 58628a4bfc | |||
| b08b360f38 | |||
| adb8d0e845 | |||
| e0f009b3b9 | |||
| f1aa03c360 | |||
| 2ba417cf9f | |||
| d8af074ff6 | |||
| daf2bbf991 | |||
| 6605f293b4 | |||
| 482e18ccdb | |||
| ef1e0e14ec | |||
| 33f083b213 | |||
| bcfbc0cf6c | |||
| 00d75ece64 | |||
| dc1b5d3424 | |||
| 58fb633df3 | |||
| 36f9366f3f | |||
| 712f1ca02a | |||
| 285b238f26 | |||
| 70fb12b10e | |||
| 6380a6be05 | |||
| 548fd92c15 | |||
| 86de53eb9a | |||
| e1616953db | |||
| c1dbab50fe | |||
| b6bb6a92a9 | |||
| 0ab80ad0a7 | |||
| 61744764da | |||
| 8eb98982f3 | |||
| 1090339331 | |||
| 804816f014 | |||
| 51e8318224 | |||
| 0d38a50dba | |||
| 72094acf74 | |||
| 1bd67943bb | |||
| 30101e129f | |||
| 9bb31678a6 | |||
| 5e5c52ff0a | |||
| d9d4742130 | |||
| 0fab6b7cab | |||
| f10286de8c | |||
| a0e0465704 | |||
| c8457a2619 | |||
| 14c36bc405 | |||
| 81319228bd | |||
| fcd7b05900 | |||
| 8378d95588 | |||
| b34f9b1795 | |||
| 35b098e656 | |||
| e05a45b080 | |||
| 715ee66b03 | |||
| 3d6e9da115 | |||
| 54410988eb | |||
| dded2c2463 | |||
| fcf5838019 | |||
| beafa18708 | |||
| bd371a11ad | |||
| 1895fee1c9 | |||
| 2200d0b678 | |||
| f3c4a7dd16 | |||
| 25834b89dd | |||
| 4d20dea271 | |||
| c59647ad2f | |||
| e466cbe0ce | |||
| a24de2d22a | |||
| f452a3025d | |||
| 3c58eaf49f | |||
| c75b497b2e | |||
| d572d77b48 | |||
| a4074332cc | |||
| c31ceb6a5b | |||
| b0863d8628 | |||
| c38a6d74dd | |||
| 7bec75b709 | |||
| 56ea24b03b | |||
| 277829c280 | |||
| c127aaae6b | |||
| c895848061 | |||
| 64e5ebb55f | |||
| 83addd6bba | |||
| d87a19b2f9 | |||
| b58edc980c | |||
| f3e72623e9 | |||
| 54ee76bcef | |||
| efe6faabfd | |||
| 3ee8b655ea | |||
| c70d138eb9 | |||
| af2a327310 | |||
| b27e0e2807 | |||
| 8267ed53f0 | |||
| aa90d7b4b7 | |||
| 6b69946b9e | |||
| a1b87b5236 | |||
| 3044c5ea52 | |||
| d0636a9f6d | |||
| 0d291cb68e | |||
| c8bb50497b | |||
| ea027a7cc1 | |||
| 62e8601919 | |||
| be2cc7aed9 | |||
| 17babb22e2 | |||
| 21245273b4 | |||
| 8d7821c84e | |||
| f6116db957 | |||
| c824429458 | |||
| 23b2154d98 | |||
| 25c8711aad | |||
| cf30628d4e | |||
| 7675c730b6 | |||
| 2ce74c05e1 | |||
| 88e6558da3 | |||
| f1140ec903 | |||
| a2e114e852 | |||
| 8f6fc0146b | |||
| 6ad1cd3fb5 | |||
| 40443d1e25 | |||
| 4ec323c5cc | |||
| 300d901618 | |||
| fd6daa580a | |||
| c2fc47df34 |
+59
-23
@@ -2,53 +2,89 @@
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: true
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: true
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterObjCDeclaration: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
IndentBraces: true
|
||||
BreakBeforeBinaryOperators: false
|
||||
BreakBeforeBraces: Allman
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BinPackParameters: false
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
DerivePointerBinding: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
IncludeCategories:
|
||||
- Regex: '^<'
|
||||
Priority: 3
|
||||
- Regex: '^"(osrm|util|engine|extract|contract)/'
|
||||
Priority: 2
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
IndentCaseLabels: false
|
||||
MaxEmptyLinesToKeep: 1
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyExcessCharacter: 1000
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerBindsToType: false
|
||||
PointerAlignment: Right
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
Cpp11BracedListStyle: true
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
IndentWidth: 4
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
BreakBeforeBraces: Allman
|
||||
IndentFunctionDeclarationAfterType: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInAngles: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
ContinuationIndentWidth: 4
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
SpaceBeforeParens: ControlStatements
|
||||
...
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"rules": {
|
||||
"indent": [
|
||||
2,
|
||||
4
|
||||
],
|
||||
"quotes": [
|
||||
1,
|
||||
"single"
|
||||
],
|
||||
"linebreak-style": [
|
||||
2,
|
||||
"unix"
|
||||
],
|
||||
"semi": [
|
||||
2,
|
||||
"always"
|
||||
],
|
||||
"no-console": [
|
||||
1
|
||||
]
|
||||
},
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Issue
|
||||
|
||||
What issue is this PR targeting? If there is no issue that addresses the problem, please open a corresponding issue and link it here.
|
||||
|
||||
## Tasklist
|
||||
- [ ] ADD OWN TASKS HERE
|
||||
- [ ] update relevant [Wiki pages](https://github.com/Project-OSRM/osrm-backend/wiki)
|
||||
- [ ] add regression / cucumber cases (see docs/testing.md)
|
||||
- [ ] review
|
||||
- [ ] adjust for comments
|
||||
|
||||
## Requirements / Relations
|
||||
Link any requirements here. Other pull requests this PR is based on?
|
||||
+22
@@ -1,3 +1,8 @@
|
||||
# mason #
|
||||
#########
|
||||
/.mason
|
||||
/mason_packages
|
||||
|
||||
# pre compiled dependencies #
|
||||
#############################
|
||||
osrm-deps
|
||||
@@ -40,6 +45,11 @@ Thumbs.db
|
||||
# build related files #
|
||||
#######################
|
||||
/build/
|
||||
/example/build/
|
||||
/test/data/monaco*
|
||||
/test/data/ch
|
||||
/test/data/corech
|
||||
/test/data/mld
|
||||
/cmake/postinst
|
||||
|
||||
# Eclipse related files #
|
||||
@@ -73,10 +83,22 @@ stxxl.errlog
|
||||
###################
|
||||
/sandbox/
|
||||
|
||||
# Test related files #
|
||||
######################
|
||||
/test/profile.lua
|
||||
/test/cache
|
||||
/test/speeds.csv
|
||||
/test/penalties.csv
|
||||
node_modules
|
||||
|
||||
# Deprecated config file #
|
||||
##########################
|
||||
/server.ini
|
||||
|
||||
*.swp
|
||||
|
||||
# local lua debugging file
|
||||
debug.lua
|
||||
|
||||
# node-osrm artifacts
|
||||
lib/binding
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
*
|
||||
!README.md
|
||||
!CHANGELOG.md
|
||||
!CONTRIBUTING.MD
|
||||
!LICENCE.TXT
|
||||
!package.json
|
||||
!example
|
||||
!lib/*.js
|
||||
!profiles/*
|
||||
!profiles/lib/*
|
||||
+170
-108
@@ -1,176 +1,238 @@
|
||||
#language: cpp
|
||||
# This makes travis use the thin image which boots faster
|
||||
language: generic
|
||||
language: cpp
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
# sudo:required is needed for trusty images
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
nodejs:
|
||||
- "4"
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
# enable building tags
|
||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
ccache: true
|
||||
apt: true
|
||||
directories:
|
||||
- test/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.7.2
|
||||
- MASON="$(pwd)/scripts/mason.sh"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
# We override the compiler names here to yield better ccache behavior, which uses this as key
|
||||
include:
|
||||
|
||||
# Debug Builds
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons: &gcc5
|
||||
compiler: "gcc-6-debug"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'rubygems-integration', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-5' BUILD_TYPE='Debug'
|
||||
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
|
||||
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons: &gcc48
|
||||
compiler: "clang-4.0-debug"
|
||||
addons: &clang40
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-4.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'rubygems-integration', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-4.8' BUILD_TYPE='Debug'
|
||||
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='4.0.0' BUILD_TYPE='Debug' CUCUMBER_TIMEOUT=60000
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
addons: &clang38
|
||||
compiler: "mason-linux-debug-santize"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['llvm-toolchain-precise', 'ubuntu-toolchain-r-test']
|
||||
packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'rubygems-integration', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='clang++-3.8' BUILD_TYPE='Debug' RUN_CLANG_FORMAT=ON
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
compiler: clang
|
||||
env: COMPILER='clang++' BUILD_TYPE='Debug'
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_SANITIZER=ON ENABLE_NODE_BINDINGS=ON
|
||||
|
||||
# Release Builds
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons: &gcc5
|
||||
compiler: "mason-linux-release"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'rubygems-integration', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-5' BUILD_TYPE='Release'
|
||||
packages: ['libstdc++-5-dev']
|
||||
env: CLANG_VERSION='4.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON RUN_CLANG_FORMAT=ON ENABLE_LTO=ON ENABLE_NODE_BINDINGS=ON
|
||||
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons: &gcc48
|
||||
compiler: "gcc-6-release"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-4.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'rubygems-integration', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-4.8' BUILD_TYPE='Release'
|
||||
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'
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
addons: &clang38
|
||||
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'
|
||||
|
||||
- os: linux
|
||||
compiler: "gcc-4.9-release"
|
||||
addons: &gcc49
|
||||
apt:
|
||||
sources: ['llvm-toolchain-precise', 'ubuntu-toolchain-r-test']
|
||||
packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'rubygems-integration', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='clang++-3.8' BUILD_TYPE='Release'
|
||||
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']
|
||||
env: CCOMPILER='gcc-4.9' CXXCOMPILER='g++-4.9' BUILD_TYPE='Release'
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
compiler: clang
|
||||
env: COMPILER='clang++' BUILD_TYPE='Release'
|
||||
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
|
||||
|
||||
# Disabled because of CI slowness
|
||||
#- os: linux
|
||||
#- compiler: clang
|
||||
#- addons: &clang40
|
||||
#- apt:
|
||||
#- sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
|
||||
#- packages: ['clang-4.0', '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-4.0' CXXCOMPILER='clang++-4.0' BUILD_TYPE='Release'
|
||||
|
||||
# Shared Library
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons: &gcc5
|
||||
compiler: "gcc-6-release-shared"
|
||||
addons: &gcc6
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: ['g++-5', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'rubygems-integration', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='g++-5' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
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
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
addons: &clang38
|
||||
apt:
|
||||
sources: ['llvm-toolchain-precise', 'ubuntu-toolchain-r-test']
|
||||
packages: ['clang-3.8', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'rubygems-integration', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev']
|
||||
env: COMPILER='clang++-3.8' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
# Disabled because CI slowness
|
||||
#- os: linux
|
||||
#- compiler: clang
|
||||
#- addons: &clang40
|
||||
#- apt:
|
||||
#- sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
|
||||
#- packages: ['clang-4.0', '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-4.0' CXXCOMPILER='clang++-4.0' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
|
||||
# Disabled until tests all pass on OSX:
|
||||
#
|
||||
# 3/ OSX Clang Builds
|
||||
#- os: osx
|
||||
# osx_image: xcode6.4
|
||||
# compiler: clang
|
||||
# env: COMPILER='clang++' BUILD_TYPE='Debug'
|
||||
|
||||
#- os: osx
|
||||
# osx_image: xcode6.4
|
||||
# compiler: clang
|
||||
# env: COMPILER='clang++' BUILD_TYPE='Release'
|
||||
|
||||
#- os: osx
|
||||
# osx_image: xcode6.4
|
||||
# compiler: clang
|
||||
# env: COMPILER='clang++' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
#- os: osx
|
||||
# osx_image: xcode7
|
||||
# compiler: clang
|
||||
# env: COMPILER='clang++' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON
|
||||
|
||||
|
||||
install:
|
||||
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
|
||||
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
|
||||
before_install:
|
||||
- if [[ ! -z $TARGET_ARCH ]] ; then source ./scripts/travis/before_install.$TARGET_ARCH.sh ; fi
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz"
|
||||
mkdir cmake && travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
|
||||
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
|
||||
|
||||
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
||||
# implicit deps, but seem to be installed by default with recent images: libxml2 GDAL boost
|
||||
brew install cmake libzip libstxxl lua51 luabind tbb md5sha1sum
|
||||
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
|
||||
fi
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
||||
export JOBS=$((`sysctl -n hw.ncpu` + 1))
|
||||
sudo mdutil -i off /
|
||||
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"
|
||||
- yarn install --ignore-scripts
|
||||
# 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} || exit 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}
|
||||
- |
|
||||
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}
|
||||
# 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}
|
||||
fi
|
||||
fi
|
||||
- ccache --max-size=256M # limiting the cache's size to roughly the previous job's object sizes
|
||||
|
||||
before_script:
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
install:
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||
fi
|
||||
- rvm use 1.9.3
|
||||
- gem install bundler
|
||||
- bundle install
|
||||
- mkdir build && pushd build
|
||||
- export CXX=${COMPILER}
|
||||
- export OSRM_PORT=5000 OSRM_TIMEOUT=60
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} -DBUILD_TOOLS=1 -DENABLE_CCACHE=0
|
||||
|
||||
script:
|
||||
- make --jobs=2
|
||||
- make tests --jobs=2
|
||||
- make benchmarks
|
||||
- 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_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \
|
||||
-DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \
|
||||
-DBUILD_TOOLS=ON \
|
||||
-DENABLE_CCACHE=ON
|
||||
- echo "travis_fold:start:MAKE"
|
||||
- make --jobs=${JOBS}
|
||||
- make tests --jobs=${JOBS}
|
||||
- make benchmarks --jobs=${JOBS}
|
||||
- echo "travis_fold:end:MAKE"
|
||||
- ccache -s
|
||||
- sudo make install
|
||||
- |
|
||||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
sudo ldconfig
|
||||
fi
|
||||
- ./extractor-tests
|
||||
- ./engine-tests
|
||||
- ./util-tests
|
||||
- popd
|
||||
- cucumber -p verify
|
||||
- make -C test/data
|
||||
- mkdir example/build && pushd example/build
|
||||
- cmake ..
|
||||
- make
|
||||
- ./osrm-example ../../test/data/monaco.osrm
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
|
||||
- make --jobs=${JOBS}
|
||||
- popd
|
||||
# building docs only works with npm3+ not with yarn or npm2
|
||||
#- yarn run docs
|
||||
|
||||
script:
|
||||
- if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi
|
||||
- make -C test/data benchmark
|
||||
- ./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
|
||||
- ./unit_tests/extractor-tests
|
||||
- ./unit_tests/engine-tests
|
||||
- ./unit_tests/util-tests
|
||||
- ./unit_tests/server-tests
|
||||
- ./unit_tests/partition-tests
|
||||
- popd
|
||||
- yarn test
|
||||
|
||||
after_success:
|
||||
- |
|
||||
if [ -n "$RUN_CLANG_FORMAT" ]; then
|
||||
./scripts/format.sh || true # we don't want to fail just yet
|
||||
if [ -n "${ENABLE_COVERAGE}" ]; then
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
fi
|
||||
|
||||
- |
|
||||
if [ -n "${ENABLE_NODE_BINDINGS}" ]; then
|
||||
./scripts/travis/publish.sh
|
||||
fi
|
||||
|
||||
+449
@@ -1,3 +1,452 @@
|
||||
- Track preprocessing flag in the map matching plugin.
|
||||
|
||||
# 5.7.0
|
||||
- Changes from 5.6
|
||||
- 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`.
|
||||
- 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
|
||||
- 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
|
||||
|
||||
# 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
|
||||
- Fix #3475 removed an invalid `exit` field from the `arrive` maneuver
|
||||
- Fix #3515 adjusted number of `nodes` in `annotation`
|
||||
- Fix #3605 Fixed a bug that could lead to turns at the end of the road to be suppressed
|
||||
- Fix #2844 handle up to 16777215 code units in OSM names
|
||||
- Infrastructure
|
||||
- Support building rpm packages.
|
||||
- Guidance
|
||||
- No longer emitting turns on ferries, if a ferry should use multiple docking locations
|
||||
- Profiles
|
||||
- Removed the `./profile.lua -> ./profiles/car.lua` symlink. Use specific profiles from the `profiles` directory.
|
||||
- `properties` object has a new `weight_name` field, default value is "duration"
|
||||
- `properties` object has a new `weight_precision` field that specifies a decimal precision of edge weights, default value 1
|
||||
- In `way_function` the filed `forward_rate` and `backward_rate` of `ExtractionWay` can now be set.
|
||||
They have the same interpretation for the way weight as `forward_speed` and `backward_speed` for the edge duration.
|
||||
The unit of rate is meters per weight unit, so higher values will be prefered during routing.
|
||||
- `turn_function` now does not return an integer but takes in a `ExtractionTurn` object and can modify the `weight` and `duration` fields
|
||||
- `segment_function` now takes in a `ExtractionSegment` object and can modify `weight` and `duration` fields
|
||||
- `properties.uturn_penalty` is deprecated. Set it in the `turn_function`. The turn type is exposed as `ExtractionTurn::direction_modifier`.
|
||||
- `properties.traffic_light_penalty` is deprecated. Traffic light penalties now need to be set over in the turn function.
|
||||
Each turn with a traffic light is marked with `ExtractionTurn::has_traffic_light = true`.
|
||||
- Renamed the helper file `profiles/lib/directional.lua` to `profiles/lib/tags.lua` since it now provides more general tags parsing utility functions.
|
||||
- The car and foot profiles now depend on the helper file `profiles/lib/handlers.lua`.
|
||||
- Infrastructure
|
||||
- Disabled link-time optimized (LTO) builds by default. Enable by passing `-DENABLE_LTO=ON` to `cmake` if you need the performance and know what you are doing.
|
||||
- Datafile versioning is now based on OSRM semver values, rather than source code checksums.
|
||||
Datafiles are compatible between patch levels, but incompatible between minor version or higher bumps.
|
||||
- libOSRM now creates an own watcher thread then used in shared memory mode to listen for data updates
|
||||
- Tools:
|
||||
- Added osrm-extract-conditionals tool for checking conditional values in OSM data
|
||||
- Trip Plugin
|
||||
- Added a new feature that finds the optimal route given a list of waypoints, a source and a destination. This does not return a roundtrip and instead returns a one way optimal route from the fixed source to the destination points.
|
||||
|
||||
# 5.5.1
|
||||
- Changes from 5.5.0
|
||||
- API:
|
||||
- Adds `generate_hints=true` (`true` by default) which lets user disable `Hint` generating in the response. Use if you don't need `Hint`s!
|
||||
- Bugfixes
|
||||
- Fix #3418 and ensure we only return bearings in the range 0-359 in API responses
|
||||
- Fixed a bug that could lead to emitting false instructions for staying on a roundabout
|
||||
|
||||
# 5.5.0
|
||||
- Changes from 5.4.0
|
||||
- API:
|
||||
- `osrm-datastore` now accepts the parameter `--max-wait` that specifies how long it waits before aquiring a shared memory lock by force
|
||||
- Shared memory now allows for multiple clients (multiple instances of libosrm on the same segment)
|
||||
- Polyline geometries can now be requested with precision 5 as well as with precision 6
|
||||
- Profiles
|
||||
- the car profile has been refactored into smaller functions
|
||||
- get_value_by_key() is now guaranteed never to return empty strings, nil is returned instead.
|
||||
- debug.lua was added to make it easier to test/develop profile code.
|
||||
- `car.lua` now depends on lib/set.lua and lib/sequence.lua
|
||||
- `restrictions` is now used for namespaced restrictions and restriction exceptions (e.g. `restriction:motorcar=` as well as `except=motorcar`)
|
||||
- replaced lhs/rhs profiles by using test defined profiles
|
||||
- Handle `oneway=alternating` (routed over with penalty) separately from `oneway=reversible` (not routed over due to time dependence)
|
||||
- Handle `destination:forward`, `destination:backward`, `destination:ref:forward`, `destination:ref:backward` tags
|
||||
- Properly handle destinations on `oneway=-1` roads
|
||||
- Guidance
|
||||
- Notifications are now exposed more prominently, announcing turns onto a ferry/pushing your bike more prominently
|
||||
- Improved turn angle calculation, detecting offsets due to lanes / minor variations due to inaccuracies
|
||||
- Corrected the bearings returned for intermediate steps - requires reprocessing
|
||||
- Improved turn locations for collapsed turns
|
||||
- Sliproad classification refinements: the situations we detect as Sliproads now resemble more closely the reality
|
||||
- Trip Plugin
|
||||
- changed internal behaviour to prefer the smallest lexicographic result over the largest one
|
||||
- Bugfixes
|
||||
- fixed a bug where polyline decoding on a defective polyline could end up in out-of-bound access on a vector
|
||||
- fixed compile errors in tile unit-test framework
|
||||
- fixed a bug that could result in inconsistent behaviour when collapsing instructions
|
||||
- fixed a bug that could result in crashes when leaving a ferry directly onto a motorway ramp
|
||||
- fixed a bug in the tile plugin that resulted in discovering invalid edges for connections
|
||||
- improved error messages when missing files during traffic updates (#3114)
|
||||
- For single coordinate geometries the GeoJSON `Point` encoding was broken. We now always emit `LineString`s even in the one-coordinate-case (backwards compatible) (#3425)
|
||||
- Debug Tiles
|
||||
- Added support for turn penalties
|
||||
- Internals
|
||||
- Internal/Shared memory datafacades now share common memory layout and data loading code
|
||||
- File reading now has much better error handling
|
||||
- Misc
|
||||
- Progress indicators now print newlines when stdout is not a TTY
|
||||
- Prettier API documentation now generated via `npm run build-api-docs` output `build/docs`
|
||||
|
||||
# 5.4.3
|
||||
- Changes from 5.4.2
|
||||
- Bugfixes
|
||||
- #3254 Fixed a bug that could end up hiding roundabout instructions
|
||||
- #3260 fixed a bug that provided the wrong location in the arrival instruction
|
||||
|
||||
# 5.4.2
|
||||
- Changes from 5.4.1
|
||||
- Bugfixes
|
||||
- #3032 Fixed a bug that could result in emitting `invalid` as an instruction type on sliproads with mode changes
|
||||
- #3085 Fixed an outdated assertion that could throw without a cause for concern
|
||||
- #3179 Fixed a bug that could trigger an assertion in TurnInstruciton generation
|
||||
|
||||
# 5.4.1
|
||||
- Changes from 5.4.0
|
||||
- Bugfixes
|
||||
- #3016: Fixes shared memory updates while queries are running
|
||||
|
||||
# 5.4.0
|
||||
- Changes from 5.3.0
|
||||
- Profiles
|
||||
- includes library guidance.lua that offers preliminary configuration on guidance.
|
||||
- added left_hand_driving flag in global profile properties
|
||||
- modified turn penalty function for car profile - better fit to real data
|
||||
- return `ref` and `name` as separate fields. Do no use ref or destination as fallback for name value
|
||||
- the default profile for car now ignores HOV only roads
|
||||
- Guidance
|
||||
- Handle Access tags for lanes, only considering valid lanes in lane-guidance (think car | car | bike | car)
|
||||
- Improved the detection of non-noticeable name-changes
|
||||
- Summaries have been improved to consider references as well
|
||||
- API:
|
||||
- `annotations=true` now returns the data source id for each segment as `datasources`
|
||||
- Reduced semantic of merge to refer only to merges from a lane onto a motorway-like road
|
||||
- new `ref` field in the `RouteStep` object. It contains the reference code or name of a way. Previously merged into the `name` property like `name (ref)` and are now separate fields.
|
||||
- Bugfixes
|
||||
- Fixed an issue that would result in segfaults for viaroutes with an invalid intermediate segment when u-turns were allowed at the via-location
|
||||
- Invalid only_* restrictions could result in loss of connectivity. As a fallback, we assume all turns allowed when the restriction is not valid
|
||||
- Fixed a bug that could result in an infinite loop when finding information about an upcoming intersection
|
||||
- Fixed a bug that led to not discovering if a road simply looses a considered prefix
|
||||
- BREAKING: Fixed a bug that could crash postprocessing of instructions on invalid roundabout taggings. This change requires reprocessing datasets with osrm-extract and osrm-contract
|
||||
- Fixed an issue that could emit `invalid` as instruction when ending on a sliproad after a traffic-light
|
||||
- Fixed an issue that would detect turning circles as sliproads
|
||||
- Fixed a bug where post-processing instructions (e.g. left + left -> uturn) could result in false pronunciations
|
||||
- Fixes a bug where a bearing range of zero would cause exhaustive graph traversals
|
||||
- Fixes a bug where certain looped geometries could cause an infinite loop during extraction
|
||||
- Fixed a bug where some roads could be falsly identified as sliproads
|
||||
- Fixed a bug where roundabout intersections could result in breaking assertions when immediately exited
|
||||
- Infrastructure:
|
||||
- Adds a feature to limit results in nearest service with a default of 100 in `osrm-routed`
|
||||
|
||||
# 5.3.0
|
||||
- Changes from 5.3.0-rc.3
|
||||
- Guidance
|
||||
- Only announce `use lane` on required turns (not using all lanes to go straight)
|
||||
- Moved `lanes` to the intersection objects. This is BREAKING in relation to other Release Candidates but not with respect to other releases.
|
||||
- Bugfixes
|
||||
- Fix BREAKING: bug that could result in failure to load 'osrm.icd' files. This breaks the dataformat
|
||||
- Fix: bug that results in segfaults when `use lane` instructions are suppressed
|
||||
|
||||
- Changes form 5.2.7
|
||||
- API
|
||||
- Introduces new `TurnType` in the form of `use lane`. The type indicates that you have to stick to a lane without turning
|
||||
- Introduces `lanes` to the `Intersection` object. The lane data contains both the markings at the intersection and a flag indicating if they can be chosen for the next turn
|
||||
- Removed unused `-s` from `osrm-datastore`
|
||||
- Guidance
|
||||
- Only announce `use lane` on required turns (not using all lanes to go straight)
|
||||
- Improved detection of obvious turns
|
||||
- Improved turn lane detection
|
||||
- Reduce the number of end-of-road instructions in obvious cases
|
||||
- Profile:
|
||||
- bicycle.lua: Surface speeds never increase the actual speed
|
||||
- Infrastructure
|
||||
- Add 32bit support
|
||||
- Add ARM NEON/VFP support
|
||||
- Fix Windows builds
|
||||
- Optimize speed file updates using mmap
|
||||
- Add option to disable LTO for older compilers
|
||||
- BREAKING: The new turn type changes the turn-type order. This breaks the **data format**.
|
||||
- BREAKING: Turn lane data introduces two new files (osrm.tld,osrm.tls). This breaks the fileformat for older versions.
|
||||
- Bugfixes:
|
||||
- Fix devide by zero on updating speed data using osrm-contract
|
||||
|
||||
# 5.3.0 RC3
|
||||
- Changes from 5.3.0-rc.2
|
||||
- Guidance
|
||||
- Improved detection of obvious turns
|
||||
- Improved turn lane detection
|
||||
- Bugfixes
|
||||
- Fix bug that didn't chose minimal weights on overlapping edges
|
||||
|
||||
# 5.3.0 RC2
|
||||
- Changes from 5.3.0-rc.1
|
||||
- Bugfixes
|
||||
- Fixes invalid checks in the lane-extraction part of the car profile
|
||||
|
||||
# 5.3.0 RC1
|
||||
- API
|
||||
- Introduces new `TurnType` in the form of `use lane`. The type indicates that you have to stick to a lane without turning
|
||||
- Introduces lanes to the route response. The lane data contains both the markings at the intersection and a flag indicating their involvement in the turn
|
||||
|
||||
- Infrastructure
|
||||
- BREAKING: The new turn type changes the turn-type order. This breaks the **data format**.
|
||||
- BREAKING: Turn lane data introduces two new files (osrm.tld,osrm.tls). This breaks the fileformat for older versions.
|
||||
|
||||
# 5.2.5
|
||||
- Bugfixes
|
||||
- Fixes a segfault caused by incorrect trimming logic for very short steps.
|
||||
|
||||
# 5.2.4
|
||||
- Bugfixes:
|
||||
- Fixed in issue that arised on roundabouts in combination with intermediate intersections and sliproads
|
||||
|
||||
# 5.2.3
|
||||
- Bugfixes:
|
||||
- Fixed an issue with name changes in roundabouts that could result in crashes
|
||||
|
||||
# 5.2.2
|
||||
Changes from 5.2.1
|
||||
- Bugfixes:
|
||||
- Buffer overrun in tile plugin response handling
|
||||
|
||||
# 5.2.1
|
||||
Changes from 5.2.0
|
||||
- Bugfixes:
|
||||
- Removed debug statement that was spamming the console
|
||||
|
||||
# 5.2.0
|
||||
Changes from 5.2.0 RC2
|
||||
- Bugfixes:
|
||||
- Fixed crash when loading shared memory caused by invalid OSM IDs segment size.
|
||||
- Various small instructions handling fixes
|
||||
|
||||
Changes from 5.1.0
|
||||
- API:
|
||||
- new parameter `annotations` for `route`, `trip` and `match` requests. Returns additional data about each
|
||||
coordinate along the selected/matched route line per `RouteLeg`:
|
||||
- duration of each segment
|
||||
- distance of each segment
|
||||
- OSM node ids of all segment endpoints
|
||||
- Introducing Intersections for Route Steps. This changes the API format in multiple ways.
|
||||
- `bearing_before`/`bearing_after` of `StepManeuver` are now deprecated and will be removed in the next major release
|
||||
- `location` of `StepManeuvers` is now deprecated and will be removed in the next major release
|
||||
- every `RouteStep` now has property `intersections` containing a list of `Intersection` objects.
|
||||
- Support for destination signs. New member `destinations` in `RouteStep`, based on `destination` and `destination:ref`
|
||||
- Support for name pronunciations. New member `pronunciation` in `RouteStep`, based on `name:pronunciation`
|
||||
|
||||
- Profile changes:
|
||||
- duration parser now accepts P[n]DT[n]H[n]M[n]S, P[n]W, PTHHMMSS and PTHH:MM:SS ISO8601 formats.
|
||||
- `result.destinations` allows you to set a way's destinations
|
||||
- `result.pronunciation` allows you to set way name pronunciations
|
||||
- `highway=motorway_link` no longer implies `oneway` as per the OSM Wiki
|
||||
|
||||
- Infrastructure:
|
||||
- BREAKING: Changed the on-disk encoding of the StaticRTree to reduce ramIndex file size. This breaks the **data format**
|
||||
- BREAKING: Intersection Classification adds a new file to the mix (osrm.icd). This breaks the fileformat for older versions.
|
||||
- Better support for osrm-routed binary upgrade on the fly [UNIX specific]:
|
||||
- Open sockets with SO_REUSEPORT to allow multiple osrm-routed processes serving requests from the same port.
|
||||
- Add SIGNAL_PARENT_WHEN_READY environment variable to enable osrm-routed signal its parent with USR1 when it's running and waiting for requests.
|
||||
- Disable http access logging via DISABLE_ACCESS_LOGGING environment variable.
|
||||
|
||||
- Guidance:
|
||||
- BREAKING: modifies the file format with new internal identifiers
|
||||
- improved detection of turning streets, not reporting new-name in wrong situations
|
||||
- improved handling of sliproads (emit turns instead of 'take the ramp')
|
||||
- improved collapsing of instructions. Some 'new name' instructions will be suppressed if they are without alternative and the segment is short
|
||||
|
||||
- Bugfixes
|
||||
- fixed broken summaries for very short routes
|
||||
|
||||
# 5.2.0 RC2
|
||||
Changes from 5.2.0 RC1
|
||||
|
||||
- Guidance:
|
||||
- improved handling of sliproads (emit turns instead of 'take the ramp')
|
||||
- improved collapsing of instructions. Some 'new name' instructions will be suppressed if they are without alternative and the segment is short
|
||||
- BREAKING: modifies the file format with new internal identifiers
|
||||
|
||||
- API:
|
||||
- paramater `annotate` was renamed to `annotations`.
|
||||
- `annotation` as accidentally placed in `Route` instead of `RouteLeg`
|
||||
- Support for destination signs. New member `destinations` in `RouteStep`, based on `destination` and `destination:ref`
|
||||
- Support for name pronunciations. New member `pronunciation` in `RouteStep`, based on `name:pronunciation`
|
||||
- Add `nodes` property to `annotation` in `RouteLeg` containing the ids of nodes covered by the route
|
||||
|
||||
- Profile changes:
|
||||
- `result.destinations` allows you to set a way's destinations
|
||||
- `result.pronunciation` allows you to set way name pronunciations
|
||||
- `highway=motorway_link` no longer implies `oneway` as per the OSM Wiki
|
||||
|
||||
- Infrastructure
|
||||
- BREAKING: Changed the on-disk encoding of the StaticRTree to reduce ramIndex file size. This breaks the **data format**
|
||||
|
||||
- Bugfixes
|
||||
- fixed broken summaries for very short routes
|
||||
|
||||
# 5.2.0 RC1
|
||||
Changes from 5.1.0
|
||||
|
||||
- API:
|
||||
- new parameter `annotate` for `route` and `match` requests. Returns additional data about each
|
||||
coordinate along the selected/matched route line.
|
||||
- Introducing Intersections for Route Steps. This changes the API format in multiple ways.
|
||||
- `bearing_before`/`bearing_after` of `StepManeuver` are now deprecated and will be removed in the next major release
|
||||
- `location` of `StepManeuvers` is now deprecated and will be removed in the next major release
|
||||
- every `RouteStep` now has property `intersections` containing a list of `Intersection` objects.
|
||||
|
||||
- Profile changes:
|
||||
- duration parser now accepts P[n]DT[n]H[n]M[n]S, P[n]W, PTHHMMSS and PTHH:MM:SS ISO8601 formats.
|
||||
|
||||
- Infrastructure:
|
||||
- Better support for osrm-routed binary upgrade on the fly [UNIX specific]:
|
||||
- Open sockets with SO_REUSEPORT to allow multiple osrm-routed processes serving requests from the same port.
|
||||
- Add SIGNAL_PARENT_WHEN_READY environment variable to enable osrm-routed signal its parent with USR1 when it's running and waiting for requests.
|
||||
- BREAKING: Intersection Classification adds a new file to the mix (osrm.icd). This breaks the fileformat for older versions.
|
||||
- Disable http access logging via DISABLE_ACCESS_LOGGING environment
|
||||
variable.
|
||||
|
||||
- Guidance:
|
||||
- improved detection of turning streets, not reporting new-name in wrong situations
|
||||
|
||||
# 5.1.0
|
||||
Changes with regard to 5.0.0
|
||||
|
||||
- API:
|
||||
- added StepManeuver type `roundabout turn`. The type indicates a small roundabout that is treated as an intersection
|
||||
(turn right at the roundabout for first exit, go straight at the roundabout...)
|
||||
- added StepManeuver type `on ramp` and `off ramp` to distinguish between ramps that enter and exit a highway.
|
||||
- reduced new name instructions for trivial changes
|
||||
- combined multiple turns into a single instruction at segregated roads`
|
||||
|
||||
- Profile Changes:
|
||||
- introduced a suffix_list / get_name_suffix_list to specify name suffices to be suppressed in name change announcements
|
||||
- street names are now consistently assembled for the car, bike and walk profile as: "Name (Ref)" as in "Berlin (A5)"
|
||||
- new `car.lua` dependency `lib/destination.lua`
|
||||
- register a way's .nodes() function for use in the profile's way_function.
|
||||
|
||||
- Infrastructure
|
||||
- BREAKING: reordered internal instruction types. This breaks the **data format**
|
||||
- BREAKING: Changed the on-disk encoding of the StaticRTree for better performance. This breaks the **data format**
|
||||
|
||||
- Fixes:
|
||||
- Issue #2310: post-processing for local paths, fixes #2310
|
||||
- Issue #2309: local path looping, fixes #2309
|
||||
- Issue #2356: Make hint values optional
|
||||
- Issue #2349: Segmentation fault in some requests
|
||||
- Issue #2335: map matching was using shortest path with uturns disabled
|
||||
- Issue #2193: Fix syntax error position indicators in parameters queries
|
||||
- Fix search with u-turn
|
||||
- PhantomNode packing in MSVC now the same on other platforms
|
||||
- Summary is now not malformed when including unnamed roads
|
||||
- Emit new-name on when changing fron unanmed road to named road
|
||||
|
||||
# 5.0.0
|
||||
Changes with regard 5.0.0 RC2:
|
||||
- API:
|
||||
- if `geometry=geojson` is passed the resulting geometry can be a LineString or Point
|
||||
depending on how many coordinates are present.
|
||||
- the removal of the summary field was revered. for `steps=flase` the field will always be an empty string.
|
||||
|
||||
Changes with regard to 4.9.1:
|
||||
- API:
|
||||
- BREAKING: Complete rewrite of the HTTP and library API. See detailed documentation in the wiki.
|
||||
- BREAKING: The default coordinate order is now `longitude, latidue`. Exception: Polyline geometry
|
||||
which follow the original Google specification of `latitdue, longitude`.
|
||||
- BREAKING: Polyline geometries now use precision 5, instead of previously 6
|
||||
- BREAKING: Removed GPX support
|
||||
- New service `tile` which serves debug vector tiles of the road network
|
||||
- Completely new engine for guidance generation:
|
||||
- Support for highway ramps
|
||||
- Support for different intersection types (end of street, forks, merges)
|
||||
- Instruction post-processing to merge unimportant instructions
|
||||
- Improved handling of roundabouts
|
||||
|
||||
- Tools:
|
||||
- BREAKING: Renamed osrm-prepare to osrm-contract
|
||||
- BREAKING: Removes profiles from osrm-contract, only needed in osrm-extract.
|
||||
- Abort processing in osrm-extract if there are no snappable edges remaining.
|
||||
- Added .properties file to osrm-extract ouput.
|
||||
- Enables the use of multiple segment-speed-files on the osrm-contract command line
|
||||
|
||||
- Profile changes:
|
||||
- Remove movable bridge mode
|
||||
- Add `maxspeed=none` tag to car profile.
|
||||
- A `side_road` tag support for the OSRM car profile.
|
||||
|
||||
- Fixes:
|
||||
- Issue #2150: Prevents routing over delivery ways and nodes
|
||||
- Issue #1972: Provide uninstall target
|
||||
- Issue #2072: Disable alternatives by default and if core factor < 1.0
|
||||
- Issue #1999: Fix unpacking for self-loop nodes not in core.
|
||||
|
||||
- Infrastructure:
|
||||
- Cucumber test suit is now based on cucumber-js, removes Ruby as dependency
|
||||
- Updated to mapbox/variant v1.1
|
||||
- Updated to libosmium v2.6.1
|
||||
- Remove GeoJSON based debugging output, replaced by debug tiles
|
||||
|
||||
|
||||
# 5.0.0 RC2
|
||||
- Profiles:
|
||||
- `properties.allow_uturns_at_via` -> `properties.continue_straight_at_waypoint` (value is inverted!)
|
||||
- API:
|
||||
- Removed summary from legs property
|
||||
- Disable steps and alternatives by default
|
||||
- Fix `code` field: 'ok' -> 'Ok'
|
||||
- Allow 4.json and 4.3.json format
|
||||
- Conform to v5 spec and support "unlimited" as radiuses value.
|
||||
- `uturns` parameter was replaced by `continue_straight` (value is inverted!)
|
||||
- Features:
|
||||
- Report progress for gennerating edge expanded edges in the edge based graph factory
|
||||
- Add maxspeed=none tag to car profile.
|
||||
- Optimize StaticRTree code: speedup 2x (to RC1)
|
||||
- Optimize DouglasPeucker code: speedup 10x (to RC1)
|
||||
- Optimize WebMercator projection: speedup 2x (to RC1)
|
||||
- Bugs:
|
||||
- #2195: Resolves issues with multiple includedirs in pkg-config file
|
||||
- #2219: Internal server error when using the match plugin
|
||||
- #2027: basename -> filename
|
||||
- #2168: Report correct position where parsing failed
|
||||
- #2036: Add license to storage and storage config exposed in public API
|
||||
- Fix uturn detection in match plugin
|
||||
- Add missing -lz to fix linking of server-tests
|
||||
|
||||
# 5.0.0 RC1
|
||||
- Renamed osrm-prepare into osrm-contract
|
||||
- osrm-contract does not need a profile parameter anymore
|
||||
- New public HTTP API, find documentation [here](https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api)
|
||||
- POST support is discontinued, please use library bindings for more complex requests
|
||||
- Removed timestamp plugin
|
||||
- Coordinate order is now Longitude,Latitude
|
||||
- Cucumber tests now based on Javascript (run with `npm test`)
|
||||
- Profile API changed:
|
||||
- `forward_mode` and `backward_mode` now need to be selected from a pre-defined list
|
||||
- Global profile properties are now stored in a global `properties` element. This includes:
|
||||
- `properties.traffic_signal_penalty`
|
||||
- `properties.use_turn_restrictions`
|
||||
- `properties.u_turn_penalty`
|
||||
- `properties.allow_u_turn_at_via`
|
||||
|
||||
+643
-244
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,77 @@
|
||||
# User
|
||||
|
||||
Before you open a new issue, please search for older ones that cover the same issue.
|
||||
In general "me too" comments/issues are frowned upon.
|
||||
You can add a :+1: emoji to the issue if you want to express interest in this.
|
||||
|
||||
# Developer
|
||||
|
||||
We use `clang-format` version `3.8` to consistently format the code base. There is a helper script under `scripts/format.sh`.
|
||||
The format is automatically checked by the `mason-linux-release` job of a Travis CI build.
|
||||
To save development time a local hook `.git/hooks/pre-push`
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
remote="$1"
|
||||
if [ x"$remote" = xorigin ] ; then
|
||||
if [ $(git rev-parse --abbrev-ref HEAD) = master ] ; then
|
||||
echo "Rejected push to $remote/master" ; exit 1
|
||||
fi
|
||||
|
||||
./scripts/format.sh
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Unstaged format changes" ; exit 1
|
||||
fi
|
||||
fi
|
||||
```
|
||||
could check code format, modify a local repository and reject push due to unstaged formatting changes.
|
||||
Also `pre-push` hook rejects direct pushes to `origin/master`.
|
||||
|
||||
⚠️ `scripts/format.sh` checks all local files that match `*.cpp` or `*.hpp` patterns.
|
||||
|
||||
|
||||
In general changes that affect the API and/or increase the memory consumption need to be discussed first.
|
||||
Often we don't include changes that would increase the memory consumption a lot if they are not generally usable (e.g. elevation data is a good example).
|
||||
|
||||
## Pull Request
|
||||
|
||||
Every pull-request that changes the API needs to update the docs in `docs/http.md` and add an entry to `CHANGELOG.md`.
|
||||
Breaking changes need to have a BREAKING prefix. See the [releasing documentation](docs/releasing.md) on how this affects the version.
|
||||
|
||||
Early feedback is also important.
|
||||
You will see that a lot of the PR have tags like `[not ready]` or `[wip]`.
|
||||
We like to open PRs as soon as we are starting to work on something to make it visible to the rest of the team.
|
||||
If your work is going in entirely the wrong direction, there is a good chance someone will pick up on this before it is too late.
|
||||
Everyone is encouraged to read PRs of other people and give feedback.
|
||||
|
||||
For every significant code change we require a pull request review before it is merged.
|
||||
If your pull request modifies the API this need to be signed of by a team discussion.
|
||||
This means you will need to find another member of the team with commit access and request a review of your pull request.
|
||||
|
||||
Once your pull request is reviewed you can merge it! If you don't have commit access, ping someone that has commit access.
|
||||
If you do have commit access there are in general two accepted styles to merging:
|
||||
|
||||
1. Make sure the branch is up to date with `master`. Run `git rebase master` to find out.
|
||||
2. Once that is ensured you can either:
|
||||
- Click the nice green merge button (for a non-fast-forward merge)
|
||||
- Merge by hand using a fast-forward merge
|
||||
|
||||
Which merge you prefer is up to personal preference. In general it is recommended to use fast-forward merges because it creates a history that is sequential and easier to understand.
|
||||
|
||||
# Maintainer
|
||||
|
||||
## Doing a release
|
||||
|
||||
There is an in-depth guide around how to push out a release once it is ready [here](docs/releasing.md).
|
||||
|
||||
## The API
|
||||
|
||||
Changes to the API need to be discussed and signed off by the team. Breaking changes even more so than additive changes.
|
||||
|
||||
## Milestones
|
||||
|
||||
If a pull request or an issue is applicable for the current or next milestone, depends on the target version number.
|
||||
Since we use semantic versioning we restrict breaking changes to major releases.
|
||||
After a Release Candidate is released we usually don't change the API anymore if it is not critical.
|
||||
Bigger code changes after a RC was released should also be avoided.
|
||||
|
||||
@@ -18,6 +18,7 @@ RECURSIVE = YES
|
||||
|
||||
EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/third_party \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/build \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/node_modules \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/unit_tests \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/benchmarks \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/features
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
source "http://rubygems.org"
|
||||
|
||||
gem "cucumber"
|
||||
gem "rake"
|
||||
gem "osmlib-base"
|
||||
gem "sys-proctable"
|
||||
gem "rspec-expectations"
|
||||
@@ -1,35 +0,0 @@
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
builder (3.2.2)
|
||||
cucumber (2.0.0)
|
||||
builder (>= 2.1.2)
|
||||
cucumber-core (~> 1.1.3)
|
||||
diff-lcs (>= 1.1.3)
|
||||
gherkin (~> 2.12)
|
||||
multi_json (>= 1.7.5, < 2.0)
|
||||
multi_test (>= 0.1.2)
|
||||
cucumber-core (1.1.3)
|
||||
gherkin (~> 2.12.0)
|
||||
diff-lcs (1.2.5)
|
||||
gherkin (2.12.2)
|
||||
multi_json (~> 1.3)
|
||||
multi_json (1.11.0)
|
||||
multi_test (0.1.2)
|
||||
osmlib-base (0.1.4)
|
||||
rake (10.4.2)
|
||||
rspec-expectations (3.2.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.2.0)
|
||||
rspec-support (3.2.2)
|
||||
sys-proctable (0.9.8)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
cucumber
|
||||
osmlib-base
|
||||
rake
|
||||
rspec-expectations
|
||||
sys-proctable
|
||||
@@ -1,25 +1,118 @@
|
||||
## About
|
||||
## Open Source Routing Machine
|
||||
|
||||
The Open Source Routing Machine is a high performance routing engine written in C++11 designed to run on OpenStreetMap data.
|
||||
| Linux / macOS | Windows | Code Coverage |
|
||||
| ------------- | ------- | ------------- |
|
||||
| [](https://travis-ci.org/Project-OSRM/osrm-backend) | [](https://ci.appveyor.com/project/DennisOSRM/osrm-backend) | [](https://codecov.io/gh/Project-OSRM/osrm-backend) |
|
||||
|
||||
## Current build status
|
||||
High performance routing engine written in C++14 designed to run on OpenStreetMap data.
|
||||
|
||||
| build config | branch | status |
|
||||
|:-------------|:--------|:------------|
|
||||
| Linux | master | [](https://travis-ci.org/Project-OSRM/osrm-backend) |
|
||||
| Linux | develop | [](https://travis-ci.org/Project-OSRM/osrm-backend) |
|
||||
| Windows | master/develop | [](https://ci.appveyor.com/project/DennisOSRM/osrm-backend) |
|
||||
| LUAbind fork | master | [](https://travis-ci.org/DennisOSRM/luabind) |
|
||||
The following services are available via HTTP API, C++ library interface and NodeJs wrapper:
|
||||
- Nearest - Snaps coordinates to the street network and returns the nearest matches
|
||||
- Route - Finds the fastest route between coordinates
|
||||
- Table - Computes the duration of the fastest route between all pairs of supplied coordinates
|
||||
- Match - Snaps noisy GPS traces to the road network in the most plausible way
|
||||
- Trip - Solves the Traveling Salesman Problem using a greedy heuristic
|
||||
- Tile - Generates Mapbox Vector Tiles with internal routing metadata
|
||||
|
||||
## Building
|
||||
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 instructions on how to [build](https://github.com/Project-OSRM/osrm-backend/wiki/Building-OSRM) and [run OSRM](https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM), please consult [the Wiki](https://github.com/Project-OSRM/osrm-backend/wiki).
|
||||
|
||||
To quickly try OSRM use our [free and daily updated online service](http://map.project-osrm.org)
|
||||
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
|
||||
- [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
|
||||
- [osrm-backend-docker](https://hub.docker.com/r/osrm/osrm-backend/) - Ready to use Docker images
|
||||
|
||||
## Documentation
|
||||
|
||||
See the Wiki's [server API documentation](https://github.com/Project-OSRM/osrm-backend/wiki/Server-api) as well as the [library API documentation](https://github.com/Project-OSRM/osrm-backend/wiki/Library-api)
|
||||
### Full documentation
|
||||
|
||||
- [Hosted documentation](http://project-osrm.org)
|
||||
- [osrm-routed HTTP API documentation](docs/http.md)
|
||||
- [libosrm API documentation](docs/libosrm.md)
|
||||
|
||||
## Contact
|
||||
|
||||
- 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 backend is to use Docker images we provide.
|
||||
|
||||
### Using Docker
|
||||
|
||||
We base [our Docker images](https://hub.docker.com/r/osrm/osrm-backend/) on Alpine Linux and make sure they are as lightweight as possible.
|
||||
|
||||
```
|
||||
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
|
||||
|
||||
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
|
||||
|
||||
curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
## References in publications
|
||||
|
||||
@@ -43,4 +136,3 @@ When using the code in a (scientific) publication, please cite
|
||||
address = {New York, NY, USA},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
require 'OSM/StreamParser'
|
||||
require 'socket'
|
||||
require 'digest/sha1'
|
||||
require 'cucumber/rake/task'
|
||||
require 'sys/proctable'
|
||||
|
||||
BUILD_FOLDER = 'build'
|
||||
DATA_FOLDER = 'sandbox'
|
||||
PROFILE = 'bicycle'
|
||||
OSRM_PORT = 5000
|
||||
PROFILES_FOLDER = '../profiles'
|
||||
|
||||
Cucumber::Rake::Task.new do |t|
|
||||
t.cucumber_opts = %w{--format pretty}
|
||||
end
|
||||
|
||||
areas = {
|
||||
:kbh => { :country => 'denmark', :bbox => 'top=55.6972 left=12.5222 right=12.624 bottom=55.6376' },
|
||||
:frd => { :country => 'denmark', :bbox => 'top=55.7007 left=12.4765 bottom=55.6576 right=12.5698' },
|
||||
:regh => { :country => 'denmark', :bbox => 'top=56.164 left=11.792 bottom=55.403 right=12.731' },
|
||||
:denmark => { :country => 'denmark', :bbox => nil },
|
||||
:skaane => { :country => 'sweden', :bbox => 'top=56.55 left=12.4 bottom=55.3 right=14.6' }
|
||||
}
|
||||
|
||||
|
||||
|
||||
osm_data_area_name = ARGV[1] ? ARGV[1].to_s.to_sym : :kbh
|
||||
raise "Unknown data area." unless areas[osm_data_area_name]
|
||||
osm_data_country = areas[osm_data_area_name][:country]
|
||||
osm_data_area_bbox = areas[osm_data_area_name][:bbox]
|
||||
|
||||
|
||||
task osm_data_area_name.to_sym {} #define empty task to prevent rake from whining. will break if area has same name as a task
|
||||
|
||||
|
||||
def each_process name, &block
|
||||
Sys::ProcTable.ps do |process|
|
||||
if process.comm.strip == name.strip && process.state != 'zombie'
|
||||
yield process.pid.to_i, process.state.strip
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def up?
|
||||
find_pid('osrm-routed') != nil
|
||||
end
|
||||
|
||||
def find_pid name
|
||||
each_process(name) { |pid,state| return pid.to_i }
|
||||
return nil
|
||||
end
|
||||
|
||||
def wait_for_shutdown name
|
||||
timeout = 10
|
||||
(timeout*10).times do
|
||||
return if find_pid(name) == nil
|
||||
sleep 0.1
|
||||
end
|
||||
raise "*** Could not terminate #{name}."
|
||||
end
|
||||
|
||||
|
||||
desc "Rebuild and run tests."
|
||||
task :default => [:build]
|
||||
|
||||
desc "Build using CMake."
|
||||
task :build do
|
||||
if Dir.exists? BUILD_FOLDER
|
||||
Dir.chdir BUILD_FOLDER do
|
||||
system "make"
|
||||
end
|
||||
else
|
||||
system "mkdir build; cd build; cmake ..; make"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Setup config files."
|
||||
task :setup do
|
||||
end
|
||||
|
||||
desc "Download OSM data."
|
||||
task :download do
|
||||
Dir.mkdir "#{DATA_FOLDER}" unless File.exist? "#{DATA_FOLDER}"
|
||||
puts "Downloading..."
|
||||
puts "curl http://download.geofabrik.de/europe/#{osm_data_country}-latest.osm.pbf -o #{DATA_FOLDER}/#{osm_data_country}.osm.pbf"
|
||||
raise "Error while downloading data." unless system "curl http://download.geofabrik.de/europe/#{osm_data_country}-latest.osm.pbf -o #{DATA_FOLDER}/#{osm_data_country}.osm.pbf"
|
||||
if osm_data_area_bbox
|
||||
puts "Cropping and converting to protobuffer..."
|
||||
raise "Error while cropping data." unless system "osmosis --read-pbf file=#{DATA_FOLDER}/#{osm_data_country}.osm.pbf --bounding-box #{osm_data_area_bbox} --write-pbf file=#{DATA_FOLDER}/#{osm_data_area_name}.osm.pbf omitmetadata=true"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Crop OSM data"
|
||||
task :crop do
|
||||
if osm_data_area_bbox
|
||||
raise "Error while cropping data." unless system "osmosis --read-pbf file=#{DATA_FOLDER}/#{osm_data_country}.osm.pbf --bounding-box #{osm_data_area_bbox} --write-pbf file=#{DATA_FOLDER}/#{osm_data_area_name}.osm.pbf omitmetadata=true"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Reprocess OSM data."
|
||||
task :process => [:extract,:contract] do
|
||||
end
|
||||
|
||||
desc "Extract OSM data."
|
||||
task :extract do
|
||||
Dir.chdir DATA_FOLDER do
|
||||
raise "Error while extracting data." unless system "../#{BUILD_FOLDER}/osrm-extract #{osm_data_area_name}.osm.pbf --profile ../profiles/#{PROFILE}.lua"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Contract OSM data."
|
||||
task :contract do
|
||||
Dir.chdir DATA_FOLDER do
|
||||
raise "Error while contracting data." unless system "../#{BUILD_FOLDER}/osrm-contract #{osm_data_area_name}.osrm"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Delete preprocessing files."
|
||||
task :clean do
|
||||
File.delete *Dir.glob("#{DATA_FOLDER}/*.osrm")
|
||||
File.delete *Dir.glob("#{DATA_FOLDER}/*.osrm.*")
|
||||
end
|
||||
|
||||
desc "Run all cucumber test"
|
||||
task :test do
|
||||
system "cucumber"
|
||||
puts
|
||||
end
|
||||
|
||||
desc "Run the routing server in the terminal. Press Ctrl-C to stop."
|
||||
task :run do
|
||||
Dir.chdir DATA_FOLDER do
|
||||
system "../#{BUILD_FOLDER}/osrm-routed #{osm_data_area_name}.osrm --port #{OSRM_PORT}"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Launch the routing server in the background. Use rake:down to stop it."
|
||||
task :up do
|
||||
Dir.chdir DATA_FOLDER do
|
||||
abort("Already up.") if up?
|
||||
pipe = IO.popen("../#{BUILD_FOLDER}/osrm-routed #{osm_data_area_name}.osrm --port #{OSRM_PORT} 1>>osrm-routed.log 2>>osrm-routed.log")
|
||||
timeout = 5
|
||||
(timeout*10).times do
|
||||
begin
|
||||
socket = TCPSocket.new('localhost', OSRM_PORT)
|
||||
socket.puts 'ping'
|
||||
rescue Errno::ECONNREFUSED
|
||||
sleep 0.1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "Stop the routing server."
|
||||
task :down do
|
||||
pid = find_pid 'osrm-routed'
|
||||
if pid
|
||||
Process.kill 'TERM', pid
|
||||
else
|
||||
puts "Already down."
|
||||
end
|
||||
end
|
||||
|
||||
desc "Kill all osrm-extract, osrm-contract and osrm-routed processes."
|
||||
task :kill do
|
||||
each_process('osrm-routed') { |pid,state| Process.kill 'KILL', pid }
|
||||
each_process('osrm-contract') { |pid,state| Process.kill 'KILL', pid }
|
||||
each_process('osrm-extract') { |pid,state| Process.kill 'KILL', pid }
|
||||
wait_for_shutdown 'osrm-routed'
|
||||
wait_for_shutdown 'osrm-contract'
|
||||
wait_for_shutdown 'osrm-extract'
|
||||
end
|
||||
|
||||
desc "Get PIDs of all osrm-extract, osrm-contract and osrm-routed processes."
|
||||
task :pid do
|
||||
each_process 'osrm-routed' do |pid,state|
|
||||
puts "#{pid}\t#{state}"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Stop, reprocess and restart."
|
||||
task :update => [:down,:process,:up] do
|
||||
end
|
||||
|
||||
|
||||
desc "Remove test cache files."
|
||||
task :sweep do
|
||||
system "rm test/cache/*"
|
||||
end
|
||||
|
||||
+77
-10
@@ -8,16 +8,39 @@ SET PROJECT_DIR=%CD%
|
||||
ECHO PROJECT_DIR^: %PROJECT_DIR%
|
||||
ECHO NUMBER_OF_PROCESSORS^: %NUMBER_OF_PROCESSORS%
|
||||
ECHO cmake^: && cmake --version
|
||||
IF %ERRORLEVEL% NEQ 0 ECHO CMAKE not found && GOTO CMAKE_NOT_OK
|
||||
|
||||
cmake --version | findstr /C:"3.7.1" && GOTO CMAKE_OK
|
||||
|
||||
:CMAKE_NOT_OK
|
||||
SET CMAKE_VERSION=3.7.1
|
||||
ECHO CMAKE NOT OK - downloading new CMake %CMAKE_VERSION%
|
||||
IF NOT EXIST cm.zip powershell Invoke-WebRequest https://cmake.org/files/v3.7/cmake-%CMAKE_VERSION%-win32-x86.zip -OutFile $env:PROJECT_DIR\cm.zip
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
IF NOT EXIST cmake-%CMAKE_VERSION%-win32-x86 7z -y x cm.zip | %windir%\system32\FIND "ing archive"
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
SET PATH=%PROJECT_DIR%\cmake-%CMAKE_VERSION%-win32-x86\bin;%PATH%
|
||||
|
||||
:CMAKE_OK
|
||||
ECHO CMAKE_OK
|
||||
cmake --version
|
||||
|
||||
ECHO activating VS command prompt ...
|
||||
SET PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
|
||||
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
|
||||
|
||||
ECHO platform^: %platform%
|
||||
|
||||
ECHO cl.exe version
|
||||
cl
|
||||
ECHO msbuild version
|
||||
msbuild /version
|
||||
|
||||
:: HARDCODE "x64" as it is uppercase on AppVeyor and download from S3 is case sensitive
|
||||
SET DEPSPKG=osrm-deps-win-x64-14.0.7z
|
||||
|
||||
:: local development
|
||||
ECHO.
|
||||
ECHO LOCAL_DEV^: %LOCAL_DEV%
|
||||
IF NOT DEFINED LOCAL_DEV SET LOCAL_DEV=0
|
||||
IF DEFINED LOCAL_DEV IF %LOCAL_DEV% EQU 1 IF EXIST %DEPSPKG% ECHO skipping deps download && GOTO SKIPDL
|
||||
@@ -33,27 +56,39 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
IF EXIST osrm-deps ECHO deleting osrm-deps... && RD /S /Q osrm-deps
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
IF EXIST build ECHO deletings build dir... && RD /S /Q build
|
||||
IF EXIST build ECHO deleting build dir... && RD /S /Q build
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
7z -y x %DEPSPKG% | %windir%\system32\FIND "ing archive"
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
::tree osrm-deps
|
||||
|
||||
MKDIR build
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
cd build
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
SET OSRMDEPSDIR=%PROJECT_DIR%\osrm-deps
|
||||
SET OSRMDEPSDIR=%PROJECT_DIR%/osrm-deps
|
||||
set PREFIX=%OSRMDEPSDIR%/libs
|
||||
set BOOST_ROOT=%OSRMDEPSDIR%/boost
|
||||
set BOOST_LIBRARYDIR=%BOOST_ROOT%/lib
|
||||
set TBB_INSTALL_DIR=%OSRMDEPSDIR%/tbb
|
||||
set TBB_ARCH_PLATFORM=intel64/vc14
|
||||
|
||||
ECHO OSRMDEPSDIR ^: %OSRMDEPSDIR%
|
||||
ECHO PREFIX ^: %PREFIX%
|
||||
ECHO BOOST_ROOT ^: %BOOST_ROOT%
|
||||
ECHO BOOST_LIBRARYDIR ^: %BOOST_LIBRARYDIR%
|
||||
ECHO TBB_INSTALL_DIR ^: %TBB_INSTALL_DIR%
|
||||
ECHO TBB_ARCH_PLATFORM ^: %TBB_ARCH_PLATFORM%
|
||||
|
||||
|
||||
ECHO calling cmake ....
|
||||
cmake .. ^
|
||||
-G "Visual Studio 14 2015 Win64" ^
|
||||
-DBOOST_ROOT=%BOOST_ROOT% ^
|
||||
-DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% ^
|
||||
-DBoost_ADDITIONAL_VERSIONS=1.58 ^
|
||||
-DBoost_USE_MULTITHREADED=ON ^
|
||||
-DBoost_USE_STATIC_LIBS=ON ^
|
||||
@@ -81,17 +116,49 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
SET PATH=%PROJECT_DIR%\osrm-deps\libs\bin;%PATH%
|
||||
|
||||
ECHO running engine-tests.exe ...
|
||||
%Configuration%\engine-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
ECHO running extractor-tests.exe ...
|
||||
%Configuration%\extractor-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
ECHO running util-tests.exe ...
|
||||
%Configuration%\util-tests.exe
|
||||
unit_tests\%Configuration%\extractor-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
IF NOT "%APPVEYOR_REPO_BRANCH%"=="develop" GOTO DONE
|
||||
ECHO running engine-tests.exe ...
|
||||
unit_tests\%Configuration%\engine-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
ECHO running util-tests.exe ...
|
||||
unit_tests\%Configuration%\util-tests.exe
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
ECHO running server-tests.exe ...
|
||||
unit_tests\%Configuration%\server-tests.exe
|
||||
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%
|
||||
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 ==========
|
||||
|
||||
CD %PROJECT_DIR%\build\%Configuration%
|
||||
|
||||
+11
-8
@@ -3,6 +3,9 @@ environment:
|
||||
- configuration: Release
|
||||
# - configuration: Debug
|
||||
|
||||
install:
|
||||
- ps: Install-Product node 6
|
||||
|
||||
# scripts that are called at very beginning, before repo cloning
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
@@ -17,7 +20,14 @@ platform: x64
|
||||
build_script:
|
||||
- CALL appveyor-build.bat
|
||||
|
||||
test: off
|
||||
before_test:
|
||||
- node --version
|
||||
- npm --version
|
||||
- npm install --ignore-scripts
|
||||
- npm link --ignore-scripts
|
||||
- SET PATH=%CD%\osrm-deps\libs\bin;%PATH%
|
||||
- SET OSRM_BUILD_DIR=build\%Configuration%
|
||||
- npm test
|
||||
|
||||
artifacts:
|
||||
- path: osrm_Release.zip
|
||||
@@ -28,7 +38,6 @@ artifacts:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
|
||||
deploy:
|
||||
provider: FTP
|
||||
@@ -41,9 +50,3 @@ deploy:
|
||||
folder: /
|
||||
enable_ssl: true
|
||||
active_mode: false
|
||||
|
||||
# notifications:
|
||||
# - provider: HipChat
|
||||
# auth_token:
|
||||
# secure: boLE7BjcahdIUxv9jkN7U3F8iOASF+MkhtctlVoWJoo=
|
||||
# room: Directions
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ SET CONFIGURATION=Release
|
||||
FOR /F "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do SET APPVEYOR_REPO_BRANCH=%%i
|
||||
ECHO APPVEYOR_REPO_BRANCH^: %APPVEYOR_REPO_BRANCH%
|
||||
|
||||
SET PATH=C:\mb\windows-builds-64\tmp-bin\cmake-3.4.0-win32-x86\bin;%PATH%
|
||||
SET PATH=C:\mb\windows-builds-64\tmp-bin\cmake-3.7.0-rc2-win32-x86\bin;%PATH%
|
||||
SET PATH=C:\Program Files\7-Zip;%PATH%
|
||||
|
||||
powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
"Description": "user for publishing to s3://mapbox-node-binary/osrm",
|
||||
"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": [
|
||||
"osrm/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"PolicyName": "publish",
|
||||
"PolicyDocument": {
|
||||
"Statement": [
|
||||
{
|
||||
"Action": [
|
||||
"s3:DeleteObject",
|
||||
"s3:GetObject",
|
||||
"s3:GetObjectAcl",
|
||||
"s3:PutObject",
|
||||
"s3:PutObjectAcl"
|
||||
],
|
||||
"Effect": "Allow",
|
||||
"Resource": "arn:aws:s3:::mapbox-node-binary/osrm/*"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"AccessKey": {
|
||||
"Type": "AWS::IAM::AccessKey",
|
||||
"Properties": {
|
||||
"UserName": {
|
||||
"Ref": "User"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Outputs": {
|
||||
"AccessKeyId": {
|
||||
"Value": {
|
||||
"Ref": "AccessKey"
|
||||
}
|
||||
},
|
||||
"SecretAccessKey": {
|
||||
"Value": {
|
||||
"Fn::GetAtt": [
|
||||
"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')
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
MESSAGE(FATAL_ERROR "Cannot configure CPack to generate Debian/RPM packages on non-linux systems.")
|
||||
ENDIF()
|
||||
string(TOLOWER "${CMAKE_PROJECT_NAME}" CPACK_PACKAGE_NAME)
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${OSRM_VERSION_MAJOR})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${OSRM_VERSION_MINOR})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${OSRM_VERSION_PATCH})
|
||||
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
|
||||
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "FALSE")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Source Routing Machine (OSRM) is a high-performance routing engine. It combines sophisticated routing algorithms with the open and free data of the OpenStreetMap.")
|
||||
SET(CPACK_PACKAGE_CONTACT "Project OSRM <info@project-osrm.org>")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENCE.TXT")
|
||||
|
||||
SET(CPACK_STRIP_FILES "TRUE")
|
||||
file(GLOB_RECURSE ProfileGlob ${CMAKE_SOURCE_DIR}/profiles/*)
|
||||
install(FILES ${ProfileGlob} DESTINATION "share/doc/${CPACK_PACKAGE_NAME}/profiles")
|
||||
|
||||
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
|
||||
if(DPKG_PROGRAM)
|
||||
SET(CPACK_GENERATOR "DEB")
|
||||
execute_process(
|
||||
COMMAND ${DPKG_PROGRAM} --print-architecture
|
||||
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS "ON")
|
||||
else(DPKG_PROGRAM)
|
||||
find_program(RPM_PROGRAM rpm DOC "rpm RPM-based systems")
|
||||
find_program(RPMBUILD_PROGRAM rpm DOC "rpm RPM-based systems")
|
||||
if(RPMBUILD_PROGRAM)
|
||||
SET(CPACK_GENERATOR "RPM")
|
||||
execute_process(
|
||||
COMMAND ${RPM_PROGRAM} --eval %{_arch}
|
||||
OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}.${CPACK_RPM_PACKAGE_ARCHITECTURE}")
|
||||
# Exclude /usr/lib64/pkgconfig directory given that it is already owned by the pkg-config rpm package.
|
||||
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
endif(RPMBUILD_PROGRAM)
|
||||
endif(DPKG_PROGRAM)
|
||||
@@ -1,41 +0,0 @@
|
||||
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
MESSAGE(FATAL_ERROR "Cannot configure CPack to generate Debian packages on non-linux systems.")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(FindDebArch)
|
||||
|
||||
SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENCE.TXT")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CPACK_RESOURCE_FILE_README}")
|
||||
SET(CPACK_PACKAGE_UPSTREAM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
|
||||
SET(CPACK_PACKAGE_DEBIAN_REVISION "1")
|
||||
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_UPSTREAM_VERSION}-${CPACK_PACKAGE_DEBIAN_REVISION}")
|
||||
|
||||
string(TOLOWER "${CMAKE_PROJECT_NAME}" LOWER_PROJECT_NAME)
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${LOWER_PROJECT_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${LOWER_PROJECT_NAME}_${CPACK_PACKAGE_UPSTREAM_VERSION}_orig")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Source Routing Machine (OSRM).")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION "Open Source Routing Machine (OSRM) is a routing engine.")
|
||||
|
||||
# To create a proper Debian/Ubuntu package, the following CMake
|
||||
# options should be used:
|
||||
|
||||
SET(CPACK_STRIP_FILES "TRUE")
|
||||
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "FALSE")
|
||||
SET(CPACK_GENERATOR "DEB")
|
||||
|
||||
SET(CPACK_DEBIAN_PACKAGE_NAME "${CPACK_PACKAGE_NAME}${VERSION_SUFFIX}")
|
||||
SET(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Dennis Luxen <info@project-osrm.org>")
|
||||
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Open Source Routing Machine (OSRM) is a high-performance routing engine.
|
||||
It combines sophisticated routing algorithms with the open and free data of the OpenStreetMap."
|
||||
)
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6-dev, libbz2-1.0, libstxxl1, libxml2, libzip2, liblua5.1-0, libtbb2, libboost-all-dev")
|
||||
|
||||
file(GLOB_RECURSE ProfileGlob ${CMAKE_SOURCE_DIR}/profiles/*)
|
||||
install(FILES ${ProfileGlob} DESTINATION "share/doc/${LOWER_PROJECT_NAME}/profiles")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_BINARY_DIR}/copyright;")
|
||||
|
||||
MESSAGE(STATUS "Debian Package: ${CPACK_DEBIAN_PACKAGE_NAME} (${CPACK_DEBIAN_PACKAGE_VERSION}) [${CPACK_PACKAGE_FILE_NAME}.deb]")
|
||||
@@ -0,0 +1,194 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindLua
|
||||
# -------
|
||||
#
|
||||
#
|
||||
#
|
||||
# Locate Lua library This module defines
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# LUA_FOUND - if false, do not try to link to Lua
|
||||
# LUA_LIBRARIES - both lua and lualib
|
||||
# LUA_INCLUDE_DIR - where to find lua.h
|
||||
# LUA_VERSION_STRING - the version of Lua found
|
||||
# LUA_VERSION_MAJOR - the major version of Lua
|
||||
# LUA_VERSION_MINOR - the minor version of Lua
|
||||
# LUA_VERSION_PATCH - the patch version of Lua
|
||||
#
|
||||
#
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# #include "lua.h"
|
||||
#
|
||||
# and not
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# #include <lua/lua.h>
|
||||
#
|
||||
# This is because, the lua location is not standardized and may exist in
|
||||
# locations other than lua/
|
||||
|
||||
unset(_lua_include_subdirs)
|
||||
unset(_lua_library_names)
|
||||
unset(_lua_append_versions)
|
||||
|
||||
# this is a function only to have all the variables inside go away automatically
|
||||
function(_lua_set_version_vars)
|
||||
set(LUA_VERSIONS5 5.3 5.2 5.1 5.0)
|
||||
|
||||
if (Lua_FIND_VERSION_EXACT)
|
||||
if (Lua_FIND_VERSION_COUNT GREATER 1)
|
||||
set(_lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR})
|
||||
endif ()
|
||||
elseif (Lua_FIND_VERSION)
|
||||
# once there is a different major version supported this should become a loop
|
||||
if (NOT Lua_FIND_VERSION_MAJOR GREATER 5)
|
||||
if (Lua_FIND_VERSION_COUNT EQUAL 1)
|
||||
set(_lua_append_versions ${LUA_VERSIONS5})
|
||||
else ()
|
||||
foreach (subver IN LISTS LUA_VERSIONS5)
|
||||
if (NOT subver VERSION_LESS ${Lua_FIND_VERSION})
|
||||
list(APPEND _lua_append_versions ${subver})
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
# once there is a different major version supported this should become a loop
|
||||
set(_lua_append_versions ${LUA_VERSIONS5})
|
||||
endif ()
|
||||
|
||||
list(APPEND _lua_include_subdirs "include/lua" "include")
|
||||
|
||||
foreach (ver IN LISTS _lua_append_versions)
|
||||
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}")
|
||||
list(APPEND _lua_include_subdirs
|
||||
include/lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
|
||||
include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
)
|
||||
list(APPEND _lua_library_names
|
||||
lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
|
||||
lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
lua.${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
|
||||
)
|
||||
endforeach ()
|
||||
|
||||
set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE)
|
||||
set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE)
|
||||
set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE)
|
||||
endfunction(_lua_set_version_vars)
|
||||
|
||||
function(_lua_check_header_version _hdr_file)
|
||||
# At least 5.[012] have different ways to express the version
|
||||
# so all of them need to be tested. Lua 5.2 defines LUA_VERSION
|
||||
# and LUA_RELEASE as joined by the C preprocessor, so avoid those.
|
||||
file(STRINGS "${_hdr_file}" lua_version_strings
|
||||
REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*")
|
||||
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};")
|
||||
if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$")
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};")
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};")
|
||||
set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}")
|
||||
else ()
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
|
||||
if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$")
|
||||
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
|
||||
endif ()
|
||||
string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}")
|
||||
endif ()
|
||||
foreach (ver IN LISTS _lua_append_versions)
|
||||
if (ver STREQUAL "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}")
|
||||
set(LUA_VERSION_MAJOR ${LUA_VERSION_MAJOR} PARENT_SCOPE)
|
||||
set(LUA_VERSION_MINOR ${LUA_VERSION_MINOR} PARENT_SCOPE)
|
||||
set(LUA_VERSION_PATCH ${LUA_VERSION_PATCH} PARENT_SCOPE)
|
||||
set(LUA_VERSION_STRING ${LUA_VERSION_STRING} PARENT_SCOPE)
|
||||
return()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endfunction(_lua_check_header_version)
|
||||
|
||||
_lua_set_version_vars()
|
||||
|
||||
if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
|
||||
_lua_check_header_version("${LUA_INCLUDE_DIR}/lua.h")
|
||||
endif ()
|
||||
|
||||
if (NOT LUA_VERSION_STRING)
|
||||
foreach (subdir IN LISTS _lua_include_subdirs)
|
||||
unset(LUA_INCLUDE_PREFIX CACHE)
|
||||
find_path(LUA_INCLUDE_PREFIX ${subdir}/lua.h
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
if (LUA_INCLUDE_PREFIX)
|
||||
_lua_check_header_version("${LUA_INCLUDE_PREFIX}/${subdir}/lua.h")
|
||||
if (LUA_VERSION_STRING)
|
||||
set(LUA_INCLUDE_DIR "${LUA_INCLUDE_PREFIX}/${subdir}")
|
||||
break()
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
unset(_lua_include_subdirs)
|
||||
unset(_lua_append_versions)
|
||||
|
||||
find_library(LUA_LIBRARY
|
||||
NAMES ${_lua_library_names} lua
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
unset(_lua_library_names)
|
||||
|
||||
if (LUA_LIBRARY)
|
||||
# include the math library for Unix
|
||||
if (UNIX AND NOT APPLE AND NOT BEOS)
|
||||
find_library(LUA_MATH_LIBRARY m)
|
||||
set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
|
||||
|
||||
# include dl library for statically-linked Lua library
|
||||
get_filename_component(LUA_LIB_EXT ${LUA_LIBRARY} EXT)
|
||||
if(LUA_LIB_EXT STREQUAL CMAKE_STATIC_LIBRARY_SUFFIX)
|
||||
list(APPEND LUA_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
# For Windows and Mac, don't need to explicitly include the math library
|
||||
else ()
|
||||
set(LUA_LIBRARIES "${LUA_LIBRARY}")
|
||||
endif ()
|
||||
endif ()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
|
||||
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
|
||||
VERSION_VAR LUA_VERSION_STRING)
|
||||
|
||||
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
|
||||
@@ -1,82 +0,0 @@
|
||||
# Locate Lua library
|
||||
# This module defines
|
||||
# LUA52_FOUND, if false, do not try to link to Lua
|
||||
# LUA_LIBRARIES
|
||||
# LUA_INCLUDE_DIR, where to find lua.h
|
||||
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "lua.h"
|
||||
# and not
|
||||
# #include <lua/lua.h>
|
||||
# This is because, the lua location is not standardized and may exist
|
||||
# in locations other than lua/
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
# Copyright 2016 for Project-OSRM, Lua5.1 => Lua5.2
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
find_path(LUA_INCLUDE_DIR lua.h
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES include/lua52 include/lua5.2 include/lua-5.2 include/lua include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
find_library(LUA_LIBRARY
|
||||
NAMES lua52 lua5.2 lua-5.2 lua
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
if(LUA_LIBRARY)
|
||||
# include the math library for Unix
|
||||
if(UNIX AND NOT APPLE AND NOT BEOS)
|
||||
find_library(LUA_MATH_LIBRARY m)
|
||||
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
# For Windows and Mac, don't need to explicitly include the math library
|
||||
else()
|
||||
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
|
||||
file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
|
||||
|
||||
string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
|
||||
unset(lua_version_str)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua52
|
||||
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
|
||||
VERSION_VAR LUA_VERSION_STRING)
|
||||
|
||||
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
# Locate Lua library
|
||||
# This module defines
|
||||
# LUAJIT_FOUND, if false, do not try to link to Lua
|
||||
# LUAJIT_LIBRARIES
|
||||
# LUAJIT_INCLUDE_DIR, where to find lua.h
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include "lua.h"
|
||||
# and not
|
||||
# #include <lua/lua.h>
|
||||
# This is because, the lua location is not standardized and may exist
|
||||
# in locations other than lua/
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
#
|
||||
# ################
|
||||
# 2010 - modified for cronkite to find luajit instead of lua, as it was before.
|
||||
#
|
||||
|
||||
if ( NOT LuaJIT_FIND_VERSION )
|
||||
MESSAGE(FATAL_ERROR "You need to specify a version of libluajit to use")
|
||||
ENDIF()
|
||||
|
||||
IF( NOT LUAJIT_FIND_QUIETLY )
|
||||
MESSAGE(STATUS "Looking for LuaJIT ${LuaJIT_FIND_VERSION}")
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(LUAJIT_INCLUDE_DIR lua.h
|
||||
HINTS
|
||||
$ENV{LUAJIT_DIR}
|
||||
PATH_SUFFIXES include/luajit-2.0 include/luajit2.0 include/luajit include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LUAJIT_LIBRARY
|
||||
NAMES luajit-${LuaJIT_FIND_VERSION_MAJOR}${LuaJIT_FIND_VERSION_MINOR} luajit-${LuaJIT_FIND_VERSION}
|
||||
HINTS
|
||||
$ENV{LUAJIT_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
IF(LUAJIT_LIBRARY)
|
||||
# include the math library for Unix
|
||||
IF(UNIX AND NOT APPLE)
|
||||
FIND_LIBRARY(LUAJIT_MATH_LIBRARY m)
|
||||
SET( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY};${LUAJIT_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
# For Windows and Mac, don't need to explicitly include the math library
|
||||
ELSE(UNIX AND NOT APPLE)
|
||||
SET( LUAJIT_LIBRARIES "${LUAJIT_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
ENDIF(LUAJIT_LIBRARY)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LUAJIT DEFAULT_MSG LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
|
||||
|
||||
IF( NOT LUAJIT_FIND_QUIETLY )
|
||||
IF( LUAJIT_FOUND AND LUAJIT_LIBRARIES)
|
||||
MESSAGE(STATUS "Found LuaJIT: ${LUAJIT_LIBRARY}" )
|
||||
MARK_AS_ADVANCED(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARIES LUAJIT_LIBRARY LUAJIT_MATH_LIBRARY)
|
||||
ELSE()
|
||||
SET ( LUAJIT_FOUND FALSE )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
@@ -1,75 +0,0 @@
|
||||
# Locate Luabind library
|
||||
# This module defines
|
||||
# LUABIND_FOUND, if false, do not try to link to Luabind
|
||||
# LUABIND_LIBRARIES
|
||||
# LUABIND_INCLUDE_DIR, where to find luabind.hpp
|
||||
#
|
||||
# Note that the expected include convention is
|
||||
# #include <luabind/luabind.hpp>
|
||||
# and not
|
||||
# #include <luabind.hpp>
|
||||
|
||||
IF( NOT LUABIND_FIND_QUIETLY )
|
||||
MESSAGE(STATUS "Looking for Luabind...")
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(LUABIND_INCLUDE_DIR luabind.hpp
|
||||
HINTS
|
||||
$ENV{LUABIND_DIR}
|
||||
PATH_SUFFIXES luabind include/luabind include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/opt/local # DarwinPorts
|
||||
/opt
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LUABIND_LIBRARY
|
||||
NAMES luabind luabind09
|
||||
HINTS
|
||||
$ENV{LUABIND_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/opt/local
|
||||
/opt
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LUABIND_LIBRARY_DBG
|
||||
NAMES luabindd
|
||||
HINTS
|
||||
$ENV{LUABIND_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/opt/local
|
||||
/opt
|
||||
)
|
||||
|
||||
IF(LUABIND_LIBRARY)
|
||||
SET( LUABIND_LIBRARIES "${LUABIND_LIBRARY}" CACHE STRING "Luabind Libraries")
|
||||
ENDIF(LUABIND_LIBRARY)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LUABIND_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Luabind DEFAULT_MSG LUABIND_LIBRARIES LUABIND_INCLUDE_DIR)
|
||||
|
||||
IF( NOT LUABIND_FIND_QUIETLY )
|
||||
IF( LUABIND_FOUND )
|
||||
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARY}" )
|
||||
ENDIF()
|
||||
IF( LUABIND_LIBRARY_DBG )
|
||||
MESSAGE(STATUS "Luabind debug library availible: ${LUABIND_LIBRARY_DBG}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(LUABIND_INCLUDE_DIR LUABIND_LIBRARIES LUABIND_LIBRARY LUABIND_LIBRARY_DBG)
|
||||
@@ -0,0 +1,21 @@
|
||||
# - Try to find Shapefile C Library
|
||||
# http://shapelib.maptools.org/
|
||||
#
|
||||
# Exports:
|
||||
# Shapefile_FOUND
|
||||
# LIBSHAPEFILE_INCLUDE_DIR
|
||||
# LIBSHAPEFILE_LIBRARY
|
||||
# Hints:
|
||||
# LIBSHAPEFILE_LIBRARY_DIR
|
||||
|
||||
find_path(LIBSHAPEFILE_INCLUDE_DIR
|
||||
shapefil.h)
|
||||
|
||||
find_library(LIBSHAPEFILE_LIBRARY
|
||||
NAMES shp
|
||||
HINTS "${LIBSHAPEFILE_LIBRARY_DIR}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Shapefile DEFAULT_MSG
|
||||
LIBSHAPEFILE_LIBRARY LIBSHAPEFILE_INCLUDE_DIR)
|
||||
mark_as_advanced(LIBSHAPEFILE_INCLUDE_DIR LIBSHAPEFILE_LIBRARY)
|
||||
+14
-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.
|
||||
@@ -280,4 +282,5 @@ if (TBB_FOUND)
|
||||
FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
|
||||
STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
|
||||
set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
|
||||
message(STATUS "TBB interface version: ${TBB_INTERFACE_VERSION}")
|
||||
endif (TBB_FOUND)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
set(OLDFILE ${OUTPUT_DIR}/include/util/fingerprint_impl.hpp)
|
||||
set(NEWFILE ${OLDFILE}.tmp)
|
||||
set(INFILE ${SOURCE_DIR}/include/util/fingerprint_impl.hpp.in)
|
||||
file(MD5 ${SOURCE_DIR}/src/tools/contract.cpp MD5PREPARE)
|
||||
file(MD5 ${SOURCE_DIR}/include/util/static_rtree.hpp MD5RTREE)
|
||||
file(MD5 ${SOURCE_DIR}/include/util/graph_loader.hpp MD5GRAPH)
|
||||
file(MD5 ${SOURCE_DIR}/include/engine/datafacade/internal_datafacade.hpp MD5OBJECTS)
|
||||
|
||||
CONFIGURE_FILE(${INFILE} ${NEWFILE})
|
||||
|
||||
file(MD5 ${NEWFILE} MD5NEW)
|
||||
|
||||
if (EXISTS ${OLDFILE})
|
||||
file(MD5 ${OLDFILE} MD5OLD)
|
||||
if(NOT ${MD5NEW} STREQUAL ${MD5OLD})
|
||||
file(REMOVE_RECURSE ${OLDFILE})
|
||||
file(RENAME ${NEWFILE} ${OLDFILE})
|
||||
else()
|
||||
file(REMOVE_RECURSE ${NEWFILE})
|
||||
message(STATUS "Fingerprint unchanged, not regenerating")
|
||||
endif()
|
||||
else()
|
||||
file(RENAME ${NEWFILE} ${OLDFILE})
|
||||
endif()
|
||||
@@ -1,40 +0,0 @@
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
unset(LUABIND_WORKS CACHE)
|
||||
unset(LUABIND51_WORKS CACHE)
|
||||
set (LUABIND_CHECK_SRC "extern \"C\" {\n#include \"lua.h\"\n#include \"lauxlib.h\"\n}\n#include <luabind/open.hpp>\nint main() { lua_State *x = luaL_newstate(); luabind::open(x); }")
|
||||
set (CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
|
||||
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
|
||||
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
|
||||
|
||||
find_package(Lua52)
|
||||
if(NOT APPLE)
|
||||
find_package(LuaJIT 5.2)
|
||||
endif()
|
||||
if(LUA52_FOUND)
|
||||
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
|
||||
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
|
||||
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND_WORKS)
|
||||
endif()
|
||||
|
||||
if(LUABIND_WORKS)
|
||||
message(STATUS "Luabind/Lua5.2 combination working with ${LUA_LIBRARY}")
|
||||
else()
|
||||
message(STATUS "Luabind/Lua5.2 not feasible, falling back to Lua 5.1.")
|
||||
unset(LUA_FOUND CACHE)
|
||||
unset(LUA_INCLUDE_DIR CACHE)
|
||||
unset(LUA_LIBRARY CACHE)
|
||||
find_package(Lua51 REQUIRED)
|
||||
if(NOT APPLE)
|
||||
find_package(LuaJIT 5.1)
|
||||
endif()
|
||||
set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
|
||||
set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND51_WORKS)
|
||||
|
||||
if(LUABIND51_WORKS)
|
||||
message(STATUS "Luabind works with Lua 5.1 at ${LUA_LIBRARY}")
|
||||
else()
|
||||
message(FATAL_ERROR "Luabind does not work with Lua 5.1 at ${LUA_LIBRARY}, no working Luabind found")
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,215 @@
|
||||
# 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")
|
||||
endif()
|
||||
|
||||
cmake_parse_arguments("" "HEADER_ONLY" "VERSION" "" ${ARGN})
|
||||
|
||||
if(_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "[Mason] mason_use() called with unrecognized arguments: ${_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
if(NOT _VERSION)
|
||||
message(FATAL_ERROR "[Mason] Specifying a version is required")
|
||||
endif()
|
||||
|
||||
if(MASON_PACKAGE_${_PACKAGE}_INVOCATION STREQUAL "${MASON_INVOCATION}")
|
||||
# Check that the previous invocation of mason_use didn't select another version of this package
|
||||
if(NOT MASON_PACKAGE_${_PACKAGE}_VERSION STREQUAL ${_VERSION})
|
||||
message(FATAL_ERROR "[Mason] Already using ${_PACKAGE} ${MASON_PACKAGE_${_PACKAGE}_VERSION}. Cannot select version ${_VERSION}.")
|
||||
endif()
|
||||
else()
|
||||
if(_HEADER_ONLY)
|
||||
set(_PLATFORM_ID "headers")
|
||||
else()
|
||||
set(_PLATFORM_ID "${MASON_PLATFORM}-${MASON_PLATFORM_VERSION}")
|
||||
endif()
|
||||
|
||||
set(_SLUG "${_PLATFORM_ID}/${_PACKAGE}/${_VERSION}")
|
||||
set(_INSTALL_PATH "${MASON_PACKAGE_DIR}/${_SLUG}")
|
||||
file(RELATIVE_PATH _INSTALL_PATH_RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${_INSTALL_PATH}")
|
||||
|
||||
if(NOT EXISTS "${_INSTALL_PATH}")
|
||||
set(_CACHE_PATH "${MASON_PACKAGE_DIR}/.binaries/${_SLUG}.tar.gz")
|
||||
if (NOT EXISTS "${_CACHE_PATH}")
|
||||
# Download the package
|
||||
set(_URL "${MASON_REPOSITORY}/${_SLUG}.tar.gz")
|
||||
message("[Mason] Downloading package ${_URL}...")
|
||||
|
||||
set(_FAILED)
|
||||
set(_ERROR)
|
||||
# Note: some CMake versions are compiled without SSL support
|
||||
get_filename_component(_CACHE_DIR "${_CACHE_PATH}" DIRECTORY)
|
||||
file(MAKE_DIRECTORY "${_CACHE_DIR}")
|
||||
execute_process(
|
||||
COMMAND curl --retry 3 -s -f -S -L "${_URL}" -o "${_CACHE_PATH}.tmp"
|
||||
RESULT_VARIABLE _FAILED
|
||||
ERROR_VARIABLE _ERROR)
|
||||
if(_FAILED)
|
||||
message(FATAL_ERROR "[Mason] Failed to download ${_URL}: ${_ERROR}")
|
||||
else()
|
||||
# We downloaded to a temporary file to prevent half-finished downloads
|
||||
file(RENAME "${_CACHE_PATH}.tmp" "${_CACHE_PATH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Unpack the package
|
||||
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()
|
||||
|
||||
# Error out if there is no config file.
|
||||
if(NOT EXISTS "${_INSTALL_PATH}/mason.ini")
|
||||
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)
|
||||
mark_as_advanced(MASON_PACKAGE_${_PACKAGE}_PREFIX)
|
||||
|
||||
# Load the configuration from the ini file
|
||||
file(STRINGS "${_INSTALL_PATH}/mason.ini" _CONFIG_FILE)
|
||||
foreach(_LINE IN LISTS _CONFIG_FILE)
|
||||
string(REGEX MATCH "^([a-z_]+) *= *" _KEY "${_LINE}")
|
||||
if (_KEY)
|
||||
string(LENGTH "${_KEY}" _KEY_LENGTH)
|
||||
string(SUBSTRING "${_LINE}" ${_KEY_LENGTH} -1 _VALUE)
|
||||
string(REGEX REPLACE ";.*$" "" _VALUE "${_VALUE}") # Trim trailing commas
|
||||
string(REPLACE "{prefix}" "${_INSTALL_PATH}" _VALUE "${_VALUE}")
|
||||
string(STRIP "${_VALUE}" _VALUE)
|
||||
string(REPLACE "=" "" _KEY "${_KEY}")
|
||||
string(STRIP "${_KEY}" _KEY)
|
||||
string(TOUPPER "${_KEY}" _KEY)
|
||||
if(_KEY STREQUAL "INCLUDE_DIRS" OR _KEY STREQUAL "STATIC_LIBS" )
|
||||
separate_arguments(_VALUE)
|
||||
endif()
|
||||
set(MASON_PACKAGE_${_PACKAGE}_${_KEY} "${_VALUE}" CACHE STRING "${_PACKAGE} ${_KEY}" FORCE)
|
||||
mark_as_advanced(MASON_PACKAGE_${_PACKAGE}_${_KEY})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Compare version in the package to catch errors early on
|
||||
if(NOT _VERSION STREQUAL MASON_PACKAGE_${_PACKAGE}_VERSION)
|
||||
message(FATAL_ERROR "[Mason] Package at ${_INSTALL_PATH_RELATIVE} has version '${MASON_PACKAGE_${_PACKAGE}_VERSION}', but required '${_VERSION}'")
|
||||
endif()
|
||||
|
||||
if(NOT _PACKAGE STREQUAL MASON_PACKAGE_${_PACKAGE}_NAME)
|
||||
message(FATAL_ERROR "[Mason] Package at ${_INSTALL_PATH_RELATIVE} has name '${MASON_PACKAGE_${_PACKAGE}_NAME}', but required '${_NAME}'")
|
||||
endif()
|
||||
|
||||
if(NOT _HEADER_ONLY)
|
||||
if(NOT MASON_PLATFORM STREQUAL MASON_PACKAGE_${_PACKAGE}_PLATFORM)
|
||||
message(FATAL_ERROR "[Mason] Package at ${_INSTALL_PATH_RELATIVE} has platform '${MASON_PACKAGE_${_PACKAGE}_PLATFORM}', but required '${MASON_PLATFORM}'")
|
||||
endif()
|
||||
|
||||
if(NOT MASON_PLATFORM_VERSION STREQUAL MASON_PACKAGE_${_PACKAGE}_PLATFORM_VERSION)
|
||||
message(FATAL_ERROR "[Mason] Package at ${_INSTALL_PATH_RELATIVE} has platform version '${MASON_PACKAGE_${_PACKAGE}_PLATFORM_VERSION}', but required '${MASON_PLATFORM_VERSION}'")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Concatenate the static libs and libraries
|
||||
set(_LIBRARIES)
|
||||
list(APPEND _LIBRARIES ${MASON_PACKAGE_${_PACKAGE}_STATIC_LIBS} ${MASON_PACKAGE_${_PACKAGE}_LDFLAGS})
|
||||
set(MASON_PACKAGE_${_PACKAGE}_LIBRARIES "${_LIBRARIES}" CACHE STRING "${_PACKAGE} _LIBRARIES" FORCE)
|
||||
mark_as_advanced(MASON_PACKAGE_${_PACKAGE}_LIBRARIES)
|
||||
|
||||
if(NOT _HEADER_ONLY)
|
||||
string(REGEX MATCHALL "(^| +)-L *([^ ]+)" MASON_PACKAGE_${_PACKAGE}_LIBRARY_DIRS "${MASON_PACKAGE_${_PACKAGE}_LDFLAGS}")
|
||||
string(REGEX REPLACE "(^| +)-L *" "\\1" MASON_PACKAGE_${_PACKAGE}_LIBRARY_DIRS "${MASON_PACKAGE_${_PACKAGE}_LIBRARY_DIRS}")
|
||||
set(MASON_PACKAGE_${_PACKAGE}_LIBRARY_DIRS "${MASON_PACKAGE_${_PACKAGE}_LIBRARY_DIRS}" CACHE STRING "${_PACKAGE} ${MASON_PACKAGE_${_PACKAGE}_LIBRARY_DIRS}" FORCE)
|
||||
mark_as_advanced(MASON_PACKAGE_${_PACKAGE}_LIBRARY_DIRS)
|
||||
endif()
|
||||
|
||||
# Store invocation ID to prevent different versions of the same package in one invocation
|
||||
set(MASON_PACKAGE_${_PACKAGE}_INVOCATION "${MASON_INVOCATION}" CACHE INTERNAL "${_PACKAGE} invocation ID" FORCE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(target_add_mason_package _TARGET _VISIBILITY _PACKAGE)
|
||||
if (NOT MASON_PACKAGE_${_PACKAGE}_INVOCATION)
|
||||
message(FATAL_ERROR "[Mason] Package ${_PACKAGE} has not been initialized yet")
|
||||
endif()
|
||||
|
||||
target_include_directories(${_TARGET} ${_VISIBILITY} "${MASON_PACKAGE_${_PACKAGE}_INCLUDE_DIRS}")
|
||||
target_compile_definitions(${_TARGET} ${_VISIBILITY} "${MASON_PACKAGE_${_PACKAGE}_DEFINITIONS}")
|
||||
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()
|
||||
@@ -0,0 +1,587 @@
|
||||
# Copyright (c) 2015, Colin Taylor
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# FindNodeJS.cmake CMake module vendored from the node-cmake project (v1.2).
|
||||
|
||||
# This script uses CMake 3.1+ features
|
||||
if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.1.0)
|
||||
message(FATAL_ERROR "FindNodeJS.cmake uses CMake 3.1+ features")
|
||||
endif()
|
||||
|
||||
# Force a build type to be set (ignored on config based generators)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type" FORCE)
|
||||
endif()
|
||||
|
||||
# Capture module information
|
||||
set(NodeJS_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
get_filename_component(NodeJS_MODULE_NAME ${NodeJS_MODULE_PATH} NAME)
|
||||
|
||||
# Allow users to specify the installed location of the Node.js package
|
||||
set(NodeJS_ROOT_DIR "" CACHE PATH
|
||||
"The root directory of the node.js installed package")
|
||||
|
||||
# Allow users to specify that downloaded sources should be used
|
||||
option(NodeJS_DOWNLOAD "Download the required source files" Off)
|
||||
|
||||
# Allow users to force downloading of node packages
|
||||
option(NodeJS_FORCE_DOWNLOAD "Download the source files every time" Off)
|
||||
|
||||
# Allow users to force archive extraction
|
||||
option(NodeJS_FORCE_EXTRACT "Extract the archive every time" Off)
|
||||
|
||||
# Make libc++ the default when compiling with clang
|
||||
option(NodeJS_USE_CLANG_STDLIB "Use libc++ when compiling with clang" On)
|
||||
if(APPLE)
|
||||
set(NodeJS_USE_CLANG_STDLIB On CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# Allow users to specify that the executable should be downloaded
|
||||
option(NodeJS_DOWNLOAD_EXECUTABLE
|
||||
"Download matching executable if available" Off
|
||||
)
|
||||
endif()
|
||||
|
||||
# Try to find the node.js executable
|
||||
# The node executable under linux may not be the correct program
|
||||
find_program(NodeJS_EXECUTABLE
|
||||
NAMES node
|
||||
PATHS ${NodeJS_ROOT_DIR}
|
||||
PATH_SUFFIXES nodejs node
|
||||
)
|
||||
set(NodeJS_VALIDATE_EXECUTABLE 1)
|
||||
if(NodeJS_EXECUTABLE)
|
||||
execute_process(
|
||||
COMMAND ${NodeJS_EXECUTABLE} --version
|
||||
RESULT_VARIABLE NodeJS_VALIDATE_EXECUTABLE
|
||||
OUTPUT_VARIABLE NodeJS_INSTALLED_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${NodeJS_EXECUTABLE} -p "process.platform"
|
||||
OUTPUT_VARIABLE NodeJS_INSTALLED_PLATFORM
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${NodeJS_EXECUTABLE} -p "process.arch"
|
||||
OUTPUT_VARIABLE NodeJS_INSTALLED_ARCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif()
|
||||
|
||||
# If node isn't the node.js binary, try the nodejs binary
|
||||
if(NOT NodeJS_VALIDATE_EXECUTABLE EQUAL 0)
|
||||
find_program(NodeJS_EXECUTABLE
|
||||
NAMES nodejs
|
||||
PATHS ${NodeJS_ROOT_DIR}
|
||||
PATH_SUFFIXES nodejs node
|
||||
)
|
||||
set(NodeJS_VALIDATE_EXECUTABLE 1)
|
||||
if(NodeJS_EXECUTABLE)
|
||||
execute_process(
|
||||
COMMAND ${NodeJS_EXECUTABLE} --version
|
||||
RESULT_VARIABLE NodeJS_VALIDATE_EXECUTABLE
|
||||
OUTPUT_VARIABLE NodeJS_INSTALLED_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT NodeJS_VALIDATE_EXECUTABLE EQUAL 0)
|
||||
message(WARNING "Node.js executable could not be found. \
|
||||
Set NodeJS_ROOT_DIR to the installed location of the executable or \
|
||||
install Node.js to its default location.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Determine if a variant is set in the components
|
||||
list(APPEND NodeJS_OTHER_COMPONENTS
|
||||
X64 IA32 ARM WIN32 LINUX DARWIN
|
||||
)
|
||||
set(NodeJS_COMPONENTS_CONTAINS_VARIANT False)
|
||||
foreach(NodeJS_COMPONENT ${NodeJS_FIND_COMPONENTS})
|
||||
list(FIND NodeJS_OTHER_COMPONENTS ${NodeJS_COMPONENT} NodeJS_OTHER_INDEX)
|
||||
if(NodeJS_OTHER_INDEX EQUAL -1)
|
||||
set(NodeJS_COMPONENTS_CONTAINS_VARIANT True)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Get the targeted version of Node.js (or one of its derivatives)
|
||||
if(NOT NodeJS_VERSION)
|
||||
if(NodeJS_FIND_VERSION)
|
||||
set(NodeJS_VERSION ${NodeJS_FIND_VERSION})
|
||||
elseif(NodeJS_INSTALLED_VERSION AND NOT NodeJS_COMPONENTS_CONTAINS_VARIANT)
|
||||
string(SUBSTRING ${NodeJS_INSTALLED_VERSION} 1 -1 NodeJS_VERSION)
|
||||
else()
|
||||
message(FATAL_ERROR "Node.js version is not set. Set the VERSION \
|
||||
property of the find_package command to the required version of the \
|
||||
Node.js sources")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Determine the target platform for the compiled module
|
||||
# Uses several mechanisms in order:
|
||||
#
|
||||
# 1. CMake cache (allows overriding on the command line)
|
||||
# 2. Node architecture when binary is available
|
||||
# 3. CMake architecture
|
||||
#
|
||||
set(NodeJS_PLATFORM "" CACHE STRING "Target node.js platform for module")
|
||||
if(NOT NodeJS_PLATFORM)
|
||||
if(NodeJS_EXECUTABLE)
|
||||
set(NodeJS_PLATFORM ${NodeJS_INSTALLED_PLATFORM})
|
||||
elseif(WIN32)
|
||||
set(NodeJS_PLATFORM "win32")
|
||||
elseif(UNIX)
|
||||
if(APPLE)
|
||||
set(NodeJS_PLATFORM "darwin")
|
||||
else()
|
||||
set(NodeJS_PLATFORM "linux")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Node.js platform is not set. Add the platform \
|
||||
to the find_package components section or set NodeJS_PLATFORM in the \
|
||||
cache.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Convenience variables for the platform type
|
||||
if(NodeJS_PLATFORM STREQUAL "win32")
|
||||
set(NodeJS_PLATFORM_WIN32 True)
|
||||
set(NodeJS_PLATFORM_LINUX False)
|
||||
set(NodeJS_PLATFORM_DARWIN False)
|
||||
elseif(NodeJS_PLATFORM STREQUAL "linux")
|
||||
set(NodeJS_PLATFORM_WIN32 False)
|
||||
set(NodeJS_PLATFORM_LINUX True)
|
||||
set(NodeJS_PLATFORM_DARWIN False)
|
||||
elseif(NodeJS_PLATFORM STREQUAL "darwin")
|
||||
set(NodeJS_PLATFORM_WIN32 False)
|
||||
set(NodeJS_PLATFORM_LINUX False)
|
||||
set(NodeJS_PLATFORM_DARWIN True)
|
||||
endif()
|
||||
|
||||
# Determine the target architecture for the compiled module
|
||||
# Uses several mechanisms in order:
|
||||
#
|
||||
# 1. CMake cache (allows overriding on the command line)
|
||||
# 2. Node architecture when binary is available
|
||||
# 3. Compiler architecture under MSVC
|
||||
#
|
||||
set(NodeJS_ARCH "" CACHE STRING "Target node.js architecture for module")
|
||||
if(NOT NodeJS_ARCH)
|
||||
if(NodeJS_EXECUTABLE)
|
||||
set(NodeJS_ARCH ${NodeJS_INSTALLED_ARCH})
|
||||
elseif(MSVC)
|
||||
if(CMAKE_CL_64)
|
||||
set(NodeJS_ARCH "x64")
|
||||
else()
|
||||
set(NodeJS_ARCH "ia32")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Node.js architecture is not set. Add the \
|
||||
architecture to the find_package components section or set NodeJS_ARCH \
|
||||
in the cache.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Convenience variables for the architecture
|
||||
if(NodeJS_ARCH STREQUAL "x64")
|
||||
set(NodeJS_ARCH_X64 True)
|
||||
set(NodeJS_ARCH_IA32 False)
|
||||
set(NodeJS_ARCH_ARM False)
|
||||
elseif(NodeJS_ARCH STREQUAL "ia32")
|
||||
set(NodeJS_ARCH_X64 False)
|
||||
set(NodeJS_ARCH_IA32 True)
|
||||
set(NodeJS_ARCH_ARM False)
|
||||
elseif(NodeJS_ARCH STREQUAL "arm")
|
||||
set(NodeJS_ARCH_X64 False)
|
||||
set(NodeJS_ARCH_IA32 False)
|
||||
set(NodeJS_ARCH_ARM True)
|
||||
endif()
|
||||
|
||||
# Include helper functions
|
||||
include(util/NodeJSUtil)
|
||||
|
||||
# Default variant name
|
||||
# Used by the installed header comparison below
|
||||
set(NodeJS_DEFAULT_VARIANT_NAME "node.js")
|
||||
|
||||
# Variables for Node.js artifacts across variants
|
||||
# Specify all of these variables for each new variant
|
||||
set(NodeJS_VARIANT_NAME "") # The printable name of the variant
|
||||
set(NodeJS_VARIANT_BASE "") # A file name safe version of the variant
|
||||
set(NodeJS_URL "") # The URL for the artifacts
|
||||
set(NodeJS_SOURCE_PATH "") # The URL path of the source archive
|
||||
set(NodeJS_CHECKSUM_PATH "") # The URL path of the checksum file
|
||||
set(NodeJS_CHECKSUM_TYPE "") # The checksum type (algorithm)
|
||||
set(NodeJS_WIN32_LIBRARY_PATH "") # The URL path of the windows library
|
||||
set(NodeJS_WIN32_BINARY_PATH "") # The URL path of the windows executable
|
||||
set(NodeJS_WIN32_LIBRARY_NAME "") # The name of the windows library
|
||||
set(NodeJS_WIN32_BINARY_NAME "") # The name of the windows executable
|
||||
|
||||
set(NodeJS_DEFAULT_INCLUDE True) # Enable default include behavior
|
||||
set(NodeJS_DEFAULT_LIBS True) # Include the default libraries
|
||||
set(NodeJS_HAS_WIN32_PREFIX True) # Does the variant use library prefixes
|
||||
set(NodeJS_HAS_WIN32_BINARY True) # Does the variant have win32 executables
|
||||
set(NodeJS_HAS_OPENSSL True) # Does the variant include openssl headers
|
||||
set(NodeJS_HEADER_VERSION 0.12.7) # Version after header-only archives start
|
||||
set(NodeJS_SHA256_VERSION 0.7.0) # Version after sha256 checksums start
|
||||
set(NodeJS_PREFIX_VERSION 0.12.7) # Version after windows prefixing starts
|
||||
set(NodeJS_CXX11R_VERSION 0.12.7) # Version after c++11 is required
|
||||
set(NodeJS_SOURCE_INCLUDE True) # Use the include paths from a source archive
|
||||
set(NodeJS_HEADER_INCLUDE False) # Use the include paths from a header archive
|
||||
set(NodeJS_INCLUDE_PATHS "") # Set of header dirs inside the source archive
|
||||
set(NodeJS_LIBRARIES "") # The set of libraries to link with addon
|
||||
set(NodeJS_WIN32_DELAYLOAD "") # Set of executables to delayload on windows
|
||||
|
||||
# NodeJS variants
|
||||
# Selects download target based on configured component
|
||||
# Include NodeJS last to provide default configurations when omitted
|
||||
file(
|
||||
GLOB NodeJS_SUPPORTED_VARIANTS
|
||||
RELATIVE ${CMAKE_CURRENT_LIST_DIR}/variants
|
||||
${CMAKE_CURRENT_LIST_DIR}/variants/*
|
||||
)
|
||||
foreach(NodeJS_SUPPORTED_VARIANT ${NodeJS_SUPPORTED_VARIANTS})
|
||||
get_filename_component(NodeJS_SUPPORTED_VARIANT_NAME
|
||||
${NodeJS_SUPPORTED_VARIANT} NAME_WE
|
||||
)
|
||||
if(NOT NodeJS_SUPPORTED_VARIANT_NAME STREQUAL "NodeJS")
|
||||
include(variants/${NodeJS_SUPPORTED_VARIANT_NAME})
|
||||
endif()
|
||||
endforeach()
|
||||
include(variants/NodeJS)
|
||||
|
||||
# Populate version variables, including version components
|
||||
set(NodeJS_VERSION_STRING "v${NodeJS_VERSION}")
|
||||
|
||||
# Populate the remaining version variables
|
||||
string(REPLACE "." ";" NodeJS_VERSION_PARTS ${NodeJS_VERSION})
|
||||
list(GET NodeJS_VERSION_PARTS 0 NodeJS_VERSION_MAJOR)
|
||||
list(GET NodeJS_VERSION_PARTS 1 NodeJS_VERSION_MINOR)
|
||||
list(GET NodeJS_VERSION_PARTS 2 NodeJS_VERSION_PATCH)
|
||||
|
||||
# If the version we're looking for is the version that is installed,
|
||||
# try finding the required headers. Don't do this under windows (where
|
||||
# headers are not part of the installed content), when the user has
|
||||
# specified that headers should be downloaded or when using a variant other
|
||||
# than the default
|
||||
if((NOT NodeJS_PLATFORM_WIN32) AND (NOT NodeJS_DOWNLOAD) AND
|
||||
NodeJS_VARIANT_NAME STREQUAL NodeJS_DEFAULT_VARIANT_NAME AND
|
||||
NodeJS_INSTALLED_VERSION STREQUAL NodeJS_VERSION_STRING AND
|
||||
NodeJS_INSTALLED_PLATFORM STREQUAL NodeJS_PLATFORM AND
|
||||
NodeJS_INSTALLED_ARCH STREQUAL NodeJS_ARCH)
|
||||
# node.h is really generic and too easy for cmake to find the wrong
|
||||
# file, so use the directory as a guard, and then just tack it on to
|
||||
# the actual path
|
||||
#
|
||||
# Specifically ran into this under OSX, where python contains a node.h
|
||||
# that gets found instead
|
||||
find_path(NodeJS_INCLUDE_PARENT node/node.h)
|
||||
set(NodeJS_INCLUDE_DIRS ${NodeJS_INCLUDE_PARENT}/node)
|
||||
|
||||
# Under all systems that support this, there are no libraries required
|
||||
# for linking (symbols are resolved via the main executable at runtime)
|
||||
set(NodeJS_LIBRARIES "")
|
||||
|
||||
# Otherwise, headers and required libraries must be downloaded to the project
|
||||
# to supplement what is installed
|
||||
else()
|
||||
# Create a folder for downloaded artifacts
|
||||
set(NodeJS_DOWNLOAD_PATH
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${NodeJS_VARIANT_BASE}
|
||||
)
|
||||
set(NodeJS_DOWNLOAD_PATH ${NodeJS_DOWNLOAD_PATH}-${NodeJS_VERSION_STRING})
|
||||
file(MAKE_DIRECTORY ${NodeJS_DOWNLOAD_PATH})
|
||||
|
||||
# Download the checksum file for validating all other downloads
|
||||
# Conveniently, if this doesn't download correctly, the setup fails
|
||||
# due to checksum failures
|
||||
set(NodeJS_CHECKSUM_FILE ${NodeJS_DOWNLOAD_PATH}/CHECKSUM)
|
||||
nodejs_download(
|
||||
${NodeJS_URL}/${NodeJS_CHECKSUM_PATH}
|
||||
${NodeJS_CHECKSUM_FILE}
|
||||
${NodeJS_FORCE_DOWNLOAD}
|
||||
)
|
||||
file(READ ${NodeJS_CHECKSUM_FILE} NodeJS_CHECKSUM_DATA)
|
||||
|
||||
# Download and extract the main source archive
|
||||
set(NodeJS_SOURCE_FILE ${NodeJS_DOWNLOAD_PATH}/headers.tar.gz)
|
||||
nodejs_checksum(
|
||||
${NodeJS_CHECKSUM_DATA} ${NodeJS_SOURCE_PATH} NodeJS_SOURCE_CHECKSUM
|
||||
)
|
||||
nodejs_download(
|
||||
${NodeJS_URL}/${NodeJS_SOURCE_PATH}
|
||||
${NodeJS_SOURCE_FILE}
|
||||
${NodeJS_SOURCE_CHECKSUM}
|
||||
${NodeJS_CHECKSUM_TYPE}
|
||||
${NodeJS_FORCE_DOWNLOAD}
|
||||
)
|
||||
set(NodeJS_HEADER_PATH ${NodeJS_DOWNLOAD_PATH}/src)
|
||||
nodejs_extract(
|
||||
${NodeJS_SOURCE_FILE}
|
||||
${NodeJS_HEADER_PATH}
|
||||
${NodeJS_FORCE_EXTRACT}
|
||||
)
|
||||
|
||||
# Populate include directories from the extracted source archive
|
||||
foreach(NodeJS_HEADER_BASE ${NodeJS_INCLUDE_PATHS})
|
||||
set(NodeJS_INCLUDE_DIR ${NodeJS_HEADER_PATH}/${NodeJS_HEADER_BASE})
|
||||
if(NOT EXISTS ${NodeJS_INCLUDE_DIR})
|
||||
message(FATAL_ERROR "Include does not exist: ${NodeJS_INCLUDE_DIR}")
|
||||
endif()
|
||||
list(APPEND NodeJS_INCLUDE_DIRS ${NodeJS_INCLUDE_DIR})
|
||||
endforeach()
|
||||
|
||||
# Download required library files when targeting windows
|
||||
if(NodeJS_PLATFORM_WIN32)
|
||||
# Download the windows library
|
||||
set(NodeJS_WIN32_LIBRARY_FILE
|
||||
${NodeJS_DOWNLOAD_PATH}/lib/${NodeJS_ARCH}
|
||||
)
|
||||
set(NodeJS_WIN32_LIBRARY_FILE
|
||||
${NodeJS_WIN32_LIBRARY_FILE}/${NodeJS_WIN32_LIBRARY_NAME}
|
||||
)
|
||||
nodejs_checksum(
|
||||
${NodeJS_CHECKSUM_DATA} ${NodeJS_WIN32_LIBRARY_PATH}
|
||||
NodeJS_WIN32_LIBRARY_CHECKSUM
|
||||
)
|
||||
nodejs_download(
|
||||
${NodeJS_URL}/${NodeJS_WIN32_LIBRARY_PATH}
|
||||
${NodeJS_WIN32_LIBRARY_FILE}
|
||||
${NodeJS_WIN32_LIBRARY_CHECKSUM}
|
||||
${NodeJS_CHECKSUM_TYPE}
|
||||
${NodeJS_FORCE_DOWNLOAD}
|
||||
)
|
||||
list(APPEND NodeJS_LIBRARIES ${NodeJS_WIN32_LIBRARY_FILE})
|
||||
|
||||
# If provided, download the windows executable
|
||||
if(NodeJS_WIN32_BINARY_PATH AND
|
||||
NodeJS_DOWNLOAD_EXECUTABLE)
|
||||
set(NodeJS_WIN32_BINARY_FILE
|
||||
${NodeJS_DOWNLOAD_PATH}/lib/${NodeJS_ARCH}
|
||||
)
|
||||
set(NodeJS_WIN32_BINARY_FILE
|
||||
${NodeJS_WIN32_BINARY_FILE}/${NodeJS_WIN32_BINARY_NAME}
|
||||
)
|
||||
nodejs_checksum(
|
||||
${NodeJS_CHECKSUM_DATA} ${NodeJS_WIN32_BINARY_PATH}
|
||||
NodeJS_WIN32_BINARY_CHECKSUM
|
||||
)
|
||||
nodejs_download(
|
||||
${NodeJS_URL}/${NodeJS_WIN32_BINARY_PATH}
|
||||
${NodeJS_WIN32_BINARY_FILE}
|
||||
${NodeJS_WIN32_BINARY_CHECKSUM}
|
||||
${NodeJS_CHECKSUM_TYPE}
|
||||
${NodeJS_FORCE_DOWNLOAD}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Support windows delay loading
|
||||
if(NodeJS_PLATFORM_WIN32)
|
||||
list(APPEND NodeJS_LINK_FLAGS /IGNORE:4199)
|
||||
set(NodeJS_WIN32_DELAYLOAD_CONDITION "")
|
||||
foreach(NodeJS_WIN32_DELAYLOAD_BINARY ${NodeJS_WIN32_DELAYLOAD})
|
||||
list(APPEND NodeJS_LINK_FLAGS
|
||||
/DELAYLOAD:${NodeJS_WIN32_DELAYLOAD_BINARY}
|
||||
)
|
||||
list(APPEND NodeJS_WIN32_DELAYLOAD_CONDITION
|
||||
"_stricmp(info->szDll, \"${NodeJS_WIN32_DELAYLOAD_BINARY}\") != 0"
|
||||
)
|
||||
endforeach()
|
||||
string(REPLACE ";" " &&\n "
|
||||
NodeJS_WIN32_DELAYLOAD_CONDITION
|
||||
"${NodeJS_WIN32_DELAYLOAD_CONDITION}"
|
||||
)
|
||||
configure_file(
|
||||
${NodeJS_MODULE_PATH}/src/win_delay_load_hook.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/win_delay_load_hook.c @ONLY
|
||||
)
|
||||
list(APPEND NodeJS_ADDITIONAL_SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/win_delay_load_hook.c
|
||||
)
|
||||
endif()
|
||||
|
||||
# Allow undefined symbols on OSX
|
||||
if(NodeJS_PLATFORM_DARWIN)
|
||||
list(APPEND NodeJS_LINK_FLAGS "-undefined dynamic_lookup")
|
||||
endif()
|
||||
|
||||
# Use libc++ when clang is the compiler by default
|
||||
if(NodeJS_USE_CLANG_STDLIB AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang.*")
|
||||
list(APPEND NodeJS_COMPILE_OPTIONS -stdlib=libc++)
|
||||
endif()
|
||||
|
||||
# Require c++11 support after a specific point, but only if the user hasn't
|
||||
# specified an override
|
||||
if(NOT NodeJS_CXX_STANDARD)
|
||||
if(NodeJS_VERSION VERSION_GREATER NodeJS_CXX11R_VERSION)
|
||||
set(NodeJS_CXX_STANDARD 11)
|
||||
else()
|
||||
set(NodeJS_CXX_STANDARD 98)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Set required definitions
|
||||
list(APPEND NodeJS_DEFINITIONS BUILDING_NODE_EXTENSION)
|
||||
if(NodeJS_PLATFORM_DARWIN)
|
||||
list(APPEND NodeJS_DEFINITIONS _DARWIN_USE_64_BIT_INODE=1)
|
||||
endif()
|
||||
if(NOT NodeJS_PLATFORM_WIN32)
|
||||
list(APPEND NodeJS_DEFINITIONS
|
||||
_LARGEFILE_SOURCE
|
||||
_FILE_OFFSET_BITS=64
|
||||
)
|
||||
endif()
|
||||
|
||||
function(add_nodejs_module NAME)
|
||||
# Build a shared library for the module
|
||||
add_library(${NAME} SHARED ${ARGN} ${NodeJS_ADDITIONAL_SOURCES})
|
||||
|
||||
# Include required headers
|
||||
# Find and include Nan as well (always available as its a
|
||||
# dependency of this module)
|
||||
nodejs_find_module_fallback(nan ${CMAKE_CURRENT_SOURCE_DIR} NAN_PATH)
|
||||
target_include_directories(${NAME}
|
||||
PUBLIC ${NodeJS_INCLUDE_DIRS}
|
||||
PUBLIC ${NAN_PATH}
|
||||
)
|
||||
|
||||
# Set module properties
|
||||
# This ensures proper naming of the module library across all platforms
|
||||
get_target_property(COMPILE_OPTIONS ${NAME} COMPILE_OPTIONS)
|
||||
if(NOT COMPILE_OPTIONS)
|
||||
set(COMPILE_OPTIONS "")
|
||||
endif()
|
||||
set(COMPILE_OPTIONS ${COMPILE_OPTIONS} ${NodeJS_COMPILE_OPTIONS})
|
||||
get_target_property(LINK_FLAGS ${NAME} LINK_FLAGS)
|
||||
if(NOT LINK_FLAGS)
|
||||
set(LINK_FLAGS "")
|
||||
endif()
|
||||
foreach(NodeJS_LINK_FLAG ${NodeJS_LINK_FLAGS})
|
||||
set(LINK_FLAGS "${LINK_FLAGS} ${NodeJS_LINK_FLAG}")
|
||||
endforeach()
|
||||
set_target_properties(${NAME} PROPERTIES
|
||||
PREFIX ""
|
||||
SUFFIX ".node"
|
||||
MACOSX_RPATH ON
|
||||
POSITION_INDEPENDENT_CODE TRUE
|
||||
COMPILE_OPTIONS "${COMPILE_OPTIONS}"
|
||||
LINK_FLAGS "${LINK_FLAGS}"
|
||||
CXX_STANDARD_REQUIRED TRUE
|
||||
CXX_STANDARD ${NodeJS_CXX_STANDARD}
|
||||
)
|
||||
|
||||
# Output the module in a per build type directory
|
||||
# This makes builds consistent with visual studio and other generators
|
||||
# that build by configuration
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set_property(TARGET ${NAME} PROPERTY LIBRARY_OUTPUT_DIRECTORY
|
||||
${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Set any required complier flags
|
||||
# Mostly used under windows
|
||||
target_compile_definitions(${NAME} PRIVATE ${NodeJS_DEFINITIONS})
|
||||
|
||||
# Link against required NodeJS libraries
|
||||
target_link_libraries(${NAME} ${NodeJS_LIBRARIES})
|
||||
endfunction()
|
||||
|
||||
# Write out the configuration for node scripts
|
||||
configure_file(
|
||||
${NodeJS_MODULE_PATH}/build.json.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/build.json @ONLY
|
||||
)
|
||||
|
||||
# Make sure we haven't violated the version-to-standard mapping
|
||||
if(NodeJS_VERSION VERSION_GREATER NodeJS_CXX11R_VERSION AND
|
||||
NodeJS_CXX_STANDARD EQUAL 98)
|
||||
message(FATAL_ERROR "${NodeJS_VARIANT_NAME} ${NodeJS_VERSION} \
|
||||
requires C++11 or newer to build")
|
||||
endif()
|
||||
|
||||
# This is a find_package file, handle the standard invocation
|
||||
include(FindPackageHandleStandardArgs)
|
||||
set(NodeJS_TARGET "${NodeJS_VARIANT_NAME} ${NodeJS_PLATFORM}/${NodeJS_ARCH}")
|
||||
find_package_handle_standard_args(NodeJS
|
||||
FOUND_VAR NodeJS_FOUND
|
||||
REQUIRED_VARS NodeJS_TARGET NodeJS_INCLUDE_DIRS
|
||||
VERSION_VAR NodeJS_VERSION
|
||||
)
|
||||
|
||||
# Mark variables that users shouldn't modify
|
||||
mark_as_advanced(
|
||||
NodeJS_VALIDATE_EXECUTABLE
|
||||
NodeJS_OTHER_COMPONENTS
|
||||
NodeJS_COMPONENTS_CONTAINS_VARIANT
|
||||
NodeJS_COMPONENT
|
||||
NodeJS_OTHER_INDEX
|
||||
NodeJS_VERSION_STRING
|
||||
NodeJS_VERSION_MAJOR
|
||||
NodeJS_VERSION_MINOR
|
||||
NodeJS_VERSION_PATCH
|
||||
NodeJS_VERSION_TWEAK
|
||||
NodeJS_PLATFORM
|
||||
NodeJS_PLATFORM_WIN32
|
||||
NodeJS_PLATFORM_LINUX
|
||||
NodeJS_PLATFORM_DARWIN
|
||||
NodeJS_ARCH
|
||||
NodeJS_ARCH_X64
|
||||
NodeJS_ARCH_IA32
|
||||
NodeJS_ARCH_ARM
|
||||
NodeJS_DEFAULT_VARIANT_NAME
|
||||
NodeJS_VARIANT_BASE
|
||||
NodeJS_VARIANT_NAME
|
||||
NodeJS_URL
|
||||
NodeJS_SOURCE_PATH
|
||||
NodeJS_CHECKSUM_PATH
|
||||
NodeJS_CHECKSUM_TYPE
|
||||
NodeJS_WIN32_LIBRARY_PATH
|
||||
NodeJS_WIN32_BINARY_PATH
|
||||
NodeJS_WIN32_LIBRARY_NAME
|
||||
NodeJS_WIN32_BINARY_NAME
|
||||
NodeJS_DEFAULT_INCLUDE
|
||||
NodeJS_DEFAULT_LIBS
|
||||
NodeJS_HAS_WIN32_BINARY
|
||||
NodeJS_HEADER_VERSION
|
||||
NodeJS_SHA256_VERISON
|
||||
NodeJS_PREFIX_VERSION
|
||||
NodeJS_SOURCE_INCLUDE
|
||||
NodeJS_HEADER_INCLUDE
|
||||
NodeJS_INCLUDE_PATHS
|
||||
NodeJS_WIN32_DELAYLOAD
|
||||
NodeJS_DOWNLOAD_PATH
|
||||
NodeJS_CHECKSUM_FILE
|
||||
NodeJS_CHECKSUM_DATA
|
||||
NodeJS_SOURCE_FILE
|
||||
NodeJS_SOURCE_CHECKSUM
|
||||
NodeJS_HEADER_PATH
|
||||
NodeJS_HEADER_BASE
|
||||
NodeJS_INCLUDE_DIR
|
||||
NodeJS_WIN32_LIBRARY_FILE
|
||||
NodeJS_WIN32_LIBRARY_CHECKSUM
|
||||
NodeJS_WIN32_BINARY_FILE
|
||||
NodeJS_WIN32_BINARY_CHECKSUM
|
||||
NodeJS_NAN_PATH
|
||||
NodeJS_LINK_FLAGS
|
||||
NodeJS_COMPILE_OPTIONS
|
||||
NodeJS_ADDITIONAL_SOURCES
|
||||
NodeJS_WIN32_DELAYLOAD_CONDITION
|
||||
NodeJS_WIN32_DELAYLOAD_BINARY
|
||||
NodeJS_TARGET
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"build_type": "@CMAKE_BUILD_TYPE@",
|
||||
"generator": "@CMAKE_GENERATOR@",
|
||||
"toolset": "@CMAKE_GENERATOR_TOOLSET@",
|
||||
"platform": "@CMAKE_GENERATOR_PLATFORM@",
|
||||
"variant": "@NodeJS_VARIANT_BASE@",
|
||||
"version": "@NodeJS_VERSION@",
|
||||
"download": "@NodeJS_DOWNLOAD@",
|
||||
"standard": "@NodeJS_CXX_STANDARD@"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
set(GITHUB_API_TOKEN $ENV{GITHUB_API_TOKEN})
|
||||
|
||||
set(GITHUB_AUTH "")
|
||||
if(GITHUB_API_TOKEN)
|
||||
set(GITHUB_AUTH "?access_token=${GITHUB_API_TOKEN}")
|
||||
endif()
|
||||
|
||||
set(GITHUB_API_URL "https://api.github.com")
|
||||
|
||||
function(github_get_rate_limit VAR)
|
||||
set(RATE_LIMIT_FILE ${CMAKE_CURRENT_BINARY_DIR}/GITHUBRATE)
|
||||
set(RATE_LIMIT_URL ${GITHUB_API_URL}/rate_limit${GITHUB_AUTH})
|
||||
nodejs_download(
|
||||
${RATE_LIMIT_URL}
|
||||
${RATE_LIMIT_FILE}
|
||||
ON
|
||||
)
|
||||
file(READ ${RATE_LIMIT_FILE} RATE_LIMIT_DATA)
|
||||
string(REGEX MATCH "\"remaining\": ([0-9]+),"
|
||||
RATE_LIMIT_MATCH ${RATE_LIMIT_DATA})
|
||||
set(${VAR} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
mark_as_advanced(
|
||||
GITHUB_AUTH
|
||||
GITHUB_API_TOKEN
|
||||
GITHUB_API_URL
|
||||
)
|
||||
@@ -0,0 +1,166 @@
|
||||
function(nodejs_check_file FILE)
|
||||
set(MESSAGE "File ${FILE} does not exist or is empty")
|
||||
if(ARGC GREATER 1)
|
||||
set(MESSAGE ${ARGV1})
|
||||
endif()
|
||||
|
||||
# Make sure the file has contents
|
||||
file(READ ${FILE} FILE_CONTENT LIMIT 1 HEX)
|
||||
if(NOT FILE_CONTENT)
|
||||
file(REMOVE ${FILE})
|
||||
message(FATAL_ERROR ${MESSAGE})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(nodejs_download URL FILE)
|
||||
# Function optionally takes a checksum and a checksum type, and
|
||||
# a force value
|
||||
# Either can be specified without the other, but checksum must come first
|
||||
if(ARGC GREATER 2)
|
||||
set(CHECKSUM ${ARGV2})
|
||||
if(CHECKSUM STREQUAL "On" OR CHECKSUM STREQUAL "ON" OR
|
||||
CHECKSUM STREQUAL "True" OR CHECKSUM STREQUAL "TRUE" OR
|
||||
CHECKSUM STREQUAL "Off" OR CHECKSUM STREQUAL "OFF" OR
|
||||
CHECKSUM STREQUAL "False" OR CHECKSUM STREQUAL "FALSE")
|
||||
set(FORCE ${CHECKSUM})
|
||||
unset(CHECKSUM)
|
||||
elseif(ARGC GREATER 3)
|
||||
set(TYPE ${ARGV3})
|
||||
else()
|
||||
message(FATAL_ERROR "Checksum type must be specified")
|
||||
endif()
|
||||
elseif(ARGC GREATER 4)
|
||||
set(CHECKSUM ${ARGV2})
|
||||
set(TYPE ${ARGV3})
|
||||
set(FORCE ${ARGV4})
|
||||
endif()
|
||||
|
||||
# If the file exists, no need to download it again unless its being forced
|
||||
if(NOT FORCE AND EXISTS ${FILE})
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Download the file
|
||||
message(STATUS "Downloading: ${URL}")
|
||||
file(DOWNLOAD
|
||||
${URL}
|
||||
${FILE}
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
|
||||
# Make sure the file has contents
|
||||
nodejs_check_file(${FILE} "Unable to download ${URL}")
|
||||
|
||||
# If a checksum is provided, validate the downloaded file
|
||||
if(CHECKSUM)
|
||||
message(STATUS "Validating: ${FILE}")
|
||||
file(${TYPE} ${FILE} DOWNLOAD_CHECKSUM)
|
||||
message(STATUS "Checksum: ${CHECKSUM}")
|
||||
message(STATUS "Download: ${DOWNLOAD_CHECKSUM}")
|
||||
if(NOT CHECKSUM STREQUAL DOWNLOAD_CHECKSUM)
|
||||
file(REMOVE ${FILE})
|
||||
message(FATAL_ERROR "Validation failure: ${FILE}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(nodejs_checksum DATA FILE VAR)
|
||||
string(REGEX MATCH "([A-Fa-f0-9]+)[\t ]+${FILE}" CHECKSUM_MATCH ${DATA})
|
||||
if(CMAKE_MATCH_1)
|
||||
set(${VAR} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Unable to extract file checksum")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(nodejs_extract FILE DIR)
|
||||
# Function optionally takes a force value
|
||||
if(ARGC GREATER 2)
|
||||
set(FORCE ${ARGV2})
|
||||
endif()
|
||||
|
||||
# If the archvie has been extracted, no need to extract again unless it
|
||||
# is being forced
|
||||
if(NOT FORCE AND EXISTS ${DIR})
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Make a temporary directory for extracting the output
|
||||
set(EXTRACT_DIR ${CMAKE_CURRENT_BINARY_DIR}/extract)
|
||||
if(EXISTS ${EXTRACT_DIR})
|
||||
file(REMOVE_RECURSE ${EXTRACT_DIR})
|
||||
endif()
|
||||
file(MAKE_DIRECTORY ${EXTRACT_DIR})
|
||||
|
||||
# Extract the archive
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xfz ${FILE}
|
||||
WORKING_DIRECTORY ${EXTRACT_DIR}
|
||||
)
|
||||
|
||||
# If only one element is extracted, the archive contained a nested
|
||||
# folder; use the inner folder as the extracted folder
|
||||
file(GLOB EXTRACT_CHILDREN ${EXTRACT_DIR}/*)
|
||||
list(LENGTH EXTRACT_CHILDREN NUM_CHILDREN)
|
||||
set(TARGET_DIR ${EXTRACT_DIR})
|
||||
if(NUM_CHILDREN EQUAL 1)
|
||||
list(GET EXTRACT_CHILDREN 0 TARGET_DIR)
|
||||
endif()
|
||||
|
||||
# Move the folder to the target path
|
||||
if(EXISTS ${DIR})
|
||||
file(REMOVE_RECURSE ${DIR})
|
||||
endif()
|
||||
file(RENAME ${TARGET_DIR} ${DIR})
|
||||
|
||||
# Make sure to clean up the extraction folder when the inner folder
|
||||
# is used
|
||||
file(REMOVE_RECURSE ${EXTRACT_DIR})
|
||||
endfunction()
|
||||
|
||||
function(nodejs_find_module NAME BASE PATH)
|
||||
# Find a node module using the same search path that require uses
|
||||
# without needing a node binary
|
||||
set(ROOT ${BASE})
|
||||
set(DRIVE "^[A-Za-z]?:?/$")
|
||||
|
||||
# Walk up the directory tree until at the root
|
||||
while(NOT ROOT MATCHES ${DRIVE} AND NOT
|
||||
EXISTS ${ROOT}/node_modules/${NAME})
|
||||
get_filename_component(ROOT ${ROOT} DIRECTORY)
|
||||
endwhile()
|
||||
|
||||
# Operate like the CMake find_* functions, returning NOTFOUND if the
|
||||
# module can't be found
|
||||
if(ROOT MATCHES ${DRIVE})
|
||||
set(${PATH} ${NAME}-NOTFOUND PARENT_SCOPE)
|
||||
else()
|
||||
set(${PATH} ${ROOT}/node_modules/${NAME} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(nodejs_find_module_fallback NAME BASE PATH)
|
||||
# Look in the provided path first
|
||||
# If the module isn't found, try searching from the module
|
||||
nodejs_find_module(${NAME} ${BASE} ${PATH})
|
||||
if(NOT ${PATH})
|
||||
nodejs_find_module(${NAME} ${NodeJS_MODULE_PATH} ${PATH})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(nodejs_get_version URL VAR)
|
||||
set(NWJS_LATEST_RELEASE_URL
|
||||
"${NWJS_URL_BASE}/latest/${NodeJS_CHECKSUM_PATH}")
|
||||
set(VERSION_FILE ${CMAKE_CURRENT_BINARY_DIR}/VERSION)
|
||||
nodejs_download(
|
||||
${URL}
|
||||
${VERSION_FILE}
|
||||
ON
|
||||
)
|
||||
nodejs_check_file(${VERSION_FILE})
|
||||
file(READ ${VERSION_FILE} VERSION_DATA)
|
||||
string(REGEX MATCH "v([0-9]+\.[0-9]+\.[0-9]+)"
|
||||
VERSION_MATCH ${VERSION_DATA}
|
||||
)
|
||||
set(${VAR} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -0,0 +1,81 @@
|
||||
set(ELECTRON_VARIANT_BASE "electron")
|
||||
set(ELECTRON_WIN32_BINARY_NAME "${ELECTRON_VARIANT_BASE}.exe")
|
||||
list(APPEND NodeJS_WIN32_DELAYLOAD ${ELECTRON_WIN32_BINARY_NAME})
|
||||
|
||||
if(NodeJS_FIND_REQUIRED_ELECTRON OR
|
||||
NodeJS_VARIANT STREQUAL ${ELECTRON_VARIANT_BASE})
|
||||
if(NodeJS_VERSION STREQUAL "latest")
|
||||
include(util/Github)
|
||||
github_get_rate_limit(GITHUB_RATE_LIMIT)
|
||||
|
||||
# Handle determining the latest release
|
||||
# Very complicated, due to electron not following the "latest"
|
||||
# convention of other variants
|
||||
set(ELECTRON_LATEST_RELEASE_FILE ${CMAKE_CURRENT_BINARY_DIR}/ELECTRON)
|
||||
set(ELECTRON_LATEST_RELEASE_URL
|
||||
${GITHUB_API_URL}/repos/atom/electron/releases/latest${GITHUB_AUTH}
|
||||
)
|
||||
if(GITHUB_RATE_LIMIT GREATER 0)
|
||||
nodejs_download(
|
||||
${ELECTRON_LATEST_RELEASE_URL}
|
||||
${ELECTRON_LATEST_RELEASE_FILE}
|
||||
ON
|
||||
)
|
||||
endif()
|
||||
nodejs_check_file(
|
||||
${ELECTRON_LATEST_RELEASE_FILE}
|
||||
"Releases file could not be downloaded, likely \
|
||||
because github rate limit was exceeded. Wait until the limit \
|
||||
passes or set GITHUB_API_TOKEN in your environment to a valid \
|
||||
github developer token."
|
||||
)
|
||||
file(READ ${ELECTRON_LATEST_RELEASE_FILE} ELECTRON_LATEST_RELEASE_DATA)
|
||||
string(REGEX MATCH "\"tag_name\"\: \"v([0-9]+\.[0-9]+\.[0-9]+)\""
|
||||
ELECTRON_LATEST_RELEASE_MATCH ${ELECTRON_LATEST_RELEASE_DATA})
|
||||
set(NodeJS_VERSION ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
|
||||
set(NodeJS_VARIANT_NAME "Electron.js")
|
||||
|
||||
# SHASUMS of any kind is inaccessible prior to 0.16.0
|
||||
if(NodeJS_VERSION VERSION_LESS 0.16.0)
|
||||
message(FATAL_ERROR "Electron is only supported for versions >= 0.16.0")
|
||||
endif()
|
||||
|
||||
# Electron switched to IOJS after 0.25.0
|
||||
# Probably needs to be bounded on the upper side if/when they switch
|
||||
# back to node mainline due to iojs-node merge
|
||||
set(NodeJS_VARIANT_BASE "node")
|
||||
if(NodeJS_VERSION VERSION_GREATER 0.25.0)
|
||||
set(NodeJS_VARIANT_BASE "iojs")
|
||||
endif()
|
||||
|
||||
# Url is hard to get, because it will immediately resolve to a CDN
|
||||
# Extracted from the electron website
|
||||
set(NodeJS_URL
|
||||
"https://atom.io/download/atom-shell/v${NodeJS_VERSION}"
|
||||
)
|
||||
|
||||
# Headers become available for IOJS base ONLY!
|
||||
# Variant base switch above handles this
|
||||
set(NodeJS_HEADER_VERSION 0.30.1)
|
||||
|
||||
# Header only archive uses source style paths
|
||||
set(NodeJS_DEFAULT_INCLUDE False)
|
||||
|
||||
# Hard to determine, but versions seem to start at 16, and SHA256 is
|
||||
# available
|
||||
set(NodeJS_SHA256_VERSION 0.15.9)
|
||||
|
||||
# C++11 and Prefixing start after the IOJS switch
|
||||
# Will carry forward after node mainline so no need for upper bound (whew)
|
||||
set(NodeJS_PREFIX_VERSION 0.25.0)
|
||||
set(NodeJS_CXX11R_VERSION 0.25.0)
|
||||
|
||||
# The executable is not provided on the CDN
|
||||
# In theory, I could support a BINARY_URL to get this from github
|
||||
set(NodeJS_HAS_WIN32_BINARY False)
|
||||
|
||||
# OpenSSL isn't included in the headers
|
||||
set(NodeJS_HAS_OPENSSL False)
|
||||
endif()
|
||||
@@ -0,0 +1,25 @@
|
||||
set(IOJS_URL_BASE "https://iojs.org/dist")
|
||||
set(IOJS_VARIANT_BASE "iojs")
|
||||
set(IOJS_WIN32_BINARY_NAME "${IOJS_VARIANT_BASE}.exe")
|
||||
list(APPEND NodeJS_WIN32_DELAYLOAD ${IOJS_WIN32_BINARY_NAME})
|
||||
|
||||
if(NodeJS_FIND_REQUIRED_IOJS OR NodeJS_VARIANT STREQUAL ${IOJS_VARIANT_BASE})
|
||||
if(NodeJS_VERSION STREQUAL "latest")
|
||||
set(IOJS_LATEST_RELEASE_URL
|
||||
"${IOJS_URL_BASE}/latest/SHASUMS256.txt")
|
||||
nodejs_get_version(${IOJS_LATEST_RELEASE_URL} NodeJS_VERSION)
|
||||
endif()
|
||||
|
||||
set(NodeJS_VARIANT_NAME "io.js")
|
||||
set(NodeJS_VARIANT_BASE ${IOJS_VARIANT_BASE})
|
||||
set(NodeJS_URL "${IOJS_URL_BASE}/v${NodeJS_VERSION}")
|
||||
set(NodeJS_HEADER_VERSION 2.3.1)
|
||||
set(NodeJS_WIN32_BINARY_NAME "${IOJS_WIN32_BINARY_NAME}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
IOJS_URL_BASE
|
||||
IOJS_VARIANT_BASE
|
||||
IOJS_WIN32_BINARY_NAME
|
||||
IOJS_LATEST_RELEASE_URL
|
||||
)
|
||||
@@ -0,0 +1,30 @@
|
||||
set(NWJS_URL_BASE "http://dl.nwjs.io")
|
||||
set(NWJS_VARIANT_BASE "nw")
|
||||
set(NWJS_WIN32_BINARY_NAME "${NWJS_VARIANT_BASE}.exe")
|
||||
list(APPEND NodeJS_WIN32_DELAYLOAD ${NWJS_WIN32_BINARY_NAME})
|
||||
|
||||
if(NodeJS_FIND_REQUIRED_NWJS OR NodeJS_VARIANT STREQUAL ${NWJS_VARIANT_BASE})
|
||||
set(NodeJS_CHECKSUM_PATH "MD5SUMS")
|
||||
set(NodeJS_CHECKSUM_TYPE "MD5")
|
||||
|
||||
if(NodeJS_VERSION STREQUAL "latest")
|
||||
set(NWJS_LATEST_RELEASE_URL
|
||||
"${NWJS_URL_BASE}/latest/${NodeJS_CHECKSUM_PATH}")
|
||||
nodejs_get_version(${NWJS_LATEST_RELEASE_URL} NodeJS_VERSION)
|
||||
endif()
|
||||
|
||||
set(NodeJS_VARIANT_NAME "nw.js")
|
||||
set(NodeJS_VARIANT_BASE ${NWJS_VARIANT_BASE})
|
||||
set(NodeJS_URL "${NWJS_URL_BASE}/v${NodeJS_VERSION}")
|
||||
set(NodeJS_SOURCE_PATH "nw-headers-v${NodeJS_VERSION}.tar.gz")
|
||||
set(NodeJS_DEFAULT_INCLUDE False)
|
||||
set(NodeJS_HAS_WIN32_PREFIX False)
|
||||
set(NodeJS_HAS_WIN32_BINARY False)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
NWJS_URL_BASE
|
||||
NWJS_VARIANT_BASE
|
||||
NWJS_WIN32_BINARY_NAME
|
||||
NWJS_LATEST_RELEASE_URL
|
||||
)
|
||||
@@ -0,0 +1,131 @@
|
||||
set(NodeJS_URL_BASE http://nodejs.org/dist)
|
||||
set(NodeJS_DEFAULT_VARIANT_BASE "node")
|
||||
set(NodeJS_DEFAULT_WIN32_BINARY_NAME "${NodeJS_DEFAULT_VARIANT_BASE}.exe")
|
||||
list(APPEND NodeJS_WIN32_DELAYLOAD ${NodeJS_DEFAULT_WIN32_BINARY_NAME})
|
||||
|
||||
if(NodeJS_VERSION STREQUAL "latest")
|
||||
set(NodeJS_LATEST_RELEASE_URL
|
||||
"${NodeJS_URL_BASE}/latest/SHASUMS256.txt")
|
||||
nodejs_get_version(${NodeJS_LATEST_RELEASE_URL} NodeJS_VERSION)
|
||||
endif()
|
||||
|
||||
if(NOT NodeJS_VARIANT_NAME)
|
||||
set(NodeJS_VARIANT_NAME ${NodeJS_DEFAULT_VARIANT_NAME})
|
||||
endif()
|
||||
if(NOT NodeJS_VARIANT_BASE)
|
||||
set(NodeJS_VARIANT_BASE ${NodeJS_DEFAULT_VARIANT_BASE})
|
||||
endif()
|
||||
if(NOT NodeJS_URL)
|
||||
set(NodeJS_URL "${NodeJS_URL_BASE}/v${NodeJS_VERSION}")
|
||||
endif()
|
||||
|
||||
if(NOT NodeJS_SOURCE_PATH)
|
||||
set(NodeJS_SOURCE_PATH "${NodeJS_VARIANT_BASE}-v${NodeJS_VERSION}")
|
||||
# Use the headers archive when its available
|
||||
if(NodeJS_VERSION VERSION_GREATER ${NodeJS_HEADER_VERSION})
|
||||
set(NodeJS_SOURCE_PATH "${NodeJS_SOURCE_PATH}-headers")
|
||||
endif()
|
||||
set(NodeJS_SOURCE_PATH "${NodeJS_SOURCE_PATH}.tar.gz")
|
||||
endif()
|
||||
|
||||
if(NodeJS_DEFAULT_INCLUDE AND
|
||||
NodeJS_VERSION VERSION_GREATER ${NodeJS_HEADER_VERSION})
|
||||
set(NodeJS_SOURCE_INCLUDE False)
|
||||
set(NodeJS_HEADER_INCLUDE True)
|
||||
endif()
|
||||
|
||||
if(NodeJS_SOURCE_INCLUDE)
|
||||
list(APPEND NodeJS_INCLUDE_PATHS
|
||||
src
|
||||
deps/uv/include
|
||||
deps/v8/include
|
||||
deps/zlib
|
||||
)
|
||||
# OpenSSL is an optional header
|
||||
if(NodeJS_HAS_OPENSSL)
|
||||
list(APPEND NodeJS_INCLUDE_PATHS
|
||||
deps/openssl/openssl/include
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(NodeJS_HEADER_INCLUDE)
|
||||
set(NodeJS_INCLUDE_PATHS include/node)
|
||||
endif()
|
||||
|
||||
if(NOT NodeJS_CHECKSUM_TYPE)
|
||||
# Use SHA256 when available
|
||||
if(NodeJS_VERSION VERSION_GREATER ${NodeJS_SHA256_VERSION})
|
||||
set(NodeJS_CHECKSUM_TYPE "SHA256")
|
||||
else()
|
||||
set(NodeJS_CHECKSUM_TYPE "SHA1")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT NodeJS_CHECKSUM_PATH)
|
||||
set(NodeJS_CHECKSUM_PATH "SHASUMS")
|
||||
if(NodeJS_CHECKSUM_TYPE STREQUAL "SHA256")
|
||||
set(NodeJS_CHECKSUM_PATH "${NodeJS_CHECKSUM_PATH}256")
|
||||
endif()
|
||||
set(NodeJS_CHECKSUM_PATH "${NodeJS_CHECKSUM_PATH}.txt")
|
||||
endif()
|
||||
|
||||
# Library and binary are based on variant base
|
||||
if(NOT NodeJS_WIN32_LIBRARY_NAME)
|
||||
set(NodeJS_WIN32_LIBRARY_NAME ${NodeJS_VARIANT_BASE}.lib)
|
||||
endif()
|
||||
if(NOT NodeJS_WIN32_BINARY_NAME)
|
||||
set(NodeJS_WIN32_BINARY_NAME ${NodeJS_VARIANT_BASE}.exe)
|
||||
endif()
|
||||
|
||||
if(NOT NodeJS_WIN32_LIBRARY_PATH)
|
||||
# The library location is prefixed after a specific version
|
||||
if(NodeJS_HAS_WIN32_PREFIX AND
|
||||
NodeJS_VERSION VERSION_GREATER ${NodeJS_PREFIX_VERSION})
|
||||
set(NodeJS_WIN32_LIBRARY_PATH "win-")
|
||||
if(NodeJS_ARCH_IA32)
|
||||
set(NodeJS_WIN32_LIBRARY_PATH "${NodeJS_WIN32_LIBRARY_PATH}x86/")
|
||||
endif()
|
||||
endif()
|
||||
# 64-bit versions are prefixed
|
||||
if(NodeJS_ARCH_X64)
|
||||
set(NodeJS_WIN32_LIBRARY_PATH "${NodeJS_WIN32_LIBRARY_PATH}x64/")
|
||||
endif()
|
||||
set(NodeJS_WIN32_LIBRARY_PATH
|
||||
"${NodeJS_WIN32_LIBRARY_PATH}${NodeJS_WIN32_LIBRARY_NAME}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NodeJS_HAS_WIN32_BINARY AND NOT NodeJS_WIN32_BINARY_PATH)
|
||||
# The executable location is prefixed after a specific version
|
||||
if(NodeJS_HAS_WIN32_PREFIX AND
|
||||
NodeJS_VERSION VERSION_GREATER ${NodeJS_PREFIX_VERSION})
|
||||
set(NodeJS_WIN32_BINARY_PATH "win-")
|
||||
if(NodeJS_ARCH_IA32)
|
||||
set(NodeJS_WIN32_BINARY_PATH "${NodeJS_WIN32_BINARY_PATH}x86/")
|
||||
endif()
|
||||
endif()
|
||||
# 64-bit versions are prefixed
|
||||
if(NodeJS_ARCH_X64)
|
||||
set(NodeJS_WIN32_BINARY_PATH "${NodeJS_WIN32_BINARY_PATH}x64/")
|
||||
endif()
|
||||
set(NodeJS_WIN32_BINARY_PATH
|
||||
"${NodeJS_WIN32_BINARY_PATH}${NodeJS_WIN32_BINARY_NAME}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Specify windows libraries
|
||||
# XXX: This may need to be version/variant specific in the future
|
||||
if(NodeJS_DEFAULT_LIBS AND NodeJS_PLATFORM_WIN32)
|
||||
list(APPEND NodeJS_LIBRARIES
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
|
||||
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
|
||||
odbc32.lib DelayImp.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
NodeJS_URL_BASE
|
||||
NodeJS_DEFAULT_VARIANT_BASE
|
||||
NodeJS_DEFAULT_WIN32_BINARY_NAME
|
||||
NodeJS_LATEST_RELEASE_URL
|
||||
)
|
||||
+6
-6
@@ -1,11 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
includedir=${prefix}/include
|
||||
libdir=${prefix}/lib
|
||||
includedir=@PKGCONFIG_INCLUDE_DIR@
|
||||
libdir=@PKGCONFIG_LIBRARY_DIR@
|
||||
|
||||
Name: libOSRM
|
||||
Description: Project OSRM library
|
||||
Version: v@OSRM_VERSION_MAJOR@.@OSRM_VERSION_MINOR@.@OSRM_VERSION_PATCH@
|
||||
Version: v@OSRM_VERSION@
|
||||
Requires:
|
||||
Libs: -L${libdir} -losrm
|
||||
Libs.private: @ENGINE_LIBRARY_LISTING@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -losrm @PKGCONFIG_OSRM_LDFLAGS@
|
||||
Libs.private: @PKGCONFIG_OSRM_DEPENDENT_LIBRARIES@
|
||||
Cflags: @PKGCONFIG_OSRM_INCLUDE_FLAGS@ @PKGCONFIG_OSRM_CXXFLAGS@
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
coverage:
|
||||
|
||||
ignore:
|
||||
- third_party/.*
|
||||
|
||||
comment: off
|
||||
@@ -1,9 +0,0 @@
|
||||
# config/cucumber.yml
|
||||
##YAML Template
|
||||
---
|
||||
default: --require features --tags ~@todo --tags ~@bug --tag ~@stress
|
||||
verify: --require features --tags ~@todo --tags ~@bug --tags ~@stress -f progress
|
||||
jenkins: --require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@options -f progress
|
||||
bugs: --require features --tags @bug
|
||||
todo: --require features --tags @todo
|
||||
all: --require features
|
||||
@@ -0,0 +1,7 @@
|
||||
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',
|
||||
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@match --tags ~@alternative --tags ~@matrix --tags ~@trip --tags ~@via --require features/support --require features/step_definitions -f progress'
|
||||
}
|
||||
+42
-15
@@ -1,19 +1,46 @@
|
||||
FROM ubuntu:14.04
|
||||
FROM alpine:3.5
|
||||
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y build-essential git-core python-pip python-software-properties software-properties-common
|
||||
ARG DOCKER_TAG
|
||||
|
||||
RUN apt-get -y install gcc-4.8 g++-4.8 libboost1.55-all-dev llvm-3.4
|
||||
RUN apt-get -y install libbz2-dev libstxxl-dev libstxxl1 libxml2-dev
|
||||
RUN apt-get -y install libzip-dev lua5.1 liblua5.1-0-dev libtbb-dev libgdal-dev ruby1.9
|
||||
RUN apt-get -y install curl cmake cmake-curses-gui
|
||||
RUN mkdir /src
|
||||
COPY . /src
|
||||
|
||||
RUN pip install awscli
|
||||
RUN mkdir /opt
|
||||
WORKDIR /opt
|
||||
RUN NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
|
||||
case ${DOCKER_TAG} in *"-debug"*) BUILD_TYPE="Debug";; *) BUILD_TYPE="Release";; esac && \
|
||||
\
|
||||
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 && \
|
||||
\
|
||||
echo "Building OSRM ${DOCKER_TAG}" && \
|
||||
cd /src && \
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -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*
|
||||
|
||||
# luabind
|
||||
RUN curl https://gist.githubusercontent.com/DennisOSRM/f2eb7b948e6fe1ae319e/raw/install-luabind.sh | sudo bash
|
||||
|
||||
RUN useradd -ms /bin/bash mapbox
|
||||
USER mapbox
|
||||
ENV HOME /home/mapbox
|
||||
WORKDIR /home/mapbox
|
||||
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 \
|
||||
osrm-backend/docker/test.sh
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
docker run \
|
||||
-i \
|
||||
-e "CXX=g++" \
|
||||
-v `pwd`:/home/mapbox/osrm-backend \
|
||||
-t mapbox/osrm:linux \
|
||||
osrm-backend/docker/test.sh
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
export CMAKEOPTIONS="-DCMAKE_BUILD_TYPE=Release"
|
||||
export PATH=$PATH:/home/mapbox/.gem/ruby/1.9.1/bin:/home/mapbox/osrm-backend/vendor/bundle/ruby/1.9.1/bin
|
||||
|
||||
cd /home/mapbox/osrm-backend
|
||||
gem install --user-install bundler
|
||||
bundle install --path vendor/bundle
|
||||
[ -d build ] && rm -rf build
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. $CMAKEOPTIONS -DBUILD_TOOLS=1
|
||||
|
||||
make -j`nproc`
|
||||
make tests -j`nproc`
|
||||
./datastructure-tests
|
||||
./algorithm-tests
|
||||
cd ..
|
||||
bundle exec cucumber -p verify
|
||||
@@ -0,0 +1,62 @@
|
||||
# Developing / Debugging guidance code
|
||||
|
||||
When changing guidance code, it is easy to introduce problems somewhere in the network.
|
||||
To get a better feeling of how your changes impact the OSRM experience, we offer ways of generating geojson output to inspect (e.g. with Mapbox Studio).
|
||||
When you do changes, make sure to inspect a few areas for the impact of the changes.
|
||||
|
||||
## How to use GeoJson-Debugging
|
||||
|
||||
This is a short guide to describe usage of our GeoJson debug logging mechanism. It is synchronized to guarantee thread-safe logging.
|
||||
|
||||
## Outputting into a single file
|
||||
To use it, the inclusion of `geojson_debug_logger.hpp` `geojson_debug_policies.hpp` from the `util` directory is required.
|
||||
|
||||
Geojson debugging requires a few simple steps to output data into a feature collection.
|
||||
|
||||
- Create a Scoped Guard that lives through the process and provide it with all required datastructures (it needs to span the lifetime of all your logging efforts)
|
||||
- At the location of the output, simply call Write with your own parameters.
|
||||
|
||||
A guard (ScopedGeojsonLoggerGuard) requires a logging policy. Per default we provide a way of printing out node-ids as coordinates.
|
||||
|
||||
The initialisation to do so looks like this:
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", data-for-conversion);`
|
||||
Make sure to give the guar a name, so it actually gets a lifetime.
|
||||
|
||||
The field `data-for-conversion` can be an arbitrary long set of features and needs to match the parameters used for constructing our policy (in this case `util::NodeIdVectorToLineString`).
|
||||
|
||||
The policy itself offers a `operator()` accepting a `vector` of `NodeID`.
|
||||
|
||||
For outputting data into our file (debug.geojson), we simply need to call the matching logging routine of the guard: `util::ScioedGeojsonLoggerGuard<util::NodeIdVectorToLineString>::Write(list_of_node_ids);`
|
||||
(or `guard.Write(list_of_node_ids)` if you created an instance).
|
||||
|
||||
### Possible Scopeguard Location
|
||||
Think of the scopeguard as you would do of any reference. If you wan't to access to logging during a call, the guard object must be alive and valid.
|
||||
|
||||
As an example: a good location to create the a scopeguard to log decisions in the edge-based-graph-factory would be right before we run it ([here](https://github.com/Project-OSRM/osrm-backend/blob/a933b5d94943bf3edaf42c84a614a99650d23cba/src/extractor/extractor.cpp#L497)). If you put `util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", node_coordinate_vector);` at that location, you can then print `util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString>::Write(list_of_node_ids);` anywhere within the `edge-based-graph-factory`.
|
||||
|
||||
This location would enable call for all guidance related pre-processing which is called in the edge-based-graph-factory.
|
||||
Logging any turn-handler decisions, for example, would now be possible.
|
||||
|
||||
## Limitations
|
||||
GeoJson debugging requires a single GeoJsonGuard (ScopedGeojsonLoggerGuard) for each desired output file.
|
||||
For each set of template parameters, only the most recent guard will actually produce output.
|
||||
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug.geojson", data-for-conversion);`
|
||||
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString> geojson_guard( "debug-2.geojson", data-for-conversion);`
|
||||
|
||||
Will not provide a way to write into two files, but only `debug-2` will actually contain features.
|
||||
|
||||
We cannot nest-these calls.
|
||||
|
||||
If we want to use the same policy for multiple files, we need to use different template parameters both for the logger and the guard.
|
||||
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString,0> geojson_guard( "debug.geojson", data-for-conversion);`
|
||||
|
||||
`util::ScopedGeojsonLoggerGuard<util::NodeIdVectorToLineString,1> geojson_guard( "debug-2.geojson", data-for-conversion);`
|
||||
|
||||
as well as,
|
||||
|
||||
`util::ScopedGeojsonLoggerGuardr<util::NodeIdVectorToLineString,0>::Write(list_of_node_ids);`
|
||||
|
||||
`util::ScopedGeojsonLoggerGuardr<util::NodeIdVectorToLineString,1>::Write(list_of_node_ids);`
|
||||
+779
@@ -0,0 +1,779 @@
|
||||
## General options
|
||||
|
||||
All OSRM HTTP requests use a common structure.
|
||||
|
||||
The following syntax applies to all services, except as noted.
|
||||
|
||||
### Requests
|
||||
|
||||
```endpoint
|
||||
GET /{service}/{version}/{profile}/{coordinates}[.{format}]?option=value&option=value
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| --- | --- |
|
||||
| `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})`. |
|
||||
| `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).
|
||||
|
||||
To pass parameters to each location some options support an array like encoding:
|
||||
|
||||
**Request options**
|
||||
|
||||
| Option | Values | Description |
|
||||
|----------------|--------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
|
||||
|bearings |`{bearing};{bearing}[;{bearing} ...]` |Limits the search to segments with given bearing in degrees towards true north in clockwise direction. |
|
||||
|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. |
|
||||
|
||||
Where the elements follow the following format:
|
||||
|
||||
| Element | Values |
|
||||
|------------|--------------------------------------------------------|
|
||||
|bearing |`{value},{range}` `integer 0 .. 360,integer 0 .. 180` |
|
||||
|radius |`double >= 0` or `unlimited` (default) |
|
||||
|hint |Base64 `string` |
|
||||
|
||||
```
|
||||
{option}={element};{element}[;{element} ... ]
|
||||
```
|
||||
|
||||
The number of elements must match exactly the number of locations. If you don't want to pass a value but instead use the default you can pass an empty `element`.
|
||||
|
||||
Example: 2nd location use the default value for `option`:
|
||||
|
||||
```
|
||||
{option}={element};;{element}
|
||||
```
|
||||
|
||||
#### Example Requests
|
||||
|
||||
```curl
|
||||
# Query on Berlin with three coordinates:
|
||||
curl 'http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false'
|
||||
|
||||
# Using polyline:
|
||||
curl 'http://router.project-osrm.org/route/v1/driving/polyline(ofp_Ik_vpAilAyu@te@g`E)?overview=false'
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
Every response object has a `code` property containing one of the strings below or a service dependent code:
|
||||
|
||||
| Type | Description |
|
||||
|-------------------|----------------------------------------------------------------------------------|
|
||||
| `Ok` | Request could be processed as expected. |
|
||||
| `InvalidUrl` | URL string is invalid. |
|
||||
| `InvalidService` | Service name is invalid. |
|
||||
| `InvalidVersion` | Version is not found. |
|
||||
| `InvalidOptions` | Options are invalid. |
|
||||
| `InvalidQuery` | The query string is synctactically malformed. |
|
||||
| `InvalidValue` | The successfully parsed query parameters are invalid. |
|
||||
| `NoSegment` | One of the supplied input coordinates could not snap to street segment. |
|
||||
| `TooBig` | The request size violates one of the service specific request size restrictions. |
|
||||
|
||||
- `message` is a **optional** human-readable error message. All other status types are service dependent.
|
||||
- In case of an error the HTTP status code will be `400`. Otherwise the HTTP status code will be `200` and `code` will be `Ok`.
|
||||
|
||||
#### Example response
|
||||
|
||||
```json
|
||||
{
|
||||
"code": "Ok",
|
||||
"message": "Everything worked"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Services
|
||||
|
||||
### Nearest service
|
||||
|
||||
Snaps a coordinate to the street network and returns the nearest `n` matches.
|
||||
|
||||
```endpoint
|
||||
GET http://{server}/nearest/v1/{profile}/{coordinates}.json?number={number}
|
||||
```
|
||||
|
||||
Where `coordinates` only supports a single `{longitude},{latitude}` entry.
|
||||
|
||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||
|
||||
|Option |Values |Description |
|
||||
|------------|------------------------------|----------------------------------------------------|
|
||||
|number |`integer >= 1` (default `1`) |Number of nearest segments that should be returned. |
|
||||
|
||||
**Response**
|
||||
|
||||
- `code` if the request was successful `Ok` otherwise see the service dependent and general status codes.
|
||||
- `waypoints` array of `Waypoint` objects sorted by distance to the input coordinate. Each object has at least the following additional properties:
|
||||
- `distance`: Distance in meters to the supplied input coordinate.
|
||||
|
||||
#### Example Requests
|
||||
|
||||
```curl
|
||||
# Querying nearest three snapped locations of `13.388860,52.517037` with a bearing between `20° - 340°`.
|
||||
curl 'http://router.project-osrm.org/nearest/v1/driving/13.388860,52.517037?number=3&bearings=0,20'
|
||||
```
|
||||
|
||||
#### Example Response
|
||||
|
||||
```json
|
||||
{
|
||||
"waypoints" : [
|
||||
{
|
||||
"hint" : "KSoKADRYroqUBAEAEAAAABkAAAAGAAAAAAAAABhnCQCLtwAA_0vMAKlYIQM8TMwArVghAwEAAQH1a66g",
|
||||
"distance" : 4.152629,
|
||||
"name" : "Friedrichstraße",
|
||||
"location" : [
|
||||
13.388799,
|
||||
52.517033
|
||||
]
|
||||
},
|
||||
{
|
||||
"hint" : "KSoKADRYroqUBAEABgAAAAAAAAAAAAAAKQAAABhnCQCLtwAA7kvMAAxZIQM8TMwArVghAwAAAQH1a66g",
|
||||
"distance" : 11.811961,
|
||||
"name" : "Friedrichstraße",
|
||||
"location" : [
|
||||
13.388782,
|
||||
52.517132
|
||||
]
|
||||
},
|
||||
{
|
||||
"hint" : "KioKgDbbDgCUBAEAAAAAABoAAAAAAAAAPAAAABlnCQCLtwAA50vMADJZIQM8TMwArVghAwAAAQH1a66g",
|
||||
"distance" : 15.872438,
|
||||
"name" : "Friedrichstraße",
|
||||
"location" : [
|
||||
13.388775,
|
||||
52.51717
|
||||
],
|
||||
}
|
||||
],
|
||||
"code" : "Ok"
|
||||
}
|
||||
```
|
||||
|
||||
### Route service
|
||||
|
||||
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}
|
||||
```
|
||||
|
||||
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), `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.
|
||||
|
||||
**Response**
|
||||
|
||||
- `code` if the request was successful `Ok` otherwise see the service dependent and general status codes.
|
||||
- `waypoints`: Array of `Waypoint` objects representing all waypoints in order:
|
||||
- `routes`: An array of `Route` objects, ordered by descending recommendation rank.
|
||||
|
||||
In case of error the following `code`s are supported in addition to the general ones:
|
||||
|
||||
| Type | Description |
|
||||
|-------------------|-----------------|
|
||||
| `NoRoute` | No route found. |
|
||||
|
||||
All other properties might be undefined.
|
||||
|
||||
#### Example Request
|
||||
|
||||
```curl
|
||||
# Query on Berlin with three coordinates and no overview geometry returned:
|
||||
curl 'http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false'
|
||||
```
|
||||
|
||||
### Table service
|
||||
|
||||
Computes the duration of the fastest route between all pairs of supplied coordinates.
|
||||
|
||||
```endpoint
|
||||
GET /table/v1/{profile}/{coordinates}?{sources}=[{elem}...];&destinations=[{elem}...]
|
||||
```
|
||||
|
||||
**Coordinates**
|
||||
|
||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||
|
||||
|Option |Values |Description |
|
||||
|------------|--------------------------------------------------|---------------------------------------------|
|
||||
|sources |`{index};{index}[;{index} ...]` or `all` (default)|Use location with given index as source. |
|
||||
|destinations|`{index};{index}[;{index} ...]` or `all` (default)|Use location with given index as destination.|
|
||||
|
||||
Unlike other array encoded options, the length of `sources` and `destinations` can be **smaller or equal**
|
||||
to number of input locations;
|
||||
|
||||
**Example:**
|
||||
|
||||
```
|
||||
sources=0;5;7&destinations=5;1;4;2;3;6
|
||||
```
|
||||
|
||||
|Element |Values |
|
||||
|------------|-----------------------------|
|
||||
|index |`0 <= integer < #locations` |
|
||||
|
||||
#### Example Request
|
||||
|
||||
```curl
|
||||
# Returns a 3x3 matrix:
|
||||
curl 'http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219'
|
||||
|
||||
# Returns a 1x3 matrix
|
||||
curl 'http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?sources=0'
|
||||
|
||||
# Returns a asymmetric 3x2 matrix with from the polyline encoded locations `qikdcB}~dpXkkHz`:
|
||||
curl 'http://router.project-osrm.org/table/v1/driving/polyline(egs_Iq_aqAppHzbHulFzeMe`EuvKpnCglA)?sources=0;1;3&destinations=2;4'
|
||||
```
|
||||
|
||||
**Response**
|
||||
|
||||
- `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. 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
|
||||
|
||||
In case of error the following `code`s are supported in addition to the general ones:
|
||||
|
||||
| Type | Description |
|
||||
|-------------------|-----------------|
|
||||
| `NoTable` | No route found. |
|
||||
|
||||
All other properties might be undefined.
|
||||
|
||||
### Match service
|
||||
|
||||
Map matching matches/snaps 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.
|
||||
|
||||
```endpoint
|
||||
GET /match/v1/{profile}/{coordinates}?steps={true|false}&geometries={polyline|polyline6|geojson}&overview={simplified|full|false}&annotations={true|false}
|
||||
```
|
||||
|
||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||
|
||||
|Option |Values |Description |
|
||||
|------------|------------------------------------------------|------------------------------------------------------------------------------------------|
|
||||
|steps |`true`, `false` (default) |Return route steps for each route |
|
||||
|geometries |`polyline` (default), `polyline6`, `geojson` |Returned route geometry format (influences overview and per step) |
|
||||
|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 |
|
||||
|------------|-----------------------------------|
|
||||
|timestamp |`integer` seconds since UNIX epoch |
|
||||
|radius |`double >= 0` (default 5m) |
|
||||
|
||||
The radius for each point should be the standard error of the location measured in meters from the true location.
|
||||
Use `Location.getAccuracy()` on Android or `CLLocation.horizontalAccuracy` on iOS.
|
||||
This value is used to determine which points should be considered as candidates (larger radius means more candidates) and how likely each candidate is (larger radius means far-away candidates are penalized less).
|
||||
The area to search is chosen such that the correct candidate should be considered 99.9% of the time (for more details see [this ticket](https://github.com/Project-OSRM/osrm-backend/pull/3184)).
|
||||
|
||||
**Response**
|
||||
|
||||
- `code` if the request was successful `Ok` otherwise see the service dependent and general status codes.
|
||||
- `tracepoints`: Array of `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 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 alternative routes leading to the destination from this trace point. 0 means there are no other routes reaching destination. Greater values mean that there are different routes available and different route can be selected if you provide more coordinates.
|
||||
- `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.
|
||||
|
||||
In case of error the following `code`s are supported in addition to the general ones:
|
||||
|
||||
| Type | Description |
|
||||
|-------------------|---------------------|
|
||||
| `NoMatch` | No matchings found. |
|
||||
|
||||
All other properties might be undefined.
|
||||
|
||||
### Trip service
|
||||
|
||||
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.
|
||||
|
||||
```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}'
|
||||
```
|
||||
|
||||
In addition to the [general options](#general-options) the following options are supported for this service:
|
||||
|
||||
|Option |Values |Description |
|
||||
|------------|------------------------------------------------|---------------------------------------------------------------------------|
|
||||
|roundtrip |`true` (default), `false` |Return route is a roundtrip (route returns to first location) |
|
||||
|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), `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.
|
||||
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.
|
||||
|
||||
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 |
|
||||
|
||||
#### Example Requests
|
||||
|
||||
```curl
|
||||
# Round trip in Berlin with three stops:
|
||||
curl 'http://router.project-osrm.org/trip/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219'
|
||||
```
|
||||
|
||||
```curl
|
||||
# Round trip in Berlin with four stops, starting at the first stop, ending at the last:
|
||||
curl 'http://router.project-osrm.org/trip/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219;13.418555,52.523215?source=first&destination=last'
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
- `code`: if the request was successful `Ok` otherwise see the service dependent and general status codes.
|
||||
- `waypoints`: Array of `Waypoint` objects representing all waypoints in input order. Each `Waypoint` object has the following additional properties:
|
||||
- `trips_index`: Index to `trips` of the sub-trip the point was matched to.
|
||||
- `waypoint_index`: Index of the point in the trip.
|
||||
- `trips`: An array of `Route` objects that assemble the trace.
|
||||
|
||||
In case of error the following `code`s are supported in addition to the general ones:
|
||||
|
||||
| Type | Description |
|
||||
|-------------------|---------------------|
|
||||
| `NoTrips` | No trips found because input coordinates are not connected.|
|
||||
| `NotImplemented` | This request is not supported |
|
||||
|
||||
All other properties might be undefined.
|
||||
|
||||
### Tile service
|
||||
|
||||
This service generates [Mapbox Vector Tiles](https://www.mapbox.com/developers/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.
|
||||
|
||||
```endpoint
|
||||
GET /tile/v1/{profile}/tile({x},{y},{zoom}).mvt
|
||||
```
|
||||
|
||||
The `x`, `y`, and `zoom` values are the same as described at 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/).
|
||||
|
||||
#### Example request
|
||||
|
||||
```curl
|
||||
# This fetches a Z=13 tile for downtown San Francisco:
|
||||
curl 'http://router.project-osrm.org/tile/v1/car/tile(1310,3166,13).mvt'
|
||||
```
|
||||
|
||||
#### Example response
|
||||
|
||||
> 
|
||||
> http://map.project-osrm.org/debug/#14.33/52.5212/13.3919
|
||||
|
||||
The response object is either a binary encoded blob with a `Content-Type` of `application/x-protobuf`, or a `404` error. Note that OSRM is hard-coded to only return tiles from zoom level 12 and higher (to avoid accidentally returning extremely large vector tiles).
|
||||
|
||||
Vector tiles contain two layers:
|
||||
|
||||
`speeds` layer:
|
||||
|
||||
| Property | Type | Description |
|
||||
| ------------ | --------- | ---------------------------------------- |
|
||||
| `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 |
|
||||
| `name` | `string` | the name of the road this segment belongs to |
|
||||
|
||||
`turns` layer:
|
||||
|
||||
| Property | Type | Description |
|
||||
| ------------ | --------- | ---------------------------------------- |
|
||||
| `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"). |
|
||||
|
||||
|
||||
## Result objects
|
||||
|
||||
### Route object
|
||||
|
||||
Represents a route through (potentially multiple) waypoints.
|
||||
|
||||
**Properties**
|
||||
|
||||
- `distance`: The distance traveled by the route, in `float` meters.
|
||||
- `duration`: The estimated travel time, in `float` number of seconds.
|
||||
- `geometry`: The whole geometry of the route value depending on `overview` parameter, format depending on the `geometries` parameter. See `RouteStep`'s `geometry` property for a parameter documentation.
|
||||
- `weight`: The calculated weight of the route.
|
||||
- `weight_name`: The name of the weight profile used during extraction phase.
|
||||
|
||||
| overview | Description |
|
||||
|------------|-----------------------------|
|
||||
| simplified | Geometry is simplified according to the highest zoom level it can still be displayed on full. |
|
||||
| full | Geometry is not simplified. |
|
||||
| false | Geometry is not added. |
|
||||
|
||||
- `legs`: The legs between the given waypoints, an array of `RouteLeg` objects.
|
||||
|
||||
#### Example
|
||||
|
||||
Three input coordinates, `geometry=geojson`, `steps=false`:
|
||||
|
||||
```json
|
||||
{
|
||||
"distance": 90.0,
|
||||
"duration": 300.0,
|
||||
"weight": 300.0,
|
||||
"weight_name": "duration",
|
||||
"geometry": {"type": "LineString", "coordinates": [[120.0, 10.0], [120.1, 10.0], [120.2, 10.0], [120.3, 10.0]]},
|
||||
"legs": [
|
||||
{
|
||||
"distance": 30.0,
|
||||
"duration": 100.0,
|
||||
"steps": []
|
||||
},
|
||||
{
|
||||
"distance": 60.0,
|
||||
"duration": 200.0,
|
||||
"steps": []
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### RouteLeg object
|
||||
|
||||
Represents a route between two waypoints.
|
||||
|
||||
**Properties**
|
||||
|
||||
- `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 `summary` parameter:
|
||||
|
||||
| summary | |
|
||||
|--------------|-----------------------------------------------------------------------|
|
||||
| true | Names of the two major roads used. Can be empty if route is too short.|
|
||||
| false | empty `string` |
|
||||
|
||||
- `steps`: Depends on the `steps` parameter.
|
||||
|
||||
| steps | |
|
||||
|--------------|-----------------------------------------------------------------------|
|
||||
| true | array of `RouteStep` objects describing the turn-by-turn instructions |
|
||||
| false | empty array |
|
||||
|
||||
- `annotation`: Additional details about each coordinate along the route geometry:
|
||||
|
||||
| annotations | |
|
||||
|--------------|-----------------------------------------------------------------------|
|
||||
| true | An `Annotation` object containing node ids, durations distances and |
|
||||
| false | weights `undefined` |
|
||||
|
||||
#### Example
|
||||
|
||||
With `steps=false` and `annotations=true`:
|
||||
|
||||
```json
|
||||
{
|
||||
"distance": 30.0,
|
||||
"duration": 100.0,
|
||||
"weight": 100.0,
|
||||
"steps": [],
|
||||
"annotation": {
|
||||
"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],
|
||||
"speed": [0.3, 0.3, 0.3, 0.3, 0.3]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Annotation object
|
||||
|
||||
Annotation of the whole route leg with fine-grained information about each segment or node id.
|
||||
|
||||
**Properties**
|
||||
|
||||
- `distance`: The distance, in metres, between each pair of coordinates
|
||||
- `duration`: The duration between each pair of coordinates, in seconds
|
||||
- `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
|
||||
|
||||
```json
|
||||
{
|
||||
"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],
|
||||
"weight": [15,15,40,15,15]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### RouteStep object
|
||||
|
||||
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.
|
||||
|
||||
**Properties**
|
||||
|
||||
- `distance`: The distance of travel from the maneuver to the subsequent step, in `float` meters.
|
||||
- `duration`: The estimated travel time, in `float` number of seconds.
|
||||
- `geometry`: The unsimplified geometry of the route segment, depending on the `geometries` parameter.
|
||||
- `weight`: The calculated weight of the step.
|
||||
|
||||
| `geometry` | |
|
||||
|------------|--------------------------------------------------------------------|
|
||||
| polyline | [polyline](https://www.npmjs.com/package/polyline) with precision 5 in [latitude,longitude] encoding |
|
||||
| polyline6 | [polyline](https://www.npmjs.com/package/polyline) with precision 6 in [latitude,longitude] encoding |
|
||||
| geojson | [GeoJSON `LineString`](http://geojson.org/geojson-spec.html#linestring) |
|
||||
|
||||
- `name`: The name of the way along which travel proceeds.
|
||||
- `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.
|
||||
- `mode`: A string signifying the mode of transportation.
|
||||
- `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
|
||||
|
||||
```json
|
||||
{
|
||||
"geometry" : "{lu_IypwpAVrAvAdI",
|
||||
"mode" : "driving",
|
||||
"duration" : 15.6,
|
||||
"weight" : 15.6,
|
||||
"intersections" : [
|
||||
{ "bearings" : [ 10, 92, 184, 270 ],
|
||||
"lanes" : [
|
||||
{ "indications" : [ "left", "straight" ],
|
||||
"valid" : "false" },
|
||||
{ "valid" : "true",
|
||||
"indications" : [ "right" ] }
|
||||
],
|
||||
"out" : 2,
|
||||
"in" : 3,
|
||||
"entry" : [ "true", "true", "true", "false" ],
|
||||
"location" : [ 13.39677, 52.54366 ]
|
||||
},
|
||||
{ "out" : 1,
|
||||
"lanes" : [
|
||||
{ "indications" : [ "straight" ],
|
||||
"valid" : "true" },
|
||||
{ "indications" : [ "right" ],
|
||||
"valid" : "false" }
|
||||
],
|
||||
"bearings" : [ 60, 240, 330 ],
|
||||
"in" : 0,
|
||||
"entry" : [ "false", "true", "true" ],
|
||||
"location" : [ 13.394718, 52.543096 ]
|
||||
}
|
||||
],
|
||||
"name" : "Lortzingstraße",
|
||||
"distance" : 152.3,
|
||||
"maneuver" : {
|
||||
"modifier" : "right",
|
||||
"type" : "turn"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### StepManeuver object
|
||||
|
||||
**Properties**
|
||||
|
||||
- `location`: A `[longitude, latitude]` pair describing the location of the turn.
|
||||
- `bearing_before`: The clockwise angle from true north to the
|
||||
direction of travel immediately before the maneuver. Range 0-359.
|
||||
- `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 existence of correct `modifier` values is guranteed.
|
||||
|
||||
| `type` | Description |
|
||||
|------------------|--------------------------------------------------------------|
|
||||
| `turn` | a basic turn into direction of the `modifier` |
|
||||
| `new name` | no turn is taken/possible, but the road name changes. The road can take a turn itself, following `modifier`. |
|
||||
| `depart` | indicates the departure of the leg |
|
||||
| `arrive` | indicates the destination of the leg |
|
||||
| `merge` | merge onto a street (e.g. getting on the highway from a ramp, the `modifier specifies the direction of the merge`) |
|
||||
| `ramp` | **Deprecated**. Replaced by `on_ramp` and `off_ramp`. |
|
||||
| `on ramp` | take a ramp to enter a highway (direction given my `modifier`) |
|
||||
| `off ramp` | take a ramp to exit a highway (direction given my `modifier`) |
|
||||
| `fork` | take the left/right side at a fork depending on `modifier` |
|
||||
| `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` 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 |
|
||||
|
||||
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.
|
||||
|
||||
- `modifier` An optional `string` indicating the direction change of the maneuver.
|
||||
|
||||
| `modifier` | Description |
|
||||
|-------------------|-------------------------------------------|
|
||||
| `uturn` | indicates reversal of direction |
|
||||
| `sharp right` | a sharp right turn |
|
||||
| `right` | a normal turn to the right |
|
||||
| `slight right` | a slight turn to the right |
|
||||
| `straight` | no relevant change in direction |
|
||||
| `slight left` | a slight turn to the left |
|
||||
| `left` | a normal turn to the left |
|
||||
| `sharp left` | a sharp turn to the left |
|
||||
|
||||
The list of turns without a modifier is limited to: `depart/arrive`. If the source/target location is close enough to the `depart/arrive` location, no modifier will be given.
|
||||
|
||||
The meaning depends on the `type` property.
|
||||
|
||||
| `type` | Description |
|
||||
|------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
||||
| `turn` | `modifier` indicates the change in direction accomplished through the turn |
|
||||
| `depart`/`arrive` | `modifier` indicates the position of departure point and arrival point in relation to the current direction of travel |
|
||||
|
||||
- `exit` An optional `integer` indicating number of the exit to take. The property exists for the `roundabout` / `rotary` property:
|
||||
Number of the roundabout exit to take. If exit is `undefined` the destination is on the roundabout.
|
||||
|
||||
|
||||
New properties (potentially depending on `type`) may be introduced in the future without an API version change.
|
||||
|
||||
### Lane object
|
||||
|
||||
A `Lane` represents a turn lane at the corresponding turn location.
|
||||
|
||||
**Properties**
|
||||
|
||||
- `indications`: a indication (e.g. marking on the road) specifying the turn lane. A road can have multiple indications (e.g. an arrow pointing straight and left). The indications are given in an array, each containing one of the following types. Further indications might be added on without an API version change.
|
||||
|
||||
| `value` | Description |
|
||||
|------------------------|---------------------------------------------------------------------------------------------------------------------------|
|
||||
| `none` | No dedicated indication is shown. |
|
||||
| `uturn` | An indication signaling the possibility to reverse (i.e. fully bend arrow). |
|
||||
| `sharp right` | An indication indicating a sharp right turn (i.e. strongly bend arrow). |
|
||||
| `right` | An indication indicating a right turn (i.e. bend arrow). |
|
||||
| `slight right` | An indication indicating a slight right turn (i.e. slightly bend arrow). |
|
||||
| `straight` | No dedicated indication is shown (i.e. straight arrow). |
|
||||
| `slight left` | An indication indicating a slight left turn (i.e. slightly bend arrow). |
|
||||
| `left` | An indication indicating a left turn (i.e. bend arrow). |
|
||||
| `sharp left` | An indication indicating a sharp left turn (i.e. strongly bend arrow). |
|
||||
|
||||
- `valid`: a boolean flag indicating whether the lane is a valid choice in the current maneuver
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"indications": ["left", "straight"],
|
||||
"valid": "false"
|
||||
}
|
||||
```
|
||||
|
||||
### Intersection object
|
||||
|
||||
An intersection gives a full representation of any cross-way the path passes bay. For every step, the very first intersection (`intersections[0]`) corresponds to the
|
||||
location of the StepManeuver. Further intersections are listed for every cross-way until the next turn instruction.
|
||||
|
||||
**Properties**
|
||||
|
||||
- `location`: A `[longitude, latitude]` pair describing the location of the turn.
|
||||
- `bearings`: A list of bearing values (e.g. [0,90,180,270]) that are available at the intersection. The bearings describe all available roads at the intersection. Values are between 0-359 (0=true north)
|
||||
- `entry`: A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of `true` indicates that the respective road could be entered on a valid route.
|
||||
`false` indicates that the turn onto the respective road would violate a restriction.
|
||||
- `in`: index into bearings/entry array. Used to calculate the bearing just before the turn. Namely, the clockwise angle from true north to the
|
||||
direction of travel immediately before the maneuver/passing the intersection. Bearings are given relative to the intersection. To get the bearing
|
||||
in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for `depart` maneuvers.
|
||||
- `out`: index into the bearings/entry array. Used to extract the bearing just after the turn. Namely, The clockwise angle from true north to the
|
||||
direction of travel immediately after the maneuver/passing the intersection. The value is not supplied for `arrive` maneuvers.
|
||||
- `lanes`: Array of `Lane` objects that denote the available turn lanes at the intersection. If no lane information is available for an intersection, the `lanes` property will not be present.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"location":[13.394718,52.543096],
|
||||
"in":0,
|
||||
"out":2,
|
||||
"bearings":[60,150,240,330],
|
||||
"entry":["false","true","true","true"],
|
||||
"lanes":{
|
||||
"indications": ["left", "straight"],
|
||||
"valid": "false"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Waypoint object
|
||||
|
||||
Object used to describe waypoint on a route.
|
||||
|
||||
**Properties**
|
||||
|
||||
- `name` Name of the street the coordinate snapped to
|
||||
- `location` Array that contains the `[longitude, latitude]` pair of the snapped coordinate
|
||||
- `hint` Unique internal identifier of the segment (ephemeral, not constant over data updates)
|
||||
This can be used on subsequent request to significantly speed up the query and to connect multiple services.
|
||||
E.g. you can use the `hint` value obtained by the `nearest` query as `hint` values for `route` inputs.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"hint" : "KSoKADRYroqUBAEAEAAAABkAAAAGAAAAAAAAABhnCQCLtwAA_0vMAKlYIQM8TMwArVghAwEAAQH1a66g",
|
||||
"distance" : 4.152629,
|
||||
"name" : "Friedrichstraße",
|
||||
"location" : [
|
||||
13.388799,
|
||||
52.517033
|
||||
]
|
||||
}
|
||||
```
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 694 KiB |
@@ -0,0 +1,33 @@
|
||||
## Introduction
|
||||
|
||||
OSRM can be used as a library (libosrm) via C++ instead of using it through the HTTP interface and `osrm-routed`. This allows for fine-tuning OSRM and has much less overhead. Here is a quick introduction into how to use `libosrm` in the upcoming v5 release.
|
||||
|
||||
Take a look at the example code that lives in the [example directory](https://github.com/Project-OSRM/osrm-backend/tree/master/example). Here is all you ever wanted to know about `libosrm`, that is a short description of what the types do and where to find documentation on it:
|
||||
|
||||
## Important interface objects
|
||||
|
||||
- [`EngineConfig`](https://github.com/Project-OSRM/osrm-backend/blob/master/include/engine/engine_config.hpp) - for initializing an OSRM instance we can configure certain properties and constraints. E.g. the storage config is the base path such as `france.osm.osrm` from which we derive and load `france.osm.osrm.*` auxiliary files. This also lets you set constraints such as the maximum number of locations allowed for specific services.
|
||||
|
||||
- [`OSRM`](https://github.com/Project-OSRM/osrm-backend/blob/master/include/osrm/osrm.hpp) - this is the main Routing Machine type with functions such as `Route` and `Table`. You initialize it with a `EngineConfig`. It does all the heavy lifting for you. Each function takes its own parameters, e.g. the `Route` function takes `RouteParameters`, and a out-reference to a JSON result that gets filled. The return value is a `Status`, indicating error or success.
|
||||
|
||||
- [`Status`](https://github.com/Project-OSRM/osrm-backend/blob/master/include/engine/status.hpp) - this is a type wrapping `Error` or `Ok` for indicating error or success, respectively.
|
||||
|
||||
- [`TableParameters`](https://github.com/Project-OSRM/osrm-backend/blob/master/include/engine/api/table_parameters.hpp) - this is an example of parameter types the Routing Machine functions expect. In this case `Table` expects its own parameters as `TableParameters`. You can see it wrapping two vectors, sources and destinations --- these are indices into your coordinates for the table service to construct a matrix from (empty sources or destinations means: use all of them). If you ask yourself where coordinates come from, you can see `TableParameters` inheriting from `BaseParameters`.
|
||||
|
||||
- [`BaseParameter`](https://github.com/Project-OSRM/osrm-backend/blob/master/include/engine/api/base_parameters.hpp) - this most importantly holds coordinates (and a few other optional properties that you don't need for basic usage); the specific parameter types inherit from `BaseParameters` to get these member attributes. That means your `TableParameters` type has `coordinates`, `sources` and `destination` member attributes (and a few other that we ignore for now).
|
||||
|
||||
- [`Coordinate`](https://github.com/Project-OSRM/osrm-backend/blob/master/include/util/coordinate.hpp) - this is a wrapper around a (longitude, latitude) pair. We really don't care about (lon,lat) vs (lat, lon) but we don't want you to accidentally mix them up, so both latitude and longitude are strictly typed wrappers around integers (fixed notation such as `13423240`) and floating points (floating notation such as `13.42324`).
|
||||
|
||||
- [Parameters for other services](https://github.com/Project-OSRM/osrm-backend/tree/master/include/engine/api) - here are all other `*Parameters` you need for other Routing Machine services.
|
||||
|
||||
- [JSON](https://github.com/Project-OSRM/osrm-backend/blob/master/include/util/json_container.hpp) - this is a sum type resembling JSON. The Routing Machine service functions take a out-ref to a JSON result and fill it accordingly. It is currently implemented using [mapbox/variant](https://github.com/mapbox/variant) which is similar to [Boost.Variant](http://www.boost.org/doc/libs/1_55_0/doc/html/variant.html). There are two ways to work with this sum type: either provide a visitor that acts on each type on visitation or use the `get` function in case you're sure about the structure. The JSON structure is written down in the [HTTP API](#http-api).
|
||||
|
||||
## Example
|
||||
|
||||
See [the example folder](https://github.com/Project-OSRM/osrm-backend/tree/master/example) in the OSRM repository.
|
||||
|
||||
## Workflow
|
||||
|
||||
- Create an `OSRM` instance initialized with a `EngineConfig`
|
||||
- Call the service function on the `OSRM` object providing service specific `*Parameters`
|
||||
- Check the return code and use the JSON result
|
||||
@@ -0,0 +1,333 @@
|
||||
# OSRM
|
||||
|
||||
The `OSRM` method is the main constructor for creating an OSRM instance. An OSRM instance requires a `.osrm` network,
|
||||
which is prepared by the OSRM Backend C++ library.
|
||||
|
||||
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 or further details.
|
||||
|
||||
Once you have a complete `network.osrm` file, you can calculate networks in javascript with this library using the
|
||||
methods below. To create an OSRM instance with your network you need to construct an instance like this:
|
||||
|
||||
```javascript
|
||||
var osrm = new OSRM('network.osrm');
|
||||
```
|
||||
|
||||
#### Methods
|
||||
|
||||
| Service | Description |
|
||||
| -------------------------- | --------------------------------------------------------- |
|
||||
| [`osrm.route`](#route) | shortest path between given coordinates |
|
||||
| [`osrm.nearest`](#nearest) | returns the nearest street segment for a given coordinate |
|
||||
| [`osrm.table`](#table) | computes distance tables for given coordinates |
|
||||
| [`osrm.match`](#match) | matches given coordinates to the road network |
|
||||
| [`osrm.trip`](#trip) | Compute the shortest trip between given coordinates |
|
||||
| [`osrm.tile`](#tile) | Return vector tiles containing debugging info |
|
||||
|
||||
#### General Options
|
||||
|
||||
Each OSRM method (except for `OSRM.tile()`) has set of general options as well as unique options, outlined below.
|
||||
|
||||
| Option | Values | Description | Format |
|
||||
| --------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| coordinates | `array` of `coordinate` elements: `[{coordinate}, ...]` | The coordinates this request will use. | `array` with `[{lon},{lat}]` values, in decimal degrees |
|
||||
| bearings | `array` of `bearing` elements: `[{bearing}, ...]` | Limits the search to segments with given bearing in degrees towards true north in clockwise direction. | `null` or `array` with `[{value},{range}]` `integer 0 .. 360,integer 0 .. 180` |
|
||||
| radiuses | `array` of `radius` elements: `[{radius}, ...]` | Limits the search to given radius in meters. | `null` or `double >= 0` or `unlimited` (default) |
|
||||
| hints | `array` of `hint` elements: `[{hint}, ...]` | Hint to derive position in street network. | Base64 `string` |
|
||||
| generate\_hints | `true` (default) or `false` | Adds a Hint to the response which can be used in subsequent requests, see `hints` parameter. | `Boolean` |
|
||||
|
||||
## 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.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)]** Return route steps for each route leg. (optional, default `false`)
|
||||
- `options.annotations` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)] or \[[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)>]** Return annotations for each route leg for duration, nodes, distance, weight, datasources and/or speed. Annotations can be `false` or `true` (no/full annotations) or an array of strings with `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed`. (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`
|
||||
- `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: [[13.438640,52.519930], [13.415852, 52.513191]]}, 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.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`)
|
||||
- `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.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.
|
||||
- `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.steps` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** Return route steps for each route. (optional, default `false`)
|
||||
- `options.annotations` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)] or \[[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)>]** Return annotations for each route leg for duration, nodes, distance, weight, datasources and/or speed. Annotations can be `false` or `true` (no/full annotations) or an array of strings with `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed`. (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 (`double >= 0`, default `5m`).
|
||||
- `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). The returned path does not have to be the fastest path, as TSP is NP-hard it is only an approximation. Note that all input coordinates have to be connected for the trip service to work.
|
||||
|
||||
**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.roundtrip` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** Return route is a roundtrip. (optional, default `true`)
|
||||
- `options.source` **\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** Return route starts at `any` coordinate. Can also be `first`. (optional, default `any`)
|
||||
- `options.destination` **\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** Return route ends at `any` coordinate. Can also be `last`. (optional, default `any`)
|
||||
- `options.steps` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)]** Return route steps for each route. (optional, default `false`)
|
||||
- `options.annotations` **\[[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)] or \[[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)>]** Return annotations for each route leg for duration, nodes, distance, weight, datasources and/or speed. Annotations can be `false` or `true` (no/full annotations) or an array of strings with `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed`. (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`)
|
||||
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
|
||||
|
||||
**Fixing Start and End Points**
|
||||
|
||||
It is possible to explicitly 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.
|
||||
|
||||
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**
|
||||
|
||||
Roundtrip Request
|
||||
```javascript
|
||||
var osrm = new OSRM('network.osrm');
|
||||
var options = {
|
||||
coordinates: [
|
||||
[13.36761474609375, 52.51663871100423],
|
||||
[13.374481201171875, 52.506191342034576]
|
||||
]
|
||||
}
|
||||
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
|
||||
});
|
||||
```
|
||||
|
||||
Non Roundtrip Request
|
||||
```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 [`Ẁaypoint`](#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`](https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#route)
|
||||
|
||||
## RouteLeg
|
||||
|
||||
Represents a route between two waypoints.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `exteral` **documentation** in [`osrm-backend`](https://github.com/Project-OSRM/osrm-backend/blob/master/docs/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#stepmanuever)
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,124 @@
|
||||
OSRM supports "profiles". Configurations representing different routing behaviours for (typically) different transport modes. A profile describes whether or not we route along a particular type of way, or over a particular node in the OpenStreetMap data, and also how quickly we'll be travelling when we do. This feeds into the way the routing graph is created and thus influences the output routes.
|
||||
|
||||
## Available profiles
|
||||
|
||||
Out-of-the-box OSRM comes with several different profiles, including car, bicycle and foot.
|
||||
|
||||
Profile configuration files have a 'lua' extension, and are found under the 'profiles' subdirectory.
|
||||
Alternatively commands will take a lua profile specified with an explicit -p param, for example:
|
||||
|
||||
`osrm-extract -p ../profiles/car.lua planet-latest.osm.pbf`
|
||||
|
||||
And then **you will need to extract and contract again** (A change to the profile will typically affect the extract step as well as the contract step. See [Processing Flow](https://github.com/Project-OSRM/osrm-backend/wiki/Processing-Flow))
|
||||
|
||||
## lua scripts?
|
||||
|
||||
Profiles are not just configuration files. They are scripts written in the "lua" scripting language ( http://www.lua.org ) The reason for this, is that OpenStreetMap data is not sufficiently straightforward, to simply define tag mappings. Lua scripting offers a powerful way of coping with the complexity of different node,way,relation,tag combinations found within OpenStreetMap data.
|
||||
|
||||
## Basic structure of a profile
|
||||
|
||||
You can understand these lua scripts enough to make interesting modifications, without needing to get to grips with how they work completely.
|
||||
|
||||
Towards the top of the file, a profile (such as [car.lua](../profiles/car.lua)) will typically define various configurations as global variables. A lot of these are look-up hashes of one sort or another.
|
||||
|
||||
As you scroll down the file you'll see local variables, and then local functions, and finally...
|
||||
|
||||
`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)
|
||||
use_turn_restrictions | Boolean | Are turn instructions followed?
|
||||
continue_straight_at_waypoint | Boolean | Must the route continue straight on at a via point, or are U-turns allowed?
|
||||
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
|
||||
|
||||
## 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.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
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). Defined in include/extractor/travel_mode.hpp
|
||||
backward_mode | Enum | " "
|
||||
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
|
||||
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.
|
||||
|
||||
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)
|
||||
@@ -0,0 +1,56 @@
|
||||
# Releasing a new OSRM version
|
||||
|
||||
We are using http://semver.org/ for versioning with major, minor and patch versions.
|
||||
|
||||
## Guarantees
|
||||
|
||||
We are giving the following guarantees between versions:
|
||||
|
||||
### Major version change
|
||||
|
||||
- There are no guarantees about compatiblity of APIs or datasets
|
||||
- Breaking changes will be noted as `BREAKING` in the changelog
|
||||
|
||||
### Minor version change
|
||||
|
||||
We may introduce forward-compatible changes: query parameters and response properties may be added in responses, but existing properties may not be changed or removed. One exception to this is the addition of new turn types, which we see as forward-compatible changes.
|
||||
|
||||
- Forward-compatible HTTP API
|
||||
- Forward-compatible C++ library API
|
||||
- Forward-compatible node-osrm API
|
||||
- No compatiblity between OSRM datasets (needs new processing)
|
||||
|
||||
### Patch version change
|
||||
|
||||
- No change of query parameters or response formats
|
||||
- Compatible HTTP API
|
||||
- Compatible C++ library API
|
||||
- Compatible node-osrm API
|
||||
- Compatible OSRM datasets
|
||||
|
||||
## Release and branch management
|
||||
|
||||
- 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 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 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 `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.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
## Environment Variables
|
||||
|
||||
### SIGNAL_PARENT_WHEN_READY
|
||||
|
||||
If the SIGNAL_PARENT_WHEN_READY environment variable is set osrm-routed will
|
||||
send the USR1 signal to its parent when it will be running and waiting for
|
||||
requests. This could be used to upgrade osrm-routed to a new binary on the fly
|
||||
without any service downtime - no incoming requests will be lost.
|
||||
|
||||
### DISABLE_ACCESS_LOGGING
|
||||
|
||||
If the DISABLE_ACCESS_LOGGING environment variable is set osrm-routed will
|
||||
**not** log any http requests to standard output. This can be useful in high
|
||||
traffic setup.
|
||||
@@ -0,0 +1,16 @@
|
||||
var fs = require('fs');
|
||||
|
||||
/**
|
||||
* This file exports the content of your website, as a bunch of concatenated
|
||||
* Markdown files. By doing this explicitly, you can control the order
|
||||
* of content without any level of abstraction.
|
||||
*
|
||||
* Using the brfs module, fs.readFileSync calls in this file are translated
|
||||
* into strings of those files' content before the file is delivered to a
|
||||
* browser: the content is read ahead-of-time and included in bundle.js.
|
||||
*/
|
||||
module.exports =
|
||||
'# HTTP API\n' +
|
||||
fs.readFileSync('./content/http.md', 'utf8') + '\n'+
|
||||
'# libosrm C++ API\n' +
|
||||
fs.readFileSync('./content/libosrm.md', 'utf8') + '\n';
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8' />
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=11' />
|
||||
<title>OSRM API Documentation</title>
|
||||
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
|
||||
<link href='css/base.css' rel='stylesheet' />
|
||||
<link href='css/style.css' rel='stylesheet' />
|
||||
<link href='css/railscasts.css' rel='stylesheet' />
|
||||
</head>
|
||||
<body>
|
||||
<!--START--><div id='app'></div><!--STOP-->
|
||||
<script src='bundle.js'></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Brand names, in order to decreasing length, for different
|
||||
* media queries.
|
||||
*/
|
||||
module.exports.brandNames = {
|
||||
desktop: 'OSRM API Documentation',
|
||||
tablet: 'OSRM API Docs',
|
||||
mobile: 'OSRM API'
|
||||
};
|
||||
|
||||
/**
|
||||
* Classes that define the top-left brand box.
|
||||
*/
|
||||
module.exports.brandClasses = 'fill-red';
|
||||
|
||||
|
||||
/**
|
||||
* Text for the link back to the linking website.
|
||||
*/
|
||||
module.exports.backLink = 'Back to project-osrm.org';
|
||||
|
||||
/**
|
||||
* Runs after highlighting code samples. You can use this
|
||||
* hook to, for instance, highlight a token and link it
|
||||
* to some canonical part of documentation.
|
||||
*/
|
||||
module.exports.postHighlight = function(html) {
|
||||
return html;
|
||||
};
|
||||
|
||||
/**
|
||||
* Highlight tokens in endpoint URLs, optionally linking to documentation
|
||||
* or adding detail. This is the equivalent of postHighlight but it
|
||||
* operates on endpoint URLs only.
|
||||
*/
|
||||
function highlightTokens(str) {
|
||||
return str.replace(/{[\w_]+}/g,
|
||||
(str) => '<span class="strong">' + str + '</span>');
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform endpoints given as strings in a highlighted block like
|
||||
*
|
||||
* ```endpoint
|
||||
* GET /foo/bar
|
||||
* ```
|
||||
*
|
||||
* Into HTML nodes that format those endpoints in nice ways.
|
||||
*/
|
||||
module.exports.transformURL = function(value) {
|
||||
let parts = value.split(/\s+/);
|
||||
return {
|
||||
type: 'html',
|
||||
value: `<div class='endpoint dark fill-dark round '>
|
||||
<div class='round-left pad0y pad1x fill-lighten0 code small endpoint-method'>${parts[0]}</div>
|
||||
<div class='pad0 code small endpoint-url'>${highlightTokens(parts[1])}</div>
|
||||
</div>`
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.remarkPlugins = [];
|
||||
+406
@@ -0,0 +1,406 @@
|
||||
# Testsuite
|
||||
|
||||
OSRM comes with a testsuite containing both unit-tests using the Boost library and cucumber.js for scenario driven testing.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
For a general introduction on Boost.Test have a look at [its docs](http://www.boost.org/doc/libs/1_60_0/libs/test/doc/html/index.html).
|
||||
|
||||
### Separate Test Binaries
|
||||
|
||||
Unit tests should be registered according to the sub-project they're in.
|
||||
If you want to write tests for utility functions, add them to the utility test binary.
|
||||
See `CMakeLists.txt` in the unit test directory for how to register new unit tests.
|
||||
|
||||
### Using Boost.Test Primitives
|
||||
|
||||
There is a difference between only reporting a failed condition and aborting the test right at a failed condition.
|
||||
Have a look at [`BOOST_CHECK` vs `BOOST_REQUIRE`](http://www.boost.org/doc/libs/1_60_0/libs/test/doc/html/boost_test/utf_reference/testing_tool_ref/assertion_boost_level.html).
|
||||
Instead of manually checking e.g. for equality, less than, if a function throws etc. use their [corresponding Boost.Test primitives](http://www.boost.org/doc/libs/1_60_0/libs/test/doc/html/boost_test/utf_reference/testing_tool_ref.html).
|
||||
|
||||
If you use `BOOST_CHECK_EQUAL` you have to implement `operator<<` for your type so that Boost.Test can print mismatches.
|
||||
If you do not want to do this, define `BOOST_TEST_DONT_PRINT_LOG_VALUE` (and undef it after the check call) or sidestep it with `BOOST_CHECK(fst == snd);`.
|
||||
|
||||
### Test Fixture
|
||||
|
||||
If you need to test features on a real dataset (think about this twice: prefer cucumber and dataset-independent tests for their reproducibility and minimality), there is a fixed dataset in `test/data`.
|
||||
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
|
||||
|
||||
For a general introduction on cucumber in our testsuite, have a look at [the wiki](https://github.com/Project-OSRM/osrm-backend/wiki/Cucumber-Test-Suite).
|
||||
|
||||
This documentation aims to supply a guideline on how to write cucumber tests that test new features introduced into osrm.
|
||||
|
||||
### Test the feature
|
||||
|
||||
It is often tempting to reduce the test to a path and accompanying instructions. Instructions can and will change over the course of improving guidance.
|
||||
|
||||
Instructions should only be used when writing a feature located in `features/guidance`. All other features should avoid using instructions at all.
|
||||
|
||||
### Write Tests to Scale
|
||||
|
||||
OSRM is a navigation engine. Tests should always consider this background.
|
||||
|
||||
An important implication is the grid size. If tests use a very small grid size, you run into the chance of instructions being omitted.
|
||||
For example:
|
||||
|
||||
```
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Testbot - Straight Road
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
| ab | primary |
|
||||
| bc | primary |
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | ab,bc,cd,cd |
|
||||
|
||||
```
|
||||
|
||||
In a navigation engine, the instructions
|
||||
|
||||
- depart east on ab
|
||||
- in 10 meters the road name changes to bc
|
||||
- in 10 meters the road name changes to cd
|
||||
- you arrived at cd
|
||||
|
||||
would be impossible to announce and not helpful at all.
|
||||
Since no actual choices exist, the route you get could result in `ab,cd` and simply say `depart` and `arrive`.
|
||||
|
||||
To prevent such surprises, always consider the availability of other roads and use grid sizes/road lengths that correspond to actually reasonable scenarios in a road network.
|
||||
|
||||
### Use names
|
||||
|
||||
If you specify many nodes in close succession to present a specific road geometry, consider using `name` to indicate to OSRM that the segment is a single road.
|
||||
|
||||
```
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Testbot - Straight Road
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | primary | road |
|
||||
| bc | primary | road |
|
||||
| cd | primary | road |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | road,road | depart,arrive |
|
||||
|
||||
```
|
||||
|
||||
Guidance guarantees only essential maneuvers. You will always see `depart` and `arrive` as well as all turns that are not obvious.
|
||||
|
||||
So the following scenario does not change the instructions
|
||||
|
||||
```
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Testbot - Straight Road
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | primary | road |
|
||||
| bc | primary | road |
|
||||
| cd | primary | road |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | road,road | depart,arrive |
|
||||
```
|
||||
|
||||
but if we modify it to
|
||||
|
||||
```
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Testbot - Straight Road
|
||||
Given the node map
|
||||
"""
|
||||
a b e
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | primary | road |
|
||||
| bc | primary | road |
|
||||
| cd | primary | road |
|
||||
| be | primary | turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | road,road,road | depart,continue right,arrive |
|
||||
```
|
||||
|
||||
### Test all directions
|
||||
|
||||
Modelling a road as roundabout has an implied oneway tag associated with it. In the following case, we can route from `a` to `d` but not from `d` to `a`.
|
||||
To discover those errors, make sure to check for all allowed directions.
|
||||
|
||||
```
|
||||
Scenario: Enter and Exit mini roundabout with sharp angle # features/guidance/mini-roundabout.feature:37
|
||||
Given the profile "car" # features/step_definitions/data.js:8
|
||||
Given a grid size of 10 meters # features/step_definitions/data.js:20
|
||||
Given the node map # features/step_definitions/data.js:45
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
And the ways # features/step_definitions/data.js:128
|
||||
| nodes | highway | name |
|
||||
| ab | tertiary | MySt |
|
||||
| bc | roundabout | |
|
||||
| cd | tertiary | MySt |
|
||||
When I route I should get # features/step_definitions/routing.js:4
|
||||
| from | to | route | turns | # |
|
||||
| a | d | MySt,MySt | depart,arrive | # suppress multiple enter/exit mini roundabouts |
|
||||
| d | a | MySt,MySt | depart,arrive | # suppress multiple enter/exit mini roundabouts |
|
||||
Tables were not identical:
|
||||
| from | to | route | turns | #
|
||||
| a | d | MySt,MySt | depart,arrive | # suppress multiple enter/exit mini roundabouts |
|
||||
| (-) d | (-) a | (-) MySt,MySt | (-) depart,arrive | (-) # suppress multiple enter/exit mini roundabouts |
|
||||
| (+) d | (+) a | (+) | (+) | (+) # suppress multiple enter/exit mini roundabouts |
|
||||
```
|
||||
|
||||
### Prevent Randomness
|
||||
|
||||
Some features in OSRM can result in strange experiences during testcases. To prevent some of these issues, follow the guidelines below.
|
||||
|
||||
#### Use Waypoints
|
||||
|
||||
Using grid nodes as waypoints offers the chance of unwanted side effects.
|
||||
OSRM converts the grid into a so called edge-based graph.
|
||||
|
||||
```
|
||||
Scenario: Testbot - Intersection
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
b a d
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| ab | primary | yes |
|
||||
| ac | primary | yes |
|
||||
| ad | primary | yes |
|
||||
| ae | primary | yes |
|
||||
```
|
||||
Selecting `a` as a `waypoint` results in four possible starting locations. Which one of the routes `a,b`, `a,c`, `a,d`, or `a,e` is found is pure chance and depends on the order in the static `r-tree`.
|
||||
|
||||
To guarantee discovery, use:
|
||||
|
||||
```
|
||||
Scenario: Testbot - Intersection
|
||||
Given the node map
|
||||
"""
|
||||
e
|
||||
4
|
||||
b 1 a 3 d
|
||||
2
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| ab | primary | yes |
|
||||
| ac | primary | yes |
|
||||
| ad | primary | yes |
|
||||
| ae | primary | yes |
|
||||
```
|
||||
And use `1`,`2`,`3`, and `4` as starting waypoints. The routes `1,b`, `2,c`, `3,d`, and `4,e` can all be discovered.
|
||||
|
||||
#### Allow For Small Offsets
|
||||
|
||||
Whenever you are independent of the start location (see use waypoints), the waypoint chosen as start/end location can still influence distances/durations.
|
||||
|
||||
If you are testing for a duration metric, allow for a tiny offset to ensure a passing test in the presence of rounding/snapping issues.
|
||||
|
||||
#### Don't Rely on Alternatives
|
||||
|
||||
Alternative route discovery is a random feature in itself. The discovery of routes depends on the contraction order of roads and cannot be assumed successful, ever.
|
||||
|
||||
### Understanding Turn Restrictions
|
||||
|
||||
Adding turn restrictions requires the restriction to follow a very specific format.
|
||||
|
||||
We specify them in a table with the header `| type | way:from | way:to | node:via | restriction |`.
|
||||
It is important that turn restrictions require micro segmentation.
|
||||
|
||||
Consider the following scenario:
|
||||
```
|
||||
Given the node map:
|
||||
"""
|
||||
e
|
||||
|
|
||||
a - - b - - c
|
||||
|
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abc | yes |
|
||||
| ebd | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | ebd | b | no_right_turn |
|
||||
```
|
||||
|
||||
The setting looks perfectly fine at first glance. However, it is not well defined.
|
||||
The forbidden right turn could be either a superfluous addition, forbidding the turn `cb` to `be`, or actually refer to the turn `ab` to `bd` to say that a turn is forbidden here.
|
||||
|
||||
To model turn-restrictions correctly and unique, we need to split segments that contribute to the restriction into the smallest possible parts.
|
||||
E.g. the above scenario could correctly be expressed as:
|
||||
|
||||
```
|
||||
Given the node map:
|
||||
"""
|
||||
e
|
||||
|
|
||||
a - - b - - c
|
||||
|
|
||||
d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | name |
|
||||
| ab | yes | abc |
|
||||
| bc | yes | abc |
|
||||
| eb | yes | ebd |
|
||||
| bd | yes | ebd |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | ab | bd | b | no_right_turn |
|
||||
```
|
||||
|
||||
Unless this format is used, OSRM will omit the (then ambiguous) turn restrictions and ignore them.
|
||||
|
||||
## My Guidance Tests are Failing - Understanding what you can change
|
||||
|
||||
If you change some stuff in guidance, you will easily see tests change their result. E.g. if you change the angles for which we report `right`, then obviously some tests might not report a `direction modifier` named `right` anymore.
|
||||
|
||||
This small section will try to guide you in making the correct decisions for changing the behaviour of tests.
|
||||
|
||||
The difficulty in guidance tests is that not all items can be translated 1:1 from the ascii art into turn-angles.
|
||||
|
||||
The turn-angle calculation tries to find turn angles that would represent perceived turn angles, not the exact angle at the connection.
|
||||
|
||||
This is necessary, since connections in OSM are always bound by the paradigm that the way is supposed to be in the middle of the actual road.
|
||||
For broad streets, you will see stronger angles than the actual turns.
|
||||
|
||||
### Don't change the test, change the expected behaviour
|
||||
|
||||
If we have a test that looks like this:
|
||||
|
||||
```
|
||||
Given a grid size of 5 m
|
||||
Given the node map
|
||||
"""
|
||||
a - b - - - - - - c
|
||||
\
|
||||
d - - - - - e
|
||||
"""
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abc,bde,bde | depart,turn slight right,arrive|
|
||||
```
|
||||
|
||||
And the test reports `turn right` for the route `a->e`, where before it said `slight right`.
|
||||
|
||||
If you changed the turn angles, obviously you can expect changes in the distinction between `slight right` and `right`.
|
||||
In such a case it is, of course, reasonable to change the expected route to report `right` instead of `slight right`. You should consider inspecting the actual turn angles at `b` to see if you feel that change is justified.
|
||||
|
||||
However, you should never adjust the test itself.
|
||||
If you look at a failure, the other way around
|
||||
|
||||
```
|
||||
Given a grid size of 5 m
|
||||
Given the node map
|
||||
"""
|
||||
a - b - - - - - - c
|
||||
\
|
||||
d - - - - - e
|
||||
"""
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abc,bde,bde | depart,turn right,arrive|
|
||||
```
|
||||
|
||||
where we see a `slight right`, over the expected `right`.
|
||||
We could be tempted to adjust the grid size (e.g. from `10 m` to `20` meters).
|
||||
|
||||
Such a change would fundamentally alter the tests, though.
|
||||
Since the part `b-d` is a short offset, when we are looking at a grid of size `5 m`, the angle calculation will try and compensate for this offset.
|
||||
|
||||
In this case we would see a very slight turn angle. If your change now reports different turn angles, you can of course change the expected result. But you should not adjust the grid size. The test would be testing turn angles of `180` and `100` degrees, instead of `180` and `160`.
|
||||
|
||||
### Consider Post-Processing Impacts
|
||||
|
||||
Some changes you might see could look completely unrelated. To understand the impact of your changes, you can make use of the debugging utilities you can finde in `util/debug.hpp` (and potentially other related headers).
|
||||
|
||||
If your test is inspecting a series of turns (remember, a turn not necessarily equals an instruction), you could see interaction with post-processing.
|
||||
To see the unprocessed turns, you should print the steps at the end of step assembly (`assembleSteps` in `engine/guidance/assemble_steps.hpp`).
|
||||
|
||||
If you see unexpected changes, you can consider adding the `locations` field to your test to study what location a turn is reported at.
|
||||
|
||||
To study a test without post-processing impacts, you can create a copy of the case on a very large grid (like 2000 meters). In such a grid, `turn collapsing` would be essentially disable.
|
||||
|
||||
Sadly, there is no general guideline.
|
||||
|
||||
### Use Caution
|
||||
|
||||
If in doubt, ask another person. Inspect as much of the data as possible (e.g. print un-collapsed steps, turn angles and so on) and use your best judgement, if the new result seems justified.
|
||||
+11
-8
@@ -6,28 +6,31 @@ Please create a directory and run cmake from there, passing the path to this sou
|
||||
This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. Please delete them.")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
project(osrm-example C CXX)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")
|
||||
|
||||
set(bitness 32)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(bitness 64)
|
||||
message(STATUS "Building on a 64 bit system")
|
||||
else()
|
||||
message(WARNING "Building on a 32 bit system is unsupported")
|
||||
message(STATUS "Building on a 32 bit system")
|
||||
endif()
|
||||
|
||||
if(WIN32 AND MSVC_VERSION LESS 1800)
|
||||
message(FATAL_ERROR "Building with Microsoft compiler needs Visual Studio 2013 or later (Express version works too)")
|
||||
if(WIN32 AND MSVC_VERSION LESS 1900)
|
||||
message(FATAL_ERROR "Building with Microsoft compiler needs Latest Visual Studio 2015 (Community or better)")
|
||||
endif()
|
||||
|
||||
link_directories(${LibOSRM_LIBRARY_DIRS})
|
||||
add_executable(osrm-example example.cpp)
|
||||
|
||||
find_package(LibOSRM REQUIRED)
|
||||
find_package(Boost 1.49.0 COMPONENTS filesystem system thread REQUIRED)
|
||||
|
||||
target_link_libraries(osrm-example ${LibOSRM_LIBRARIES} ${Boost_LIBRARIES})
|
||||
include_directories(SYSTEM ${LibOSRM_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(osrm-example ${LibOSRM_LIBRARIES} ${LibOSRM_DEPENDENT_LIBRARIES})
|
||||
include_directories(SYSTEM ${LibOSRM_INCLUDE_DIRS})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LibOSRM_CXXFLAGS}")
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
# - Try to find LibOSRM
|
||||
# Once done this will define
|
||||
# LibOSRM_FOUND - System has LibOSRM
|
||||
# LibOSRM_INCLUDE_DIRS - The LibOSRM include directories
|
||||
# LibOSRM_LIBRARIES - The libraries needed to use LibOSRM
|
||||
# LibOSRM_DEFINITIONS - Compiler switches required for using LibOSRM
|
||||
# LibOSRM_LIBRARIES - The libraries and ldflags needed to use LibOSRM
|
||||
# LibOSRM_DEPENDENT_LIBRARIES - The libraries and ldflags need to link LibOSRM dependencies
|
||||
# LibOSRM_LIBRARY_DIRS - The libraries paths needed to find LibOSRM
|
||||
# LibOSRM_CXXFLAGS - Compiler switches required for using LibOSRM
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_LibOSRM QUIET libosrm)
|
||||
set(LibOSRM_DEFINITIONS ${PC_LibOSRM_CFLAGS_OTHER})
|
||||
pkg_search_module(PC_LibOSRM QUIET libosrm)
|
||||
|
||||
function(JOIN VALUES GLUE OUTPUT)
|
||||
string (REPLACE ";" "${GLUE}" _TMP_STR "${VALUES}")
|
||||
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
list(REMOVE_ITEM PC_LibOSRM_CFLAGS " ")
|
||||
JOIN("${PC_LibOSRM_CFLAGS}" " " output)
|
||||
|
||||
set(LibOSRM_CXXFLAGS ${output})
|
||||
set(LibOSRM_LIBRARY_DIRS ${PC_LibOSRM_LIBRARY_DIRS})
|
||||
|
||||
find_path(LibOSRM_INCLUDE_DIR osrm/osrm.hpp
|
||||
PATH_SUFFIXES osrm include/osrm include
|
||||
@@ -19,8 +30,6 @@ find_path(LibOSRM_INCLUDE_DIR osrm/osrm.hpp
|
||||
/opt/local
|
||||
/opt)
|
||||
|
||||
set(LibOSRM_INCLUDE_DIRS ${LibOSRM_INCLUDE_DIR})
|
||||
|
||||
find_library(TEST_LibOSRM_STATIC_LIBRARY Names osrm.lib libosrm.a
|
||||
PATH_SUFFIXES osrm lib/osrm lib
|
||||
HINTS ${PC_LibOSRM_LIBDIR} ${PC_LibOSRM_LIBRARY_DIRS}
|
||||
@@ -30,7 +39,7 @@ find_library(TEST_LibOSRM_STATIC_LIBRARY Names osrm.lib libosrm.a
|
||||
/usr
|
||||
/opt/local
|
||||
/opt)
|
||||
find_library(TEST_LibOSRM_DYNAMIC_LIBRARY Names osrm.dynlib libosrm.so
|
||||
find_library(TEST_LibOSRM_DYNAMIC_LIBRARY Names libosrm.dylib libosrm.so
|
||||
PATH_SUFFIXES osrm lib/osrm lib
|
||||
HINTS ${PC_LibOSRM_LIBDIR} ${PC_LibOSRM_LIBRARY_DIRS}
|
||||
~/Library/Frameworks
|
||||
@@ -40,26 +49,15 @@ find_library(TEST_LibOSRM_DYNAMIC_LIBRARY Names osrm.dynlib libosrm.so
|
||||
/opt/local
|
||||
/opt)
|
||||
|
||||
if (NOT ("${TEST_LibOSRM_STATIC_LIBRARY}" STREQUAL "TEST_LibOSRM_STATIC_LIBRARY-NOTFOUND"))
|
||||
if ("${PC_LibOSRM_STATIC_LIBRARIES}" STREQUAL "")
|
||||
set(LibOSRM_STATIC_LIBRARIES ${TEST_LibOSRM_STATIC_LIBRARY})
|
||||
else()
|
||||
set(LibOSRM_STATIC_LIBRARIES ${PC_LibOSRM_STATIC_LIBRARIES})
|
||||
endif()
|
||||
set(LibOSRM_LIBRARIES ${LibOSRM_STATIC_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (NOT ("${TEST_LibOSRM_DYNAMIC_LIBRARY}" STREQUAL "TEST_LibOSRM_DYNAMIC_LIBRARY-NOTFOUND"))
|
||||
if ("${PC_LibOSRM_LIBRARIES}" STREQUAL "")
|
||||
set(LibOSRM_DYNAMIC_LIBRARIES ${TEST_LibOSRM_DYNAMIC_LIBRARY})
|
||||
else()
|
||||
set(LibOSRM_DYNAMIC_LIBRARIES ${PC_LibOSRM_LIBRARIES})
|
||||
endif()
|
||||
set(LibOSRM_LIBRARIES ${LibOSRM_DYNAMIC_LIBRARIES})
|
||||
endif()
|
||||
set(LibOSRM_DEPENDENT_LIBRARIES ${PC_LibOSRM_STATIC_LDFLAGS})
|
||||
set(LibOSRM_LIBRARIES ${PC_LibOSRM_LDFLAGS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBOSRM_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(LibOSRM DEFAULT_MSG
|
||||
LibOSRM_LIBRARIES LibOSRM_INCLUDE_DIR)
|
||||
LibOSRM_LIBRARY_DIRS
|
||||
LibOSRM_CXXFLAGS
|
||||
LibOSRM_LIBRARIES
|
||||
LibOSRM_DEPENDENT_LIBRARIES
|
||||
LibOSRM_INCLUDE_DIR)
|
||||
|
||||
+63
-43
@@ -1,61 +1,81 @@
|
||||
#include "osrm/json_container.hpp"
|
||||
#include "osrm/engine_config.hpp"
|
||||
#include "osrm/match_parameters.hpp"
|
||||
#include "osrm/nearest_parameters.hpp"
|
||||
#include "osrm/route_parameters.hpp"
|
||||
#include "osrm/osrm.hpp"
|
||||
#include "osrm/table_parameters.hpp"
|
||||
#include "osrm/trip_parameters.hpp"
|
||||
|
||||
#include "osrm/coordinate.hpp"
|
||||
#include "osrm/engine_config.hpp"
|
||||
#include "osrm/json_container.hpp"
|
||||
|
||||
#include "osrm/osrm.hpp"
|
||||
#include "osrm/status.hpp"
|
||||
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
int main(int argc, const char *argv[]) try
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
if (argc < 2)
|
||||
{
|
||||
std::cerr << "Error: Not enough arguments." << std::endl
|
||||
<< "Run " << argv[0] << " data.osrm" << std::endl;
|
||||
std::cerr << "Usage: " << argv[0] << " data.osrm\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
osrm::EngineConfig engine_config;
|
||||
std::string base_path(argv[1]);
|
||||
engine_config.server_paths["ramindex"] = base_path + ".ramIndex";
|
||||
engine_config.server_paths["fileindex"] = base_path + ".fileIndex";
|
||||
engine_config.server_paths["hsgrdata"] = base_path + ".hsgr";
|
||||
engine_config.server_paths["nodesdata"] = base_path + ".nodes";
|
||||
engine_config.server_paths["edgesdata"] = base_path + ".edges";
|
||||
engine_config.server_paths["coredata"] = base_path + ".core";
|
||||
engine_config.server_paths["geometries"] = base_path + ".geometry";
|
||||
engine_config.server_paths["timestamp"] = base_path + ".timestamp";
|
||||
engine_config.server_paths["namesdata"] = base_path + ".names";
|
||||
engine_config.use_shared_memory = false;
|
||||
using namespace osrm;
|
||||
|
||||
osrm::OSRM routing_machine(engine_config);
|
||||
// Configure based on a .osrm base path, and no datasets in shared mem from osrm-datastore
|
||||
EngineConfig config;
|
||||
config.storage_config = {argv[1]};
|
||||
config.use_shared_memory = false;
|
||||
|
||||
osrm::RouteParameters route_parameters;
|
||||
// route is in Monaco
|
||||
route_parameters.service = "viaroute";
|
||||
route_parameters.AddCoordinate(43.731142, 7.419758);
|
||||
route_parameters.AddCoordinate(43.736825, 7.419505);
|
||||
// Routing machine with several services (such as Route, Table, Nearest, Trip, Match)
|
||||
const OSRM osrm{config};
|
||||
|
||||
osrm::json::Object json_result;
|
||||
const int result_code = routing_machine.RunQuery(route_parameters, json_result);
|
||||
std::cout << "result code: " << result_code << std::endl;
|
||||
// 2xx code
|
||||
if (result_code / 100 == 2)
|
||||
// The following shows how to use the Route service; configure this service
|
||||
RouteParameters params;
|
||||
|
||||
// Route in monaco
|
||||
params.coordinates.push_back({util::FloatLongitude{7.419758}, util::FloatLatitude{43.731142}});
|
||||
params.coordinates.push_back({util::FloatLongitude{7.419505}, util::FloatLatitude{43.736825}});
|
||||
|
||||
// Response is in JSON format
|
||||
json::Object result;
|
||||
|
||||
// Execute routing request, this does the heavy lifting
|
||||
const auto status = osrm.Route(params, result);
|
||||
|
||||
if (status == Status::Ok)
|
||||
{
|
||||
// Extract data out of JSON structure
|
||||
auto& summary = json_result.values["route_summary"].get<osrm::json::Object>();
|
||||
auto duration = summary.values["total_time"].get<osrm::json::Number>().value;
|
||||
auto distance = summary.values["total_distance"].get<osrm::json::Number>().value;
|
||||
std::cout << "duration: " << duration << std::endl;
|
||||
std::cout << "distance: " << distance << std::endl;
|
||||
auto &routes = result.values["routes"].get<json::Array>();
|
||||
|
||||
// Let's just use the first route
|
||||
auto &route = routes.values.at(0).get<json::Object>();
|
||||
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 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";
|
||||
}
|
||||
|
||||
std::cout << "Distance: " << distance << " meter\n";
|
||||
std::cout << "Duration: " << duration << " seconds\n";
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
else if (status == Status::Error)
|
||||
{
|
||||
const auto code = result.values["code"].get<json::String>().value;
|
||||
const auto message = result.values["message"].get<json::String>().value;
|
||||
|
||||
std::cout << "Code: " << code << "\n";
|
||||
std::cout << "Message: " << code << "\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
catch (const std::exception ¤t_exception)
|
||||
{
|
||||
std::cout << "exception: " << current_exception.what();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
+154
-142
@@ -5,169 +5,181 @@ Feature: Bike - Access tags on ways
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Bike - Access tag hierachy 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 | | | |
|
||||
| | yes | | x |
|
||||
| | permissive | | x |
|
||||
| | designated | | x |
|
||||
| | some_tag | | x |
|
||||
| | no | | |
|
||||
| | private | | |
|
||||
| | agricultural | | |
|
||||
| | forestry | | |
|
||||
| | | yes | x |
|
||||
| | | permissive | x |
|
||||
| | | designated | x |
|
||||
| | | some_tag | x |
|
||||
| | | no | |
|
||||
| | | private | |
|
||||
| | | agricultural | |
|
||||
| | | forestry | |
|
||||
| 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 | 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 | 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 | cycling |
|
||||
| steps | permissive | cycling |
|
||||
| footway | permissive | cycling |
|
||||
| garbagetag | permissive | cycling |
|
||||
|
||||
@@ -5,61 +5,64 @@ Feature: Bike - Access tags on nodes
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Bike - Access tag hierachy 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 | | | |
|
||||
| | yes | | x |
|
||||
| | permissive | | x |
|
||||
| | designated | | x |
|
||||
| | some_tag | | x |
|
||||
| | no | | |
|
||||
| | private | | |
|
||||
| | agricultural | | |
|
||||
| | forestry | | |
|
||||
| | | yes | x |
|
||||
| | | permissive | x |
|
||||
| | | designated | x |
|
||||
| | | some_tag | x |
|
||||
| | | no | |
|
||||
| | | private | |
|
||||
| | | agricultural | |
|
||||
| | | forestry | |
|
||||
| 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 | |
|
||||
|
||||
@@ -7,9 +7,11 @@ Feature: Bike - Squares and other areas
|
||||
@square
|
||||
Scenario: Bike - Route along edge of a squares
|
||||
Given the node map
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
"""
|
||||
x
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | area | highway |
|
||||
@@ -17,22 +19,24 @@ Feature: Bike - Squares and other areas
|
||||
| abcda | yes | residential |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| from | to | route |
|
||||
| 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 |
|
||||
|
||||
@building
|
||||
Scenario: Bike - Don't route on buildings
|
||||
Given the node map
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
"""
|
||||
x
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | area | building | access |
|
||||
@@ -41,21 +45,23 @@ Feature: Bike - Squares and other areas
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | xa |
|
||||
| a | d | xa |
|
||||
| b | c | xa |
|
||||
| c | b | xa |
|
||||
| c | d | xa |
|
||||
| d | c | xa |
|
||||
| d | a | xa |
|
||||
| a | d | xa |
|
||||
| a | b | xa,xa |
|
||||
| a | d | xa,xa |
|
||||
| b | c | xa,xa |
|
||||
| c | b | xa,xa |
|
||||
| c | d | xa,xa |
|
||||
| d | c | xa,xa |
|
||||
| d | a | xa,xa |
|
||||
| a | d | xa,xa |
|
||||
|
||||
@parking
|
||||
Scenario: Bike - parking areas
|
||||
Given the node map
|
||||
| e | | | f |
|
||||
| x | a | b | y |
|
||||
| | d | c | |
|
||||
"""
|
||||
e f
|
||||
x a b y
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | amenity |
|
||||
@@ -68,20 +74,23 @@ Feature: Bike - Squares and other areas
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| 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
|
||||
Scenario: Bike - railway platforms
|
||||
Given the node map
|
||||
| x | a | b | y |
|
||||
| | d | c | |
|
||||
"""
|
||||
x a b y
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway |
|
||||
@@ -93,11 +102,11 @@ Feature: Bike - Squares and other areas
|
||||
| from | to | route |
|
||||
| x | y | xa,abcda,by |
|
||||
| y | x | by,abcda,xa |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| 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 |
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
@routing @bicycle @bridge
|
||||
Feature: Bicycle - Handle movable bridge
|
||||
Feature: Bicycle - Handle cycling
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Car - Use a ferry route
|
||||
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
|
||||
| nodes | highway | bridge | bicycle |
|
||||
@@ -17,21 +19,23 @@ Feature: Bicycle - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,5,1 |
|
||||
| b | f | abc,cde,efg | 1,5,1 |
|
||||
| e | c | cde | 5 |
|
||||
| e | b | cde,abc | 5,1 |
|
||||
| e | a | cde,abc | 5,1 |
|
||||
| c | e | cde | 5 |
|
||||
| c | f | cde,efg | 5,1 |
|
||||
| c | g | cde,efg | 5,1 |
|
||||
| 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 | b | cde,abc,abc | cycling,cycling,cycling |
|
||||
| e | a | cde,abc,abc | cycling,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: Car - Properly handle durations
|
||||
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
|
||||
| nodes | highway | bridge | duration |
|
||||
@@ -40,8 +44,8 @@ Feature: Bicycle - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,5,1 | 5 km/h |
|
||||
| b | f | abc,cde,efg | 1,5,1 | 4 km/h |
|
||||
| c | e | cde | 5 | 2 km/h |
|
||||
| e | c | cde | 5 | 2 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| 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 | pushing bike | 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 |
|
||||
| cycleway | track | yes | 15 km/h | 6 km/h |
|
||||
| footway | track | yes | 6 km/h +-1 | 6 km/h +-1 |
|
||||
|
||||
@@ -6,10 +6,12 @@ Feature: Bike - Destination only, no passing through
|
||||
|
||||
Scenario: Bike - Destination only street
|
||||
Given the node map
|
||||
| a | | | | e |
|
||||
| | b | c | d | |
|
||||
| | | | | |
|
||||
| x | | | | y |
|
||||
"""
|
||||
a e
|
||||
b c d
|
||||
|
||||
x y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -19,22 +21,24 @@ Feature: Bike - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bcd |
|
||||
| a | d | ab,bcd |
|
||||
| a | e | axye |
|
||||
| e | d | de |
|
||||
| e | c | de,bcd |
|
||||
| e | b | de,bcd |
|
||||
| e | a | axye |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bcd,bcd |
|
||||
| a | d | ab,bcd,bcd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,bcd,bcd |
|
||||
| e | b | de,bcd,bcd |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Bike - Destination only street
|
||||
Given the node map
|
||||
| a | | | | e |
|
||||
| | b | c | d | |
|
||||
| | | | | |
|
||||
| x | | | | y |
|
||||
"""
|
||||
a e
|
||||
b c d
|
||||
|
||||
x y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -45,21 +49,23 @@ Feature: Bike - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bc |
|
||||
| a | d | ab,bc,cd |
|
||||
| a | e | axye |
|
||||
| e | d | de |
|
||||
| e | c | de,dc |
|
||||
| e | b | de,dc,bc |
|
||||
| e | a | axye |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bc,bc |
|
||||
| a | d | ab,bc,cd,cd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,cd,cd |
|
||||
| e | b | de,cd,bc,bc |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Bike - Routing inside a destination only area
|
||||
Given the node map
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
| x | | | | y |
|
||||
"""
|
||||
a c e
|
||||
b d
|
||||
x y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -70,8 +76,8 @@ Feature: Bike - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | e | ab,bc,cd,de |
|
||||
| e | a | de,cd,bc,ab |
|
||||
| b | d | bc,cd |
|
||||
| d | b | cd,bc |
|
||||
| from | to | route |
|
||||
| a | e | ab,bc,cd,de,de |
|
||||
| e | a | de,cd,bc,ab,ab |
|
||||
| b | d | bc,cd,cd |
|
||||
| d | b | cd,bc,bc |
|
||||
|
||||
@@ -6,9 +6,11 @@ Feature: Bike - Handle ferry routes
|
||||
|
||||
Scenario: Bike - Ferry route
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle |
|
||||
@@ -17,22 +19,24 @@ Feature: Bike - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | g | abc,cde,efg |
|
||||
| b | f | abc,cde,efg |
|
||||
| e | c | cde |
|
||||
| e | b | cde,abc |
|
||||
| e | a | cde,abc |
|
||||
| c | e | cde |
|
||||
| c | f | cde,efg |
|
||||
| c | g | cde,efg |
|
||||
| from | to | route |
|
||||
| a | g | abc,cde,efg,efg |
|
||||
| b | f | abc,cde,efg,efg |
|
||||
| e | c | cde,cde |
|
||||
| e | b | cde,abc,abc |
|
||||
| e | a | cde,abc,abc |
|
||||
| c | e | cde,cde |
|
||||
| c | f | cde,efg,efg |
|
||||
| c | g | cde,efg,efg |
|
||||
|
||||
Scenario: Bike - Ferry duration, single node
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
| | | e | f |
|
||||
| | | g | h |
|
||||
| | | i | j |
|
||||
"""
|
||||
a b c d
|
||||
e f
|
||||
g h
|
||||
i j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle | duration |
|
||||
@@ -48,8 +52,10 @@ Feature: Bike - Handle ferry routes
|
||||
|
||||
Scenario: Bike - Ferry duration, multiple nodes
|
||||
Given the node map
|
||||
| x | | | | | y |
|
||||
| | a | b | c | d | |
|
||||
"""
|
||||
x y
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle | duration |
|
||||
@@ -58,6 +64,6 @@ Feature: Bike - Handle ferry routes
|
||||
| abcd | | ferry | yes | 1:00 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | d | abcd | 3600s +-10 |
|
||||
| d | a | abcd | 3600s +-10 |
|
||||
| from | to | route | time |
|
||||
| a | d | abcd,abcd | 3600s |
|
||||
| d | a | abcd,abcd | 3600s |
|
||||
|
||||
@@ -9,7 +9,7 @@ Feature: Bike - Max speed restrictions
|
||||
Then routability should be
|
||||
| highway | maxspeed | bothw |
|
||||
| residential | | 15 km/h |
|
||||
| residential | 10 | 10 km/h |
|
||||
| residential | 10 | 9 km/h |
|
||||
|
||||
Scenario: Bicycle - Ignore maxspeed when higher than way speed
|
||||
Then routability should be
|
||||
@@ -40,7 +40,9 @@ Feature: Bike - Max speed restrictions
|
||||
|
||||
Scenario: Bike - Do not use maxspeed when higher that way type speed
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed |
|
||||
@@ -48,9 +50,9 @@ Feature: Bike - Max speed restrictions
|
||||
| bc | residential | 80 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 15 km/h |
|
||||
| b | c | bc | 15 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 15 km/h |
|
||||
| b | c | bc,bc | 15 km/h |
|
||||
|
||||
Scenario: Bike - Forward/backward maxspeed
|
||||
Given the shortcuts
|
||||
@@ -63,12 +65,12 @@ Feature: Bike - Max speed restrictions
|
||||
Then routability should be
|
||||
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| | | | 15 km/h | 15 km/h |
|
||||
| 10 | | | 10 km/h | 10 km/h |
|
||||
| | 10 | | 10 km/h | 15 km/h |
|
||||
| | | 10 | 15 km/h | 10 km/h |
|
||||
| 2 | 10 | | 10 km/h | 2 km/h |
|
||||
| 2 | | 10 | 2 km/h | 10 km/h |
|
||||
| 2 | 5 | 10 | 5 km/h | 10 km/h |
|
||||
| 10 | | | 9 km/h | 9 km/h |
|
||||
| | 10 | | 9 km/h | 15 km/h |
|
||||
| | | 10 | 14 km/h | 9 km/h |
|
||||
| 2 | 10 | | 9 km/h | 2 km/h |
|
||||
| 2 | | 10 | 2 km/h | 9 km/h |
|
||||
| 2 | 5 | 10 | 5 km/h | 9 km/h |
|
||||
|
||||
Scenario: Bike - Maxspeed should not allow routing on unroutable ways
|
||||
Then routability should be
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
@routing @bicycle @mode
|
||||
Feature: Bike - Mode flag
|
||||
|
||||
# bicycle modes:
|
||||
# 1 bike
|
||||
# 2 pushing
|
||||
# 3 ferry
|
||||
# 4 train
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
|
||||
Scenario: Bike - Mode when using a ferry
|
||||
Given the node map
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -22,18 +18,20 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,3,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,3,1 |
|
||||
| c | a | bc,ab | head,left,destination | 3,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,3 |
|
||||
| a | c | ab,bc | head,right,destination | 1,3 |
|
||||
| b | d | bc,cd | head,left,destination | 3,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,ferry,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,ferry,cycling,cycling |
|
||||
| c | a | bc,ab,ab | ferry,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,ferry,ferry |
|
||||
| a | c | ab,bc,bc | cycling,ferry,ferry |
|
||||
| b | d | bc,cd,cd | ferry,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when using a train
|
||||
Given the node map
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | railway | bicycle |
|
||||
@@ -42,38 +40,45 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,4,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,4,1 |
|
||||
| c | a | bc,ab | head,left,destination | 4,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,4 |
|
||||
| a | c | ab,bc | head,right,destination | 1,4 |
|
||||
| b | d | bc,cd | head,left,destination | 4,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,train,cycling,cycling |
|
||||
| d | a | cd,bc,ab,ab | cycling,train,cycling,cycling |
|
||||
| c | a | bc,ab,ab | train,cycling,cycling |
|
||||
| d | b | cd,bc,bc | cycling,train,train |
|
||||
| a | c | ab,bc,bc | cycling,train,train |
|
||||
| b | d | bc,cd,cd | train,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing bike against oneways
|
||||
Given the node map
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
"""
|
||||
a b e
|
||||
f c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| ab | primary | |
|
||||
| bc | primary | yes |
|
||||
| cd | primary | |
|
||||
| be | primary | |
|
||||
| cf | primary | |
|
||||
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,straight,straight,destination | 1,1,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,straight,destination | 1,1 |
|
||||
| b | d | bc,cd | head,straight,destination | 1,1 |
|
||||
| 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 |
|
||||
| a | c | ab,bc,bc | cycling,cycling,cycling |
|
||||
| b | d | bc,cd,cd | cycling,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain streets
|
||||
Given the node map
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -82,18 +87,20 @@ Feature: Bike - Mode flag
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,pushing bike,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 |
|
||||
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain areas
|
||||
Given the node map
|
||||
| a | b | | |
|
||||
| | c | d | f |
|
||||
"""
|
||||
a b
|
||||
c d f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | area |
|
||||
@@ -102,18 +109,20 @@ Feature: Bike - Mode flag
|
||||
| df | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | f | ab,bcd,df | 1,2,1 |
|
||||
| f | a | df,bcd,ab | 1,2,1 |
|
||||
| d | a | bcd,ab | 2,1 |
|
||||
| f | b | df,bcd | 1,2 |
|
||||
| a | d | ab,bcd | 1,2 |
|
||||
| b | f | bcd,df | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | f | ab,bcd,df,df | cycling,pushing bike,cycling,cycling |
|
||||
| f | a | df,bcd,ab,ab | cycling,pushing bike,cycling,cycling |
|
||||
| d | a | bcd,ab,ab | pushing bike,cycling,cycling |
|
||||
| f | b | df,bcd,bcd | cycling,pushing bike,pushing bike |
|
||||
| a | d | ab,bcd,bcd | cycling,pushing bike,pushing bike |
|
||||
| b | f | bcd,df,df | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on steps
|
||||
Given the node map
|
||||
| a | b | | |
|
||||
| | c | d | f |
|
||||
"""
|
||||
a b
|
||||
c d f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -122,18 +131,20 @@ Feature: Bike - Mode flag
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,pushing bike,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 |
|
||||
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when bicycle=dismount
|
||||
Given the node map
|
||||
| a | b | | |
|
||||
| | c | d | f |
|
||||
"""
|
||||
a b
|
||||
c d f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bicycle |
|
||||
@@ -142,36 +153,40 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,pushing bike,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 |
|
||||
| a | c | ab,bc,bc | cycling,pushing bike,pushing bike |
|
||||
| b | d | bc,cd,cd | pushing bike,cycling,cycling |
|
||||
|
||||
Scenario: Bicycle - Modes when starting on forward oneway
|
||||
Given the node map
|
||||
| a | b |
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| ab | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | 1 |
|
||||
| b | a | ab | 2 |
|
||||
| from | to | route | modes |
|
||||
| a | b | ab,ab | cycling,cycling |
|
||||
| b | a | ab,ab | pushing bike,pushing bike |
|
||||
|
||||
Scenario: Bicycle - Modes when starting on reverse oneway
|
||||
Given the node map
|
||||
| a | b |
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| ab | -1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | 2 |
|
||||
| b | a | ab | 1 |
|
||||
| from | to | route | modes |
|
||||
| a | b | ab,ab | pushing bike,pushing bike |
|
||||
| b | a | ab,ab | cycling,cycling |
|
||||
|
||||
@@ -6,22 +6,26 @@ Feature: Bike - Street names in instructions
|
||||
|
||||
Scenario: Bike - A named street
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
"""
|
||||
a b
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | My Way |
|
||||
| bc | Your Way |
|
||||
| nodes | name | ref |
|
||||
| ab | My Way | A6 |
|
||||
| bc | Your Way | A7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way |
|
||||
| from | to | route | ref |
|
||||
| a | c | My Way,Your Way | A6,A7 |
|
||||
|
||||
@unnamed
|
||||
Scenario: Bike - Use way type to describe unnamed ways
|
||||
Scenario: Bike - No longer use way type to describe unnamed ways, see #3231
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -29,5 +33,5 @@ Feature: Bike - Street names in instructions
|
||||
| bcd | track | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | {highway:cycleway},{highway:track} |
|
||||
| from | to | route |
|
||||
| a | d | , |
|
||||
|
||||
@@ -8,18 +8,22 @@ 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
|
||||
| a | b |
|
||||
| d | c |
|
||||
"""
|
||||
a b
|
||||
f d c e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -27,95 +31,99 @@ Feature: Bike - Oneway streets
|
||||
| bc | | no |
|
||||
| cd | | no |
|
||||
| da | | no |
|
||||
| df | | no |
|
||||
| ce | | no |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | bc,cd,da |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| b | a | bc,cd,da,da |
|
||||
|
||||
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 | |
|
||||
| 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
|
||||
| a | b | c |
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -124,5 +132,5 @@ Feature: Bike - Oneway streets
|
||||
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | ab,bc |
|
||||
| from | to | route |
|
||||
| a | c | ab,bc,bc |
|
||||
|
||||
@@ -3,41 +3,39 @@ 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
|
||||
@square
|
||||
Scenario: Bike - Push bikes on pedestrian areas
|
||||
Given the node map
|
||||
| x | |
|
||||
| a | b |
|
||||
| d | c |
|
||||
"""
|
||||
x
|
||||
a b
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | area | highway |
|
||||
@@ -45,70 +43,75 @@ Feature: Bike - Accessability of different way types
|
||||
| abcda | yes | pedestrian |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | abcda |
|
||||
| a | d | abcda |
|
||||
| b | c | abcda |
|
||||
| c | b | abcda |
|
||||
| c | d | abcda |
|
||||
| d | c | abcda |
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
| from | to | route |
|
||||
| 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 |
|
||||
|
||||
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
|
||||
Scenario: Bike - Don't allow routing on ways still under construction
|
||||
Then routability should be
|
||||
| highway | foot | bicycle | bothw |
|
||||
| primary | | | x |
|
||||
| construction | | | |
|
||||
| construction | yes | | |
|
||||
| construction | | yes | |
|
||||
|
||||
|
||||
@roundabout
|
||||
Scenario: Bike - Don't push bikes against oneway flow on roundabouts
|
||||
Then routability should be
|
||||
| junction | forw | backw |
|
||||
| roundabout | x | |
|
||||
|
||||
|
||||
Scenario: Bike - Instructions when pushing bike on oneways
|
||||
Given the node map
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
"""
|
||||
a b e
|
||||
f c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| ab | primary | |
|
||||
| bc | primary | yes |
|
||||
| cd | primary | |
|
||||
| be | primary | |
|
||||
| cf | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | ab,bc,cd | head,straight,straight,destination |
|
||||
| d | a | cd,bc,ab | head,right,left,destination |
|
||||
| c | a | bc,ab | head,left,destination |
|
||||
| d | b | cd,bc | head,right,destination |
|
||||
| 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 |
|
||||
|
||||
@todo
|
||||
Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc.
|
||||
Given the node map
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -117,8 +120,8 @@ Feature: Bike - Accessability of different way types
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| a | d | ab,bc,cd | head,right,left,destination |
|
||||
| d | a | cd,bc,ab | head,right,left,destination |
|
||||
| c | a | bc,ab | head,left,destination |
|
||||
| d | b | cd,bc | head,right,destination |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | cycling,pushing bike,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 |
|
||||
|
||||
@@ -6,36 +6,42 @@ Feature: Bike - Way ref
|
||||
|
||||
Scenario: Bike - Way with both name and ref
|
||||
Given the node map
|
||||
| a | b |
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | Utopia Drive | E7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive / E7 |
|
||||
| from | to | route | ref |
|
||||
| a | b | Utopia Drive,Utopia Drive | E7,E7 |
|
||||
|
||||
Scenario: Bike - Way with only ref
|
||||
Given the node map
|
||||
| a | b |
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
| ab | | E7 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | E7 |
|
||||
| from | to | route | ref |
|
||||
| a | b | , | E7,E7 |
|
||||
|
||||
Scenario: Bike - Way with only name
|
||||
Given the node map
|
||||
| a | b |
|
||||
"""
|
||||
a b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | Utopia Drive |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive |
|
||||
| from | to | route |
|
||||
| a | b | Utopia Drive,Utopia Drive |
|
||||
|
||||
@@ -5,13 +5,16 @@ Feature: Bike - Turn restrictions
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - No left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -25,17 +28,19 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | wj | j | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - No right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -49,17 +54,19 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | ej | j | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - No u-turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -73,17 +80,19 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | wj | j | no_u_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - Handle any no_* relation
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -97,17 +106,19 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | wj | j | no_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Bike - Only left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -121,17 +132,19 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | wj | j | only_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Bike - Only right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -145,17 +158,19 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | ej | j | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Bike - Only straight on
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -169,17 +184,19 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | nj | j | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Bike - Handle any only_* restriction
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -193,17 +210,19 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | nj | j | only_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@except
|
||||
Scenario: Bike - Except tag and on no_ restrictions
|
||||
Given the node map
|
||||
| b | x | c |
|
||||
| a | j | d |
|
||||
| | s | |
|
||||
"""
|
||||
b x c
|
||||
a j d
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -222,18 +241,20 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | dj | j | no_right_turn | bicycle |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| s | c | sj,cj |
|
||||
| s | d | sj,dj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | sj,bj,bj |
|
||||
| s | c | sj,cj,cj |
|
||||
| s | d | sj,dj,dj |
|
||||
|
||||
@except
|
||||
Scenario: Bike - Except tag and on only_ restrictions
|
||||
Given the node map
|
||||
| a | | b |
|
||||
| | j | |
|
||||
| | s | |
|
||||
"""
|
||||
a b
|
||||
j
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -246,19 +267,21 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | aj | j | only_straight_on | bicycle |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | sj,bj,bj |
|
||||
|
||||
@except
|
||||
Scenario: Bike - Multiple except tag values
|
||||
Given the node map
|
||||
| s | j | a |
|
||||
| | | b |
|
||||
| | | c |
|
||||
| | | d |
|
||||
| | | e |
|
||||
| | | f |
|
||||
"""
|
||||
s j a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway | foot |
|
||||
@@ -280,10 +303,10 @@ Feature: Bike - Turn restrictions
|
||||
| restriction | sj | jf | j | no_straight_on | bicycle, bus |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,ja |
|
||||
| s | b | sj,jb |
|
||||
| s | c | sj,jc |
|
||||
| s | d | sj,jd |
|
||||
| s | e | sj,je |
|
||||
| s | f | sj,jf |
|
||||
| from | to | route |
|
||||
| s | a | sj,ja,ja |
|
||||
| s | b | sj,jb,jb |
|
||||
| s | c | sj,jc,jc |
|
||||
| s | d | sj,jd,jd |
|
||||
| s | e | sj,je,je |
|
||||
| s | f | sj,jf,jf |
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
@routing @bicycle @roundabout @instruction
|
||||
Feature: Roundabout Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
Scenario: Bicycle - Roundabout instructions
|
||||
Given the node map
|
||||
| | | v | | |
|
||||
| | | d | | |
|
||||
| s | a | | c | u |
|
||||
| | | b | | |
|
||||
| | | t | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| sa | |
|
||||
| tb | |
|
||||
| uc | |
|
||||
| vd | |
|
||||
| abcda | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| s | t | sa,tb | head,enter_roundabout-1,destination |
|
||||
| s | u | sa,uc | head,enter_roundabout-2,destination |
|
||||
| s | v | sa,vd | head,enter_roundabout-3,destination |
|
||||
| u | v | uc,vd | head,enter_roundabout-1,destination |
|
||||
| u | s | uc,sa | head,enter_roundabout-2,destination |
|
||||
| u | t | uc,tb | head,enter_roundabout-3,destination |
|
||||
@@ -14,8 +14,10 @@ Feature: Bike - Stop areas for public transport
|
||||
|
||||
Scenario: Bike - railway platforms
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
| | s | t | |
|
||||
"""
|
||||
a b c d
|
||||
s t
|
||||
"""
|
||||
|
||||
And the nodes
|
||||
| node | public_transport |
|
||||
@@ -31,7 +33,7 @@ Feature: Bike - Stop areas for public transport
|
||||
| public_transport | stop_area | c | st |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | abcd |
|
||||
| s | t | st |
|
||||
| s | d | /st,.+,abcd/ |
|
||||
| from | to | route |
|
||||
| a | d | abcd,abcd |
|
||||
| s | t | st,st |
|
||||
| s | d | /st,.+,abcd/,abcd/ |
|
||||
|
||||
@@ -6,35 +6,54 @@ Feature: Bike - Surfaces
|
||||
|
||||
Scenario: Bicycle - Slow surfaces
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| cycleway | | 48s |
|
||||
| cycleway | asphalt | 48s |
|
||||
| cycleway | cobblestone:flattened | 72s |
|
||||
| cycleway | paving_stones | 72s |
|
||||
| cycleway | compacted | 72s |
|
||||
| cycleway | cobblestone | 120s |
|
||||
| cycleway | unpaved | 120s |
|
||||
| cycleway | fine_gravel | 120s |
|
||||
| cycleway | gravel | 120s |
|
||||
| cycleway | pebblestone | 120s |
|
||||
| cycleway | dirt | 120s |
|
||||
| cycleway | earth | 120s |
|
||||
| cycleway | grass | 120s |
|
||||
| cycleway | mud | 240s |
|
||||
| cycleway | sand | 240s |
|
||||
| highway | surface | bothw |
|
||||
| cycleway | | 48 s |
|
||||
| cycleway | asphalt | 48 s |
|
||||
| cycleway | cobblestone:flattened | 72 s |
|
||||
| cycleway | paving_stones | 72 s |
|
||||
| cycleway | compacted | 72 s |
|
||||
| cycleway | cobblestone | 120 s |
|
||||
| cycleway | fine_gravel | 120 s |
|
||||
| cycleway | gravel | 120 s |
|
||||
| cycleway | pebblestone | 120.1 s |
|
||||
| cycleway | dirt | 120 s |
|
||||
| cycleway | earth | 120 s |
|
||||
| cycleway | grass | 120 s |
|
||||
| cycleway | mud | 240 s |
|
||||
| cycleway | sand | 240.1 s |
|
||||
| cycleway | sett | 72 s |
|
||||
|
||||
Scenario: Bicycle - Good surfaces on small paths
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| cycleway | | 48s |
|
||||
| path | | 60s |
|
||||
| track | | 60s |
|
||||
| track | asphalt | 48s |
|
||||
| path | asphalt | 48s |
|
||||
| cycleway | | 48 s |
|
||||
| path | | 60 s |
|
||||
| track | | 60 s |
|
||||
| track | asphalt | 60 s |
|
||||
| path | asphalt | 60 s |
|
||||
|
||||
Scenario: Bicycle - Surfaces should not make unknown ways routable
|
||||
Then routability should be
|
||||
| highway | surface | bothw |
|
||||
| cycleway | | 48s |
|
||||
| cycleway | | 48 s |
|
||||
| nosense | | |
|
||||
| nosense | asphalt | |
|
||||
|
||||
Scenario: Bicycle - Surfaces should not increase speed when pushing bikes
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway | surface |
|
||||
| ab | primary | yes | asphalt |
|
||||
| cd | footway | | asphalt |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | b | ab,ab | cycling,cycling | 15 km/h |
|
||||
| b | a | ab,ab | pushing bike,pushing bike | 6 km/h |
|
||||
| c | d | cd,cd | pushing bike,pushing bike | 6 km/h |
|
||||
| d | c | cd,cd | pushing bike,pushing bike | 6 km/h |
|
||||
|
||||
@@ -7,33 +7,33 @@ Feature: Bike - Handle ferry routes
|
||||
|
||||
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 |
|
||||
| highway | railway | bicycle | bothw |
|
||||
| primary | | | cycling |
|
||||
| (nil) | train | | |
|
||||
| (nil) | train | no | |
|
||||
| (nil) | train | yes | train |
|
||||
| (nil) | railway | | |
|
||||
| (nil) | railway | no | |
|
||||
| (nil) | railway | yes | train |
|
||||
| (nil) | subway | | |
|
||||
| (nil) | subway | no | |
|
||||
| (nil) | subway | yes | train |
|
||||
| (nil) | tram | | |
|
||||
| (nil) | tram | no | |
|
||||
| (nil) | tram | yes | train |
|
||||
| (nil) | light_rail | | |
|
||||
| (nil) | light_rail | no | |
|
||||
| (nil) | light_rail | yes | train |
|
||||
| (nil) | monorail | | |
|
||||
| (nil) | monorail | no | |
|
||||
| (nil) | monorail | yes | train |
|
||||
| (nil) | some_tag | | |
|
||||
| (nil) | some_tag | no | |
|
||||
| (nil) | some_tag | yes | cycling |
|
||||
|
||||
@construction
|
||||
Scenario: Bike - Don't route on railways under construction
|
||||
Then routability should be
|
||||
| highway | railway | bicycle | bothw |
|
||||
| primary | | | x |
|
||||
| (nil) | construction | yes | |
|
||||
| highway | railway | bicycle | bothw |
|
||||
| primary | | | cycling |
|
||||
| (nil) | construction | yes | |
|
||||
|
||||
@@ -3,13 +3,16 @@ Feature: Turn Penalties
|
||||
|
||||
Background:
|
||||
Given the profile "turnbot"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
Scenario: Bike - turns should incur a delay that depend on the angle
|
||||
|
||||
Given the node map
|
||||
| c | d | e |
|
||||
| b | j | f |
|
||||
| a | s | g |
|
||||
"""
|
||||
c d e
|
||||
b j f
|
||||
a s g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
@@ -23,11 +26,11 @@ Feature: Turn Penalties
|
||||
| jg |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time | distance |
|
||||
| s | a | sj,ja | 39s +-1 | 242m +-1 |
|
||||
| s | b | sj,jb | 30s +-1 | 200m +-1 |
|
||||
| s | c | sj,jc | 29s +-1 | 242m +-1 |
|
||||
| s | d | sj,jd | 20s +-1 | 200m +-1 |
|
||||
| s | e | sj,je | 29s +-1 | 242m +-1 |
|
||||
| s | f | sj,jf | 30s +-1 | 200m +-1 |
|
||||
| s | g | sj,jg | 39s +-1 | 242m +-1 |
|
||||
| from | to | route | time | distance |
|
||||
| s | a | sj,ja,ja | 63s +-1 | 483m +-1 |
|
||||
| s | b | sj,jb,jb | 50s +-1 | 400m +-1 |
|
||||
| s | c | sj,jc,jc | 54s +-1 | 483m +-1 |
|
||||
| s | d | sj,jd,jd | 40s +-1 | 400m +-1 |
|
||||
| s | e | sj,je,je | 53s +-1 | 483m +-1 |
|
||||
| s | f | sj,jf,jf | 50s +-1 | 400m +-1 |
|
||||
| s | g | sj,jg,jg | 63s +-1 | 483m +-1 |
|
||||
|
||||
+171
-13
@@ -5,7 +5,7 @@ Feature: Car - Restricted access
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Access tag hierachy on ways
|
||||
Scenario: Car - Access tag hierarchy on ways
|
||||
Then routability should be
|
||||
| access | vehicle | motor_vehicle | motorcar | bothw |
|
||||
| | | | | x |
|
||||
@@ -30,7 +30,36 @@ Feature: Car - Restricted access
|
||||
| | | no | yes | x |
|
||||
| | | yes | no | |
|
||||
|
||||
Scenario: Car - Access tag hierachy on nodes
|
||||
Scenario: Car - Access tag hierarchy and forward/backward
|
||||
Then routability should be
|
||||
| access | access:forward | access:backward | motorcar | motorcar:forward | motorcar:backward | forw | backw |
|
||||
| | | | | | | x | x |
|
||||
| yes | | | | | | x | x |
|
||||
| yes | no | | | | | | x |
|
||||
| yes | yes | | no | | | | |
|
||||
| yes | yes | | yes | no | | | x |
|
||||
| yes | | | | | | x | x |
|
||||
| yes | | no | | | | x | |
|
||||
| yes | | yes | no | | | | |
|
||||
| yes | | yes | yes | | no | x | |
|
||||
| no | | | | | | | |
|
||||
| no | yes | | | | | x | |
|
||||
| no | no | | yes | | | x | x |
|
||||
| no | no | | no | yes | | x | |
|
||||
| no | | | | | | | |
|
||||
| no | | yes | | | | | x |
|
||||
| no | | no | yes | | | x | x |
|
||||
| no | | no | no | | yes | | x |
|
||||
| | no | | | no | | | x |
|
||||
| | | no | | | no | x | |
|
||||
| | no | | | | no | | |
|
||||
| | | no | no | | | | |
|
||||
| | no | | | yes | | x | x |
|
||||
| | | no | | | yes | x | x |
|
||||
| | yes | | | no | | | x |
|
||||
| | | yes | | | no | x | |
|
||||
|
||||
Scenario: Car - Access tag hierarchy on nodes
|
||||
Then routability should be
|
||||
| node/access | node/vehicle | node/motor_vehicle | node/motorcar | bothw |
|
||||
| | | | | x |
|
||||
@@ -90,11 +119,13 @@ Feature: Car - Restricted access
|
||||
| permissive | x |
|
||||
| designated | x |
|
||||
| no | |
|
||||
| private | |
|
||||
| private | x |
|
||||
| agricultural | |
|
||||
| forestry | |
|
||||
| psv | |
|
||||
| delivery | x |
|
||||
| some_tag | x |
|
||||
| destination | x |
|
||||
|
||||
|
||||
Scenario: Car - Access tags on nodes
|
||||
@@ -104,10 +135,11 @@ Feature: Car - Restricted access
|
||||
| permissive | x |
|
||||
| designated | x |
|
||||
| no | |
|
||||
| private | |
|
||||
| private | x |
|
||||
| agricultural | |
|
||||
| forestry | |
|
||||
| psv | |
|
||||
| delivery | x |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Car - Access tags on both node and way
|
||||
@@ -125,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
|
||||
@@ -146,3 +178,129 @@ Feature: Car - Restricted access
|
||||
| primary | | | no | | x |
|
||||
| runway | | | | yes | |
|
||||
| primary | | | | no | x |
|
||||
|
||||
@hov
|
||||
Scenario: Car - designated HOV ways are rated low
|
||||
Then routability should be
|
||||
| highway | hov | bothw | forw_rate | backw_rate |
|
||||
| primary | designated | x | 18 | 18 |
|
||||
| primary | yes | x | 18 | 18 |
|
||||
| primary | no | x | 18 | 18 |
|
||||
|
||||
# Models:
|
||||
# https://www.openstreetmap.org/way/124891268
|
||||
# https://www.openstreetmap.org/way/237173472
|
||||
@hov
|
||||
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 | | 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 | 18 | 18 |
|
||||
# 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 | 18 |
|
||||
#| primary | designated | | | | x | x | 18 | 18 |
|
||||
| primary | designated\|designated | designated\|designated | | | x | x | 18 | 18 |
|
||||
| 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 | | 18 |
|
||||
| primary | | | designated | yes | x | | 18 | |
|
||||
| primary | | | designated | -1 | | x | | 18 |
|
||||
| primary | | | designated\| | yes | x | | 18 | |
|
||||
| primary | | | designated\| | -1 | | x | | 18 |
|
||||
| primary | | | designated\|designated | yes | x | | 18 | |
|
||||
| primary | | | designated\|designated | -1 | | x | | 18 |
|
||||
| primary | | | designated\|yes | yes | x | | 18 | |
|
||||
| primary | | | designated\|no | -1 | | x | | 18 |
|
||||
|
||||
Scenario: Car - these toll roads always work
|
||||
Then routability should be
|
||||
| highway | toll | bothw |
|
||||
| primary | no | x |
|
||||
| primary | snowmobile | x |
|
||||
|
||||
Scenario: Car - toll=yes ways are enabled by default
|
||||
Then routability should be
|
||||
| highway | toll | bothw |
|
||||
| primary | yes | x |
|
||||
|
||||
Scenario: Car - directional access tags
|
||||
Then routability should be
|
||||
| highway | access | access:forward | access:backward | forw | backw |
|
||||
| primary | yes | yes | yes | x | x |
|
||||
| primary | yes | | no | x | |
|
||||
| primary | yes | no | | | x |
|
||||
| primary | yes | no | no | | |
|
||||
| primary | no | no | no | | |
|
||||
| primary | no | | yes | | x |
|
||||
| primary | no | yes | | x | |
|
||||
| primary | no | yes | yes | x | x |
|
||||
|
||||
|
||||
Scenario: Car - barrier=gate should be routed over unless explicitely forbidden
|
||||
Then routability should be
|
||||
| node/barrier | access | bothw |
|
||||
| gate | | x |
|
||||
| gate | no | |
|
||||
| gate | yes | x |
|
||||
| gate | permissive | x |
|
||||
| gate | designated | x |
|
||||
| gate | private | x |
|
||||
| gate | garbagetag | x |
|
||||
|
||||
Scenario: Car - a way with conditional access
|
||||
Then routability should be
|
||||
| highway | vehicle:forward | vehicle:backward:conditional | forw | backw |
|
||||
| pedestrian | yes | delivery @ (20:00-11:00) | x | |
|
||||
|
||||
Scenario: Car - a way with a list of tags
|
||||
Then routability should be
|
||||
| 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
|
||||
| highway | access | forw | backw |
|
||||
| steps | yes | | |
|
||||
| steps | no | | |
|
||||
| primary | | x | x |
|
||||
|
||||
Scenario: Car - Access combinations
|
||||
Then routability should be
|
||||
| highway | access | bothw |
|
||||
| primary | permissive | x |
|
||||
| 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 |
|
||||
|
||||
@@ -8,7 +8,9 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
Scenario: Car - Advisory speed overwrites maxspeed
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed | maxspeed:advisory |
|
||||
@@ -17,12 +19,14 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 47 km/h +- 1 |
|
||||
| b | c | bc | 47 km/h +- 1 |
|
||||
| a | b | ab,ab | 36 km/h +- 1 |
|
||||
| b | c | bc,bc | 36 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites forward maxspeed
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:forward | maxspeed:advisory:forward |
|
||||
@@ -31,12 +35,14 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 47 km/h +- 1 |
|
||||
| b | c | bc | 47 km/h +- 1 |
|
||||
| a | b | ab,ab | 36 km/h +- 1 |
|
||||
| b | c | bc,bc | 36 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites backwards maxspeed
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:backward | maxspeed:advisory:backward |
|
||||
@@ -45,12 +51,31 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| b | a | ab | 47 km/h +- 1 |
|
||||
| c | b | bc | 47 km/h +- 1 |
|
||||
| b | a | ab,ab | 36 km/h +- 1 |
|
||||
| c | b | bc,bc | 36 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Advisory speed overwrites backwards maxspeed
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:backward | maxspeed:advisory:backward |
|
||||
| ab | residential | | 45 |
|
||||
| bc | residential | 90 | 45 |
|
||||
| cd | residential | | 45 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| c | b | bc,bc | 36 km/h +- 1 |
|
||||
| d | c | cd,cd | 36 km/h +- 1 |
|
||||
|
||||
Scenario: Car - Directional advisory speeds play nice with eachother
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed:advisory | maxspeed:advisory:forward | maxspeed:advisory:backward |
|
||||
@@ -59,9 +84,9 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 47 km/h +- 1 |
|
||||
| b | a | ab | 59 km/h +- 1 |
|
||||
| b | c | bc | 59 km/h +- 1 |
|
||||
| c | b | bc | 47 km/h +- 1 |
|
||||
| a | b | ab,ab | 36 km/h +- 1 |
|
||||
| b | a | ab,ab | 48 km/h +- 1 |
|
||||
| b | c | bc,bc | 48 km/h +- 1 |
|
||||
| c | b | bc,bc | 36 km/h +- 1 |
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+49
-23
@@ -1,47 +1,73 @@
|
||||
@routing @car @bridge
|
||||
Feature: Car - Handle movable bridge
|
||||
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
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge | bicycle |
|
||||
| abc | primary | | |
|
||||
| cde | | movable | yes |
|
||||
| cde | primary | movable | yes |
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,3,1 |
|
||||
| b | f | abc,cde,efg | 1,3,1 |
|
||||
| e | c | cde | 3 |
|
||||
| e | b | cde,abc | 3,1 |
|
||||
| e | a | cde,abc | 3,1 |
|
||||
| c | e | cde | 3 |
|
||||
| c | f | cde,efg | 3,1 |
|
||||
| c | g | cde,efg | 3,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving |
|
||||
| e | c | cde,cde | driving,driving |
|
||||
| e | b | cde,abc,abc | driving,driving,driving |
|
||||
| e | a | cde,abc,abc | driving,driving,driving |
|
||||
| c | e | cde,cde | driving,driving |
|
||||
| c | f | cde,efg,efg | driving,driving,driving |
|
||||
| c | g | cde,efg,efg | driving,driving,driving |
|
||||
|
||||
Scenario: Car - Control test without durations, osrm uses movable bridge speed to calculate duration
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | bridge |
|
||||
| abc | primary | |
|
||||
| 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 | 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
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
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
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,3,1 | 7 km/h |
|
||||
| b | f | abc,cde,efg | 1,3,1 | 5 km/h |
|
||||
| c | e | cde | 3 | 2 km/h |
|
||||
| e | c | cde | 3 | 2 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg,efg | driving,driving,driving,driving | 7 km/h |
|
||||
| b | f | abc,cde,efg,efg | driving,driving,driving,driving | 5 km/h |
|
||||
| c | e | cde,cde | driving,driving | 2 km/h |
|
||||
| e | c | cde,cde | driving,driving | 2 km/h |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@routing @car @destination @todo
|
||||
@routing @car @destination
|
||||
Feature: Car - Destination only, no passing through
|
||||
|
||||
Background:
|
||||
@@ -6,10 +6,12 @@ Feature: Car - Destination only, no passing through
|
||||
|
||||
Scenario: Car - Destination only street
|
||||
Given the node map
|
||||
| a | | | | e |
|
||||
| | b | c | d | |
|
||||
| | | | | |
|
||||
| x | | | | y |
|
||||
"""
|
||||
a e
|
||||
b c d
|
||||
|
||||
x y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -19,22 +21,24 @@ Feature: Car - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bcd |
|
||||
| a | d | ab,bcd |
|
||||
| a | e | axye |
|
||||
| e | d | de |
|
||||
| e | c | de,bcd |
|
||||
| e | b | de,bcd |
|
||||
| e | a | axye |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bcd |
|
||||
| a | d | ab,bcd,bcd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,bcd |
|
||||
| e | b | de,bcd,bcd |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Car - Destination only street
|
||||
Given the node map
|
||||
| a | | | | e |
|
||||
| | b | c | d | |
|
||||
| | | | | |
|
||||
| x | | | | y |
|
||||
"""
|
||||
a e
|
||||
b c d
|
||||
|
||||
x y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -45,21 +49,23 @@ Feature: Car - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bc |
|
||||
| a | d | ab,bc,cd |
|
||||
| a | e | axye |
|
||||
| e | d | de |
|
||||
| e | c | de,dc |
|
||||
| e | b | de,dc,bc |
|
||||
| e | a | axye |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| a | c | ab,bc |
|
||||
| a | d | ab,cd |
|
||||
| a | e | axye,axye |
|
||||
| e | d | de,de |
|
||||
| e | c | de,cd |
|
||||
| e | b | de,bc |
|
||||
| e | a | axye,axye |
|
||||
|
||||
Scenario: Car - Routing inside a destination only area
|
||||
Given the node map
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
| x | | | | y |
|
||||
"""
|
||||
a c e
|
||||
b d
|
||||
x y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
@@ -70,8 +76,58 @@ Feature: Car - Destination only, no passing through
|
||||
| axye | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | e | ab,bc,cd,de |
|
||||
| e | a | de,cd,bc,ab |
|
||||
| b | d | bc,cd |
|
||||
| d | b | cd,bc |
|
||||
| from | to | route |
|
||||
| a | e | ab,bc,cd,de,de |
|
||||
| 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 |
|
||||
|
||||
+55
-28
@@ -6,9 +6,11 @@ Feature: Car - Handle ferry routes
|
||||
|
||||
Scenario: Car - 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
|
||||
| nodes | highway | route | bicycle |
|
||||
@@ -17,21 +19,44 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,2,1 |
|
||||
| b | f | abc,cde,efg | 1,2,1 |
|
||||
| e | c | cde | 2 |
|
||||
| e | b | cde,abc | 2,1 |
|
||||
| e | a | cde,abc | 2,1 |
|
||||
| c | e | cde | 2 |
|
||||
| c | f | cde,efg | 2,1 |
|
||||
| c | g | cde,efg | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving |
|
||||
| e | c | cde,cde | ferry,ferry |
|
||||
| e | b | cde,abc,abc | ferry,driving,driving |
|
||||
| e | a | cde,abc,abc | ferry,driving,driving |
|
||||
| c | e | cde,cde | ferry,ferry |
|
||||
| c | f | cde,efg,efg | ferry,driving,driving |
|
||||
| c | g | cde,efg,efg | ferry,driving,driving |
|
||||
|
||||
|
||||
Scenario: Car - Use default speeds to calculate duration if no duration given
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route |
|
||||
| abc | primary | |
|
||||
| cde | | ferry |
|
||||
| efg | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed | time |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 12 km/h | 173.4s |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 9 km/h | 162.4s |
|
||||
| c | e | cde,cde | ferry,ferry | 5 km/h | 151.4s |
|
||||
| e | c | cde,cde | ferry,ferry | 5 km/h | 151.4s |
|
||||
Scenario: Car - Properly handle simple durations
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -40,17 +65,19 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,2,1 | 25 km/h |
|
||||
| b | f | abc,cde,efg | 1,2,1 | 20 km/h |
|
||||
| c | e | cde | 2 | 12 km/h |
|
||||
| e | c | cde | 2 | 12 km/h |
|
||||
| from | to | route | modes | speed | time |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 24 km/h | 89.4s |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 18 km/h | 78.4s |
|
||||
| c | e | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
||||
| e | c | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
||||
|
||||
Scenario: Car - Properly handle ISO 8601 durations
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -59,8 +86,8 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,2,1 | 25 km/h |
|
||||
| b | f | abc,cde,efg | 1,2,1 | 20 km/h |
|
||||
| c | e | cde | 2 | 12 km/h |
|
||||
| e | c | cde | 2 | 12 km/h |
|
||||
| from | to | route | modes | speed | time |
|
||||
| a | g | abc,cde,efg,efg | driving,ferry,driving,driving | 24 km/h | 89.4s |
|
||||
| b | f | abc,cde,efg,efg | driving,ferry,driving,driving | 18 km/h | 78.4s |
|
||||
| c | e | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
||||
| e | c | cde,cde | ferry,ferry | 11 km/h | 67.4s |
|
||||
|
||||
@@ -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 |
|
||||
+35
-25
@@ -9,8 +9,10 @@ Feature: Car - Speed on links
|
||||
|
||||
Scenario: Car - Use motorway_link when reasonable
|
||||
Given the node map
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -24,14 +26,16 @@ Feature: Car - Speed on links
|
||||
| dy | unclassified |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
Scenario: Car - Use trunk_link when reasonable
|
||||
Given the node map
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -44,14 +48,16 @@ Feature: Car - Speed on links
|
||||
| fd | trunk |
|
||||
| dy | unclassified |
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
Scenario: Car - Use primary_link when reasonable
|
||||
Given the node map
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -64,14 +70,16 @@ Feature: Car - Speed on links
|
||||
| fd | primary |
|
||||
| dy | unclassified |
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
Scenario: Car - Use secondary_link when reasonable
|
||||
Given the node map
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -85,14 +93,16 @@ Feature: Car - Speed on links
|
||||
| dy | unclassified |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
Scenario: Car - Use tertiary_link when reasonable
|
||||
Given the node map
|
||||
| | | e | | | | f | | |
|
||||
| x | a | b | | | | c | d | y |
|
||||
"""
|
||||
e f
|
||||
x a b c d y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway |
|
||||
@@ -106,6 +116,6 @@ Feature: Car - Speed on links
|
||||
| dy | unclassified |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy |
|
||||
| b | c | bc |
|
||||
| from | to | route |
|
||||
| x | y | xa,ae,ef,fd,dy,dy |
|
||||
| b | c | bc,bc |
|
||||
|
||||
@@ -6,9 +6,11 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
Given the profile "car"
|
||||
Given a grid size of 1000 meters
|
||||
|
||||
Scenario: Car - Respect maxspeeds when lower that way type speed
|
||||
Scenario: Car - Respect maxspeeds when lower than way type speed
|
||||
Given the node map
|
||||
| a | b | c | d | e | f | g |
|
||||
"""
|
||||
a b c d e f g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed |
|
||||
@@ -20,42 +22,48 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
| fg | trunk | CH:motorway |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 78 km/h |
|
||||
| b | c | bc | 59 km/h +- 1 |
|
||||
| c | d | cd | 51 km/h |
|
||||
| d | e | de | 75 km/h |
|
||||
| e | f | ef | 90 km/h |
|
||||
| f | g | fg | 106 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 85 km/h |
|
||||
| b | c | bc,bc | 48 km/h |
|
||||
| c | d | cd,cd | 40 km/h |
|
||||
| d | e | de,de | 64 km/h |
|
||||
| e | f | ef,ef | 80 km/h |
|
||||
| f | g | fg,fg | 96 km/h |
|
||||
|
||||
Scenario: Car - Do not ignore maxspeed when higher than way speed
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | maxspeed |
|
||||
| ab | residential | |
|
||||
| bc | residential | 90 |
|
||||
| cd | living_street | FR:urban |
|
||||
| nodes | highway | maxspeed | # |
|
||||
| ab | residential | | default residential speed is 25 |
|
||||
| bc | residential | 90 | |
|
||||
| cd | living_street | FR:urban | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | speed |
|
||||
| a | b | ab | 31 km/h |
|
||||
| b | c | bc | 83 km/h +- 1 |
|
||||
| c | d | cd | 51 km/h |
|
||||
| from | to | route | speed |
|
||||
| a | b | ab,ab | 25 km/h |
|
||||
# default residential speed is 25, don't mess with this
|
||||
| b | c | bc,bc | 72 km/h |
|
||||
# parsed maxspeeds are scaled by profile's speed_reduction value
|
||||
| c | d | cd,cd | 40 km/h |
|
||||
# symbolic posted speeds without explicit exceptions are parsed
|
||||
# from the profile's maxspeed_table_default table
|
||||
|
||||
Scenario: Car - Forward/backward maxspeed
|
||||
Scenario: Car - Forward/backward maxspeed are scaled by profile's speed_reduction if explicitly set
|
||||
Given a grid size of 100 meters
|
||||
|
||||
Then routability should be
|
||||
| highway | maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| primary | | | | 65 km/h | 65 km/h |
|
||||
| primary | 60 | | | 60 km/h | 60 km/h |
|
||||
| primary | | 60 | | 60 km/h | 65 km/h |
|
||||
| primary | | | 60 | 65 km/h | 60 km/h |
|
||||
| primary | 15 | 60 | | 60 km/h | 23 km/h |
|
||||
| primary | 15 | | 60 | 23 km/h | 60 km/h |
|
||||
| primary | 15 | 30 | 60 | 34 km/h | 60 km/h |
|
||||
| primary | 60 | | | 48 km/h | 48 km/h |
|
||||
| primary | | 60 | | 48 km/h | 65 km/h |
|
||||
| primary | | | 60 | 65 km/h | 48 km/h |
|
||||
| primary | 15 | 60 | | 48 km/h | 12 km/h |
|
||||
| primary | 15 | | 60 | 12 km/h | 48 km/h |
|
||||
| primary | 15 | 30 | 60 | 24 km/h | 48 km/h |
|
||||
|
||||
Scenario: Car - Maxspeed should not allow routing on unroutable ways
|
||||
Then routability should be
|
||||
@@ -77,45 +85,55 @@ OSRM will use 4/5 of the projected free-flow speed.
|
||||
Scenario: Car - Too narrow streets should be ignored or incur a penalty
|
||||
Then routability should be
|
||||
|
||||
| highway | maxspeed | width | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| primary | | | | | 63 km/h | 63 km/h |
|
||||
| primary | | 3 | | | 32 km/h | 32 km/h |
|
||||
| primary | 60 | | | | 59 km/h | 59 km/h |
|
||||
| primary | 60 | 3 | | | 30 km/h | 30 km/h |
|
||||
| primary | | | 60 | | 59 km/h | 63 km/h |
|
||||
| primary | | 3 | 60 | | 30 km/h | 32 km/h |
|
||||
| primary | | | | 60 | 63 km/h | 59 km/h |
|
||||
| primary | | 3 | | 60 | 32 km/h | 30 km/h |
|
||||
| primary | 15 | | 60 | | 59 km/h | 23 km/h |
|
||||
| primary | 15 | 3 | 60 | | 30 km/h | 7 km/h |
|
||||
| primary | 15 | | | 60 | 23 km/h | 59 km/h |
|
||||
| primary | 15 | 3 | | 60 | 7 km/h | 30 km/h |
|
||||
| primary | 15 | | 30 | 60 | 34 km/h | 59 km/h |
|
||||
| primary | 15 | 3 | 30 | 60 | 15 km/h | 30 km/h |
|
||||
| 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 |
|
||||
|
||||
Scenario: Car - Single lane streets be ignored or incur a penalty
|
||||
Then routability should be
|
||||
|
||||
| highway | maxspeed | lanes | maxspeed:forward | maxspeed:backward | forw | backw |
|
||||
| primary | | | | | 63 km/h | 63 km/h |
|
||||
| primary | | 1 | | | 32 km/h | 32 km/h |
|
||||
| primary | 60 | | | | 59 km/h | 59 km/h |
|
||||
| primary | 60 | 1 | | | 30 km/h | 30 km/h |
|
||||
| primary | | | 60 | | 59 km/h | 63 km/h |
|
||||
| primary | | 1 | 60 | | 30 km/h | 32 km/h |
|
||||
| primary | | | | 60 | 63 km/h | 59 km/h |
|
||||
| primary | | 1 | | 60 | 32 km/h | 30 km/h |
|
||||
| primary | 15 | | 60 | | 59 km/h | 23 km/h |
|
||||
| primary | 15 | 1 | 60 | | 30 km/h | 7 km/h |
|
||||
| primary | 15 | | | 60 | 23 km/h | 59 km/h |
|
||||
| primary | 15 | 1 | | 60 | 7 km/h | 30 km/h |
|
||||
| primary | 15 | | 30 | 60 | 34 km/h | 59 km/h |
|
||||
| primary | 15 | 1 | 30 | 60 | 15 km/h | 30 km/h |
|
||||
| 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 |
|
||||
|
||||
Scenario: Car - Single lane streets only incure a penalty for two-way streets
|
||||
Scenario: Car - Single lane streets only incur a penalty for two-way streets
|
||||
Then routability should be
|
||||
| highway | maxspeed | lanes | oneway | forw | backw |
|
||||
| primary | 30 | 1 | yes | 34 km/h | |
|
||||
| primary | 30 | 1 | -1 | | 34 km/h |
|
||||
| primary | 30 | 1 | | 15 km/h | 15 km/h |
|
||||
| primary | 30 | 2 | | 34 km/h | 34 km/h |
|
||||
| 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 |
|
||||
|
||||
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 | | 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 |
|
||||
|
||||
+16
-12
@@ -5,8 +5,10 @@ Feature: Car - Mode flag
|
||||
|
||||
Scenario: Car - Mode when using a ferry
|
||||
Given the node map
|
||||
| a | b | |
|
||||
| | c | d |
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -15,17 +17,19 @@ Feature: Car - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | ab,bc,cd,cd | driving,ferry,driving,driving |
|
||||
| d | a | cd,bc,ab,ab | driving,ferry,driving,driving |
|
||||
| c | a | bc,ab,ab | ferry,driving,driving |
|
||||
| d | b | cd,bc,bc | driving,ferry,ferry |
|
||||
| a | c | ab,bc,bc | driving,ferry,ferry |
|
||||
| b | d | bc,cd,cd | ferry,driving,driving |
|
||||
|
||||
Scenario: Car - Snapping when using a ferry
|
||||
Given the node map
|
||||
| a | b | | c | d | | e | f |
|
||||
"""
|
||||
a b c d e f
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | duration |
|
||||
@@ -34,7 +38,7 @@ Feature: Car - Mode flag
|
||||
| ef | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes | time |
|
||||
| c | d | bcde | head,destination | 2 | 600s |
|
||||
| from | to | route | modes | time |
|
||||
| c | d | bcde,bcde | ferry,ferry | 600s |
|
||||
|
||||
|
||||
|
||||
@@ -3,11 +3,14 @@ Feature: Car - Street names in instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
Given a grid size of 5 meters
|
||||
|
||||
Scenario: Car - A named street
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
"""
|
||||
a b
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | ref |
|
||||
@@ -15,13 +18,53 @@ Feature: Car - Street names in instructions
|
||||
| bc | Your Way | A1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way (A1) |
|
||||
| from | to | route | ref |
|
||||
| a | c | My Way,Your Way | ,A1|
|
||||
|
||||
Scenario: Car - A named street with pronunciation
|
||||
Given the node map
|
||||
"""
|
||||
a b d
|
||||
1
|
||||
c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name |name:pronunciation | ref |
|
||||
| ab | My Way | | |
|
||||
| bd | My Way | meyeway | A1 |
|
||||
| cd | Your Way | yourewaye | |
|
||||
|
||||
When I route I should get
|
||||
| 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
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
d
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | name | name:pronunciation |
|
||||
| abc | Houston St | hew-stun |
|
||||
| bde | Houston St | how-stun |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | pronunciations |
|
||||
| a | c | Houston St,Houston St | hew-stun,hew-stun |
|
||||
| a | e | Houston St,Houston St,Houston St | hew-stun,how-stun,how-stun |
|
||||
|
||||
@todo
|
||||
Scenario: Car - Use way type to describe unnamed ways
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
"""
|
||||
a b c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
@@ -29,5 +72,35 @@ Feature: Car - Street names in instructions
|
||||
| bcd | residential | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | tertiary,residential |
|
||||
| from | to | route |
|
||||
| a | c | tertiary,residential,residential |
|
||||
|
||||
Scenario: Inner city expressway with on road
|
||||
Given the node map
|
||||
"""
|
||||
a b . . . c g
|
||||
`f .
|
||||
`
|
||||
.
|
||||
.
|
||||
d
|
||||
.
|
||||
.
|
||||
.
|
||||
e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name | name:pronunciation | oneway |
|
||||
| abc | primary | road | roooaad | |
|
||||
| cg | primary | road | roooaad | |
|
||||
| bfd | trunk_link | sliproad | | yes |
|
||||
| cde | trunk | trunk | truank | yes |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | abc | cde | c | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns | pronunciations |
|
||||
| a,e | road,trunk,trunk | depart,turn right,arrive | roooaad,truank,truank |
|
||||
|
||||
+51
-18
@@ -15,26 +15,46 @@ Feature: Car - Oneway streets
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | -1 | | x |
|
||||
|
||||
Scenario: Car - Mode specific oneway
|
||||
Then routability should be
|
||||
| highway | oneway:motorcar | oneway:motor_vehicle | oneway:vehicle | oneway | forw | backw |
|
||||
| primary | | | | | x | x |
|
||||
| primary | yes | | | | x | |
|
||||
| primary | | yes | | | x | |
|
||||
| primary | | | yes | | x | |
|
||||
| primary | | | | yes | x | |
|
||||
| primary | yes | no | | | x | |
|
||||
| primary | | yes | no | | x | |
|
||||
| primary | | | yes | no | x | |
|
||||
| primary | | | | yes | x | |
|
||||
| primary | no | yes | | | x | x |
|
||||
| primary | | no | yes | | x | x |
|
||||
| primary | | | no | yes | x | x |
|
||||
|
||||
Scenario: Car - Implied oneways
|
||||
Then routability should be
|
||||
| highway | junction | forw | backw |
|
||||
| motorway | | x | |
|
||||
| motorway_link | | x | |
|
||||
| primary | | x | x |
|
||||
| motorway | roundabout | x | |
|
||||
| motorway_link | roundabout | x | |
|
||||
| primary | roundabout | x | |
|
||||
| highway | junction | forw | backw | # |
|
||||
| motorway | | x | | |
|
||||
| motorway_link | | x | x | does not imply oneway |
|
||||
| primary | | x | x | |
|
||||
| motorway | roundabout | x | | |
|
||||
| motorway_link | roundabout | x | | |
|
||||
| primary | roundabout | x | | |
|
||||
|
||||
Scenario: Car - Overrule implied oneway
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| motorway | no | x | x |
|
||||
| motorway_link | no | x | x |
|
||||
| highway | oneway | forw | backw | # |
|
||||
| motorway | no | x | x | |
|
||||
| motorway_link | no | x | x | |
|
||||
| motorway_link | yes | x | | |
|
||||
| motorway_link | | x | x | does not imply onway |
|
||||
|
||||
Scenario: Car - Around the Block
|
||||
Given the node map
|
||||
| a | b |
|
||||
| d | c |
|
||||
"""
|
||||
a b
|
||||
f d c e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -42,11 +62,13 @@ Feature: Car - Oneway streets
|
||||
| bc | |
|
||||
| cd | |
|
||||
| da | |
|
||||
| ce | |
|
||||
| df | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | bc,cd,da |
|
||||
| from | to | route |
|
||||
| a | b | ab,ab |
|
||||
| b | a | bc,cd,da,da |
|
||||
|
||||
Scenario: Car - Cars should not be affected by bicycle tags
|
||||
Then routability should be
|
||||
@@ -66,7 +88,9 @@ Feature: Car - Oneway streets
|
||||
|
||||
Scenario: Car - Two consecutive oneways
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
"""
|
||||
a b c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -75,5 +99,14 @@ Feature: Car - Oneway streets
|
||||
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | ab,bc |
|
||||
| from | to | route |
|
||||
| a | c | ab,bc,bc |
|
||||
|
||||
|
||||
# Reversible oneways (low frequency) vs alternating oneways (high frequency).
|
||||
# See: https://github.com/Project-OSRM/osrm-backend/issues/2837
|
||||
Scenario: Car - Route over alternating but not reversible oneways
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | reversible | | |
|
||||
| primary | alternating | x | x |
|
||||
|
||||
+194
-117
@@ -5,13 +5,16 @@ Feature: Car - Turn restrictions
|
||||
|
||||
Background: Use car routing
|
||||
Given the profile "car"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -25,17 +28,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | wj | j | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No straight on
|
||||
Given the node map
|
||||
| a | b | j | d | e |
|
||||
| v | | | | z |
|
||||
| | w | x | y | |
|
||||
"""
|
||||
a b j d e
|
||||
v z
|
||||
w x y
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -55,15 +60,17 @@ Feature: Car - Turn restrictions
|
||||
| restriction | bj | jd | j | no_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | e | av,vw,wx,xy,yz,ze |
|
||||
| from | to | route |
|
||||
| a | e | av,vw,wx,xy,yz,ze,ze |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -77,17 +84,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | ej | j | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - No u-turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -101,17 +110,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | wj | j | no_u_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - Handle any no_* relation
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -125,17 +136,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | wj | j | no_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Car - Only left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -148,18 +161,38 @@ Feature: Car - Turn restrictions
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | sj | wj | j | only_left_turn |
|
||||
|
||||
Scenario: Car - Only right turn, invalid
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e r
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
| re | -1 |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | sj | er | j | only_right_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | |
|
||||
| s | e | |
|
||||
| from | to | route |
|
||||
| s | r | sj,ej,re,re |
|
||||
|
||||
@only_turning
|
||||
Scenario: Car - Only right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -173,17 +206,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | ej | j | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Car - Only straight on
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -197,17 +232,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | nj | j | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: Car - Handle any only_* restriction
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -221,17 +258,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | nj | j | only_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | |
|
||||
|
||||
@specific
|
||||
Scenario: Car - :hgv-qualified on a standard turn restriction
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -245,17 +284,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | nj | j | no_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@specific
|
||||
Scenario: Car - :motorcar-qualified on a standard turn restriction
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -269,17 +310,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | nj | j | no_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | |
|
||||
| s | e | sj,ej |
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
@except
|
||||
Scenario: Car - Except tag and on no_ restrictions
|
||||
Given the node map
|
||||
| b | x | c |
|
||||
| a | j | d |
|
||||
| | s | |
|
||||
"""
|
||||
b x c
|
||||
a j d
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -298,18 +341,20 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | dj | j | no_right_turn | motorcar |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | |
|
||||
| s | c | |
|
||||
| s | d | sj,dj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | |
|
||||
| s | c | |
|
||||
| s | d | sj,dj,dj |
|
||||
|
||||
@except
|
||||
Scenario: Car - Except tag and on only_ restrictions
|
||||
Given the node map
|
||||
| a | | b |
|
||||
| | j | |
|
||||
| | s | |
|
||||
"""
|
||||
a b
|
||||
j
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -322,17 +367,19 @@ Feature: Car - Turn restrictions
|
||||
| restriction | sj | aj | j | only_straight_on | motorcar |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | a | sj,aj |
|
||||
| s | b | sj,bj |
|
||||
| from | to | route |
|
||||
| s | a | sj,aj,aj |
|
||||
| s | b | sj,bj,bj |
|
||||
|
||||
@except
|
||||
Scenario: Car - Several only_ restrictions at the same segment
|
||||
Given the node map
|
||||
| | | | | y | | | | |
|
||||
| i | j | f | b | x | a | e | g | h |
|
||||
| | | | | | | | | |
|
||||
| | | | c | | d | | | |
|
||||
"""
|
||||
y
|
||||
i j f b x a e g h
|
||||
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -356,21 +403,23 @@ Feature: Car - Turn restrictions
|
||||
| restriction | da | ae | a | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| e | f | ae,xa,bx,fb |
|
||||
| c | f | dc,da,ae,ge,hg,hg,ge,ae,xa,bx,fb |
|
||||
| d | f | da,ae,ge,hg,hg,ge,ae,xa,bx,fb |
|
||||
| from | to | route |
|
||||
| e | f | ae,xa,bx,fb,fb |
|
||||
| c | f | dc,da,ae,ge,hg,hg,ge,ae,xa,bx,fb,fb |
|
||||
| d | f | da,ae,ge,hg,hg,ge,ae,xa,bx,fb,fb |
|
||||
|
||||
@except
|
||||
Scenario: Car - two only_ restrictions share same to-way
|
||||
Given the node map
|
||||
| | | e | | | | f | | |
|
||||
| | | | | a | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | c | | x | | d | | |
|
||||
| | | | | y | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | b | | | | |
|
||||
"""
|
||||
e f
|
||||
a
|
||||
|
||||
c x d
|
||||
y
|
||||
|
||||
b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -391,20 +440,22 @@ Feature: Car - Turn restrictions
|
||||
| restriction | by | xy | y | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ax,xy,yb |
|
||||
| b | a | yb,xy,ax |
|
||||
| from | to | route |
|
||||
| a | b | ax,xy,yb,yb |
|
||||
| b | a | yb,xy,ax,ax |
|
||||
|
||||
@except
|
||||
Scenario: Car - two only_ restrictions share same from-way
|
||||
Given the node map
|
||||
| | | e | | | | f | | |
|
||||
| | | | | a | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | c | | x | | d | | |
|
||||
| | | | | y | | | | |
|
||||
| | | | | | | | | |
|
||||
| | | | | b | | | | |
|
||||
"""
|
||||
e f
|
||||
a
|
||||
|
||||
c x d
|
||||
y
|
||||
|
||||
b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
@@ -425,7 +476,33 @@ Feature: Car - Turn restrictions
|
||||
| restriction | xy | yb | y | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ax,xy,yb |
|
||||
| b | a | yb,xy,ax |
|
||||
| from | to | route |
|
||||
| a | b | ax,xy,yb,yb |
|
||||
| b | a | yb,xy,ax,ax |
|
||||
|
||||
@specific
|
||||
Scenario: Car - Ignore unrecognized restriction
|
||||
Given the node map
|
||||
"""
|
||||
n
|
||||
w j e
|
||||
s
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| type | way:from | way:to | node:via | restriction |
|
||||
| restriction | sj | wj | j | yield |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj,wj |
|
||||
| s | n | sj,nj,nj |
|
||||
| s | e | sj,ej,ej |
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
@routing @car @roundabout @instruction
|
||||
Feature: Roundabout Instructions
|
||||
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
Scenario: Car - Roundabout instructions
|
||||
Given the node map
|
||||
| | | v | | |
|
||||
| | | d | | |
|
||||
| s | a | | c | u |
|
||||
| | | b | | |
|
||||
| | | t | | |
|
||||
|
||||
And the ways
|
||||
| nodes | junction |
|
||||
| sa | |
|
||||
| tb | |
|
||||
| uc | |
|
||||
| vd | |
|
||||
| abcda | roundabout |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns |
|
||||
| s | t | sa,tb | head,enter_roundabout-1,destination |
|
||||
| s | u | sa,uc | head,enter_roundabout-2,destination |
|
||||
| s | v | sa,vd | head,enter_roundabout-3,destination |
|
||||
| u | v | uc,vd | head,enter_roundabout-1,destination |
|
||||
| u | s | uc,sa | head,enter_roundabout-2,destination |
|
||||
| u | t | uc,tb | head,enter_roundabout-3,destination |
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user