@wemap/routers 6.2.3 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/assets/biocbon-bergere-rdc-network.osm +163 -0
  2. package/assets/gare-de-lest-network-pp-bounds.osm +1615 -0
  3. package/assets/rr-wemap-meta-indoor-outdoor-indoor.json +1352 -0
  4. package/assets/rr-wemap-meta-indoor-outdoor.json +145 -0
  5. package/assets/rr-wemap-meta-outdoor-indoor.json +145 -0
  6. package/assets/rr-wemap-meta-outdoor-outdoor.json +207 -0
  7. package/assets/rr-wemap-meta-remote-indoor-indoor.json +155 -0
  8. package/assets/rr-wemap-meta-remote-indoor-outdoor-indoor.json +685 -0
  9. package/assets/rr-wemap-meta-remote-indoor-outdoor.json +154 -0
  10. package/assets/rr-wemap-meta-remote-outdoor-indoor.json +179 -0
  11. package/assets/rr-wemap-meta-remote-outdoor-outdoor.json +109 -0
  12. package/dist/wemap-routers.es.js +3691 -0
  13. package/dist/wemap-routers.es.js.map +1 -0
  14. package/index.js +13 -5
  15. package/package.json +9 -6
  16. package/src/Constants.js +1 -0
  17. package/src/ItineraryInfoManager.spec.js +2 -2
  18. package/src/Utils.js +0 -77
  19. package/src/model/Itinerary.js +41 -5
  20. package/src/model/Itinerary.spec.js +91 -0
  21. package/src/model/Itinerary.type.spec.js +3 -78
  22. package/src/model/Leg.js +89 -19
  23. package/src/model/Leg.spec.js +110 -0
  24. package/src/model/Leg.type.spec.js +48 -0
  25. package/src/model/LevelChange.js +14 -24
  26. package/src/model/LevelChange.spec.js +78 -0
  27. package/src/model/LevelChange.type.spec.js +26 -0
  28. package/src/model/RouterResponse.js +70 -1
  29. package/src/model/RouterResponse.spec.js +85 -0
  30. package/src/model/RouterResponse.type.spec.js +7 -4
  31. package/src/model/Step.js +45 -6
  32. package/src/model/Step.spec.js +100 -0
  33. package/src/model/Step.type.spec.js +52 -0
  34. package/src/remote/RemoteRouter.js +31 -0
  35. package/src/remote/RemoteRouterManager.js +84 -0
  36. package/src/remote/RemoteRouterOptions.js +25 -0
  37. package/src/remote/RemoteRouterServerUnreachable.js +10 -0
  38. package/src/remote/RemoteRouterUtils.js +78 -0
  39. package/src/remote/RoutingModeCorrespondanceNotFound.js +18 -0
  40. package/src/remote/cityway/CitywayRemoteRouter.js +386 -0
  41. package/src/{cityway/CitywayUtils.spec.js → remote/cityway/CitywayRemoteRouter.spec.js} +19 -18
  42. package/src/remote/deutsche-bahn/DeutscheBahnRemoteRouter.js +143 -0
  43. package/src/{deutsche-bahn/DeutscheBahnRouterUtils.spec.js → remote/deutsche-bahn/DeutscheBahnRemoteRouter.spec.js} +7 -6
  44. package/src/remote/idfm/IdfmRemoteRouter.js +432 -0
  45. package/src/{idfm/IdfmUtils.spec.js → remote/idfm/IdfmRemoteRouter.spec.js} +7 -6
  46. package/src/remote/idfm/IdfmRemoteRouterTokenError.js +6 -0
  47. package/src/remote/osrm/OsrmRemoteRouter.js +331 -0
  48. package/src/{osrm/OsrmUtils.spec.js → remote/osrm/OsrmRemoteRouter.spec.js} +9 -15
  49. package/src/remote/otp/OtpRemoteRouter.js +222 -0
  50. package/src/{otp/OtpUtils.spec.js → remote/otp/OtpRemoteRouter.spec.js} +10 -9
  51. package/src/remote/wemap-meta/WemapMetaRemoteRouter.js +58 -0
  52. package/src/remote/wemap-meta/WemapMetaRemoteRouter.spec.js +94 -0
  53. package/src/remote/wemap-meta/WemapMetaRemoteRouterOptions.js +38 -0
  54. package/src/remote/wemap-meta/WemapMetaRemoteRouterPayload.js +44 -0
  55. package/src/wemap/WemapRouter.js +6 -0
  56. package/src/wemap/WemapRouterUtils.js +10 -4
  57. package/src/wemap/WemapStepsGeneration.js +36 -9
  58. package/src/wemap-meta/IOMap.js +194 -0
  59. package/src/wemap-meta/WemapMetaRouter.js +347 -0
  60. package/src/wemap-meta/WemapMetaRouter.spec.js +131 -0
  61. package/src/wemap-meta/WemapMetaRouterOptions.js +18 -0
  62. package/src/cityway/CitywayUtils.js +0 -309
  63. package/src/deutsche-bahn/DeutscheBahnRouterUtils.js +0 -91
  64. package/src/idfm/IdfmUtils.js +0 -256
  65. package/src/osrm/OsrmUtils.js +0 -269
  66. package/src/otp/OtpUtils.js +0 -150
@@ -0,0 +1,685 @@
1
+ {
2
+ "routerName": [
3
+ "wemap-meta",
4
+ "osrm",
5
+ "wemap"
6
+ ],
7
+ "from": [
8
+ 48.8725992,
9
+ 2.343431
10
+ ],
11
+ "to": [
12
+ 48.8772962,
13
+ 2.3584458,
14
+ null,
15
+ "0"
16
+ ],
17
+ "itineraries": [
18
+ {
19
+ "from": [
20
+ 48.8725992,
21
+ 2.343431
22
+ ],
23
+ "to": [
24
+ 48.8772962,
25
+ 2.3584458,
26
+ null,
27
+ "0"
28
+ ],
29
+ "distance": 1623.567209158486,
30
+ "duration": 1188.9963905941102,
31
+ "mode": "WALK",
32
+ "legs": [
33
+ {
34
+ "mode": "WALK",
35
+ "from": {
36
+ "coords": [
37
+ 48.8725992,
38
+ 2.343431
39
+ ]
40
+ },
41
+ "to": {
42
+ "coords": [
43
+ 48.87262168252,
44
+ 2.34327125172
45
+ ]
46
+ },
47
+ "distance": 12.558068219028716,
48
+ "duration": 9.041809117700675,
49
+ "coords": [
50
+ [
51
+ 48.87258947110776,
52
+ 2.3434277129983445
53
+ ],
54
+ [
55
+ 48.87259587423,
56
+ 2.34338390486
57
+ ],
58
+ [
59
+ 48.87260236152,
60
+ 2.34329666635
61
+ ],
62
+ [
63
+ 48.87262168252,
64
+ 2.34327125172
65
+ ]
66
+ ],
67
+ "steps": [
68
+ {
69
+ "number": 1,
70
+ "coords": [
71
+ 48.87258947110776,
72
+ 2.3434277129983445
73
+ ],
74
+ "angle": 1.5707971647295182,
75
+ "previousBearing": -2.922923490486779,
76
+ "nextBearing": -1.3521280016265034,
77
+ "distance": 9.714015164011663,
78
+ "_idCoordsInLeg": 0,
79
+ "firstStep": true,
80
+ "duration": 6.994090918088396
81
+ },
82
+ {
83
+ "number": 2,
84
+ "coords": [
85
+ 48.87260236152,
86
+ 2.34329666635
87
+ ],
88
+ "angle": 2.396617182360001,
89
+ "previousBearing": -1.458215167261915,
90
+ "nextBearing": -0.7132396960321222,
91
+ "distance": 2.8440530550170537,
92
+ "_idCoordsInLeg": 2,
93
+ "duration": 2.0477181996122784
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "mode": "WALK",
99
+ "from": {
100
+ "coords": [
101
+ 48.872668,
102
+ 2.343286
103
+ ]
104
+ },
105
+ "to": {
106
+ "coords": [
107
+ 48.877416,
108
+ 2.358155
109
+ ]
110
+ },
111
+ "distance": 1580.1,
112
+ "duration": 1157.7,
113
+ "coords": [
114
+ [
115
+ 48.872668,
116
+ 2.343286
117
+ ],
118
+ [
119
+ 48.872674,
120
+ 2.343243
121
+ ],
122
+ [
123
+ 48.87269,
124
+ 2.343126
125
+ ],
126
+ [
127
+ 48.872913,
128
+ 2.343091
129
+ ],
130
+ [
131
+ 48.872953,
132
+ 2.343083
133
+ ],
134
+ [
135
+ 48.873034,
136
+ 2.343061
137
+ ],
138
+ [
139
+ 48.873078,
140
+ 2.343049
141
+ ],
142
+ [
143
+ 48.873113,
144
+ 2.343139
145
+ ],
146
+ [
147
+ 48.873125,
148
+ 2.34317
149
+ ],
150
+ [
151
+ 48.873217,
152
+ 2.343349
153
+ ],
154
+ [
155
+ 48.87345,
156
+ 2.343803
157
+ ],
158
+ [
159
+ 48.873938,
160
+ 2.344756
161
+ ],
162
+ [
163
+ 48.873997,
164
+ 2.344841
165
+ ],
166
+ [
167
+ 48.874035,
168
+ 2.344896
169
+ ],
170
+ [
171
+ 48.874035,
172
+ 2.345006
173
+ ],
174
+ [
175
+ 48.874034,
176
+ 2.345234
177
+ ],
178
+ [
179
+ 48.874059,
180
+ 2.345233
181
+ ],
182
+ [
183
+ 48.874079,
184
+ 2.345256
185
+ ],
186
+ [
187
+ 48.874081,
188
+ 2.345274
189
+ ],
190
+ [
191
+ 48.874081,
192
+ 2.345329
193
+ ],
194
+ [
195
+ 48.875893,
196
+ 2.345545
197
+ ],
198
+ [
199
+ 48.87594,
200
+ 2.34555
201
+ ],
202
+ [
203
+ 48.875986,
204
+ 2.345554
205
+ ],
206
+ [
207
+ 48.876217,
208
+ 2.345576
209
+ ],
210
+ [
211
+ 48.876308,
212
+ 2.345582
213
+ ],
214
+ [
215
+ 48.876393,
216
+ 2.34591
217
+ ],
218
+ [
219
+ 48.876411,
220
+ 2.345981
221
+ ],
222
+ [
223
+ 48.876462,
224
+ 2.346174
225
+ ],
226
+ [
227
+ 48.876566,
228
+ 2.346582
229
+ ],
230
+ [
231
+ 48.876616,
232
+ 2.346772
233
+ ],
234
+ [
235
+ 48.87672,
236
+ 2.347175
237
+ ],
238
+ [
239
+ 48.876747,
240
+ 2.347277
241
+ ],
242
+ [
243
+ 48.876782,
244
+ 2.347413
245
+ ],
246
+ [
247
+ 48.876955,
248
+ 2.348075
249
+ ],
250
+ [
251
+ 48.877139,
252
+ 2.348782
253
+ ],
254
+ [
255
+ 48.877191,
256
+ 2.348977
257
+ ],
258
+ [
259
+ 48.877232,
260
+ 2.349139
261
+ ],
262
+ [
263
+ 48.877353,
264
+ 2.349604
265
+ ],
266
+ [
267
+ 48.877113,
268
+ 2.351319
269
+ ],
270
+ [
271
+ 48.877101,
272
+ 2.351403
273
+ ],
274
+ [
275
+ 48.877085,
276
+ 2.351518
277
+ ],
278
+ [
279
+ 48.876989,
280
+ 2.352177
281
+ ],
282
+ [
283
+ 48.876891,
284
+ 2.352904
285
+ ],
286
+ [
287
+ 48.876751,
288
+ 2.353949
289
+ ],
290
+ [
291
+ 48.876734,
292
+ 2.354063
293
+ ],
294
+ [
295
+ 48.876639,
296
+ 2.354731
297
+ ],
298
+ [
299
+ 48.876539,
300
+ 2.355424
301
+ ],
302
+ [
303
+ 48.876514,
304
+ 2.355637
305
+ ],
306
+ [
307
+ 48.876509,
308
+ 2.355678
309
+ ],
310
+ [
311
+ 48.876538,
312
+ 2.35575
313
+ ],
314
+ [
315
+ 48.876593,
316
+ 2.355793
317
+ ],
318
+ [
319
+ 48.87648,
320
+ 2.35589
321
+ ],
322
+ [
323
+ 48.876357,
324
+ 2.355985
325
+ ],
326
+ [
327
+ 48.87641,
328
+ 2.356158
329
+ ],
330
+ [
331
+ 48.876459,
332
+ 2.356308
333
+ ],
334
+ [
335
+ 48.876452,
336
+ 2.356351
337
+ ],
338
+ [
339
+ 48.876383,
340
+ 2.356778
341
+ ],
342
+ [
343
+ 48.87631,
344
+ 2.357233
345
+ ],
346
+ [
347
+ 48.876278,
348
+ 2.357437
349
+ ],
350
+ [
351
+ 48.876449,
352
+ 2.357531
353
+ ],
354
+ [
355
+ 48.877332,
356
+ 2.358011
357
+ ],
358
+ [
359
+ 48.877437,
360
+ 2.358068
361
+ ],
362
+ [
363
+ 48.877416,
364
+ 2.358155
365
+ ]
366
+ ],
367
+ "steps": [
368
+ {
369
+ "number": 1,
370
+ "coords": [
371
+ 48.872668,
372
+ 2.343286
373
+ ],
374
+ "angle": -1.5733919626546,
375
+ "previousBearing": 0.20645002690322387,
376
+ "nextBearing": -1.3617506640319692,
377
+ "distance": 12,
378
+ "_idCoordsInLeg": 0,
379
+ "duration": 10.6,
380
+ "name": "Rue Bergère"
381
+ },
382
+ {
383
+ "number": 2,
384
+ "coords": [
385
+ 48.87269,
386
+ 2.343126
387
+ ],
388
+ "angle": 1.8786574763626975,
389
+ "previousBearing": -1.365802188710504,
390
+ "nextBearing": -0.10286701148340839,
391
+ "distance": 43.5,
392
+ "_idCoordsInLeg": 2,
393
+ "duration": 33.4,
394
+ "name": "Rue du Faubourg Montmartre"
395
+ },
396
+ {
397
+ "number": 3,
398
+ "coords": [
399
+ 48.873078,
400
+ 2.343049
401
+ ],
402
+ "angle": 1.927272177622233,
403
+ "previousBearing": -0.17749301256344013,
404
+ "nextBearing": 1.0368274634041201,
405
+ "distance": 172.3,
406
+ "_idCoordsInLeg": 6,
407
+ "duration": 124,
408
+ "name": "Rue Geoffroy Marie"
409
+ },
410
+ {
411
+ "number": 4,
412
+ "coords": [
413
+ 48.874035,
414
+ 2.344896
415
+ ],
416
+ "angle": 2.3315879800356463,
417
+ "previousBearing": 0.7607909301639514,
418
+ "nextBearing": 1.570795603718098,
419
+ "distance": 24.7,
420
+ "_idCoordsInLeg": 13,
421
+ "duration": 17.8,
422
+ "name": "Rue Richer"
423
+ },
424
+ {
425
+ "number": 5,
426
+ "coords": [
427
+ 48.874034,
428
+ 2.345234
429
+ ],
430
+ "angle": -1.5378268658969891,
431
+ "previousBearing": 1.5774632006277636,
432
+ "nextBearing": -0.026302587065040194,
433
+ "distance": 10.9,
434
+ "_idCoordsInLeg": 15,
435
+ "duration": 7.9,
436
+ "name": ""
437
+ },
438
+ {
439
+ "number": 6,
440
+ "coords": [
441
+ 48.874081,
442
+ 2.345329
443
+ ],
444
+ "angle": -1.6490370372085377,
445
+ "previousBearing": 1.5707959652561647,
446
+ "nextBearing": 0.07824034887490897,
447
+ "distance": 248.4,
448
+ "_idCoordsInLeg": 19,
449
+ "duration": 180.9,
450
+ "name": "Rue de Trévise"
451
+ },
452
+ {
453
+ "number": 7,
454
+ "coords": [
455
+ 48.876308,
456
+ 2.345582
457
+ ],
458
+ "angle": 1.9894822288730096,
459
+ "previousBearing": 0.04333681374928895,
460
+ "nextBearing": 1.1954472384660733,
461
+ "distance": 316.3,
462
+ "_idCoordsInLeg": 24,
463
+ "duration": 233.7,
464
+ "name": "Rue La Fayette"
465
+ },
466
+ {
467
+ "number": 8,
468
+ "coords": [
469
+ 48.877353,
470
+ 2.349604
471
+ ],
472
+ "angle": 2.5551859714635894,
473
+ "previousBearing": 1.1940340995120216,
474
+ "nextBearing": 1.7804407816382255,
475
+ "distance": 467.2,
476
+ "_idCoordsInLeg": 37,
477
+ "duration": 338.4,
478
+ "name": "Rue de Chabrol"
479
+ },
480
+ {
481
+ "number": 9,
482
+ "coords": [
483
+ 48.876593,
484
+ 2.355793
485
+ ],
486
+ "angle": 0.9888877665720692,
487
+ "previousBearing": 0.47493386237211865,
488
+ "nextBearing": 2.6276387493898428,
489
+ "distance": 29.8,
490
+ "_idCoordsInLeg": 50,
491
+ "duration": 25.4,
492
+ "name": "Boulevard de Magenta"
493
+ },
494
+ {
495
+ "number": 10,
496
+ "coords": [
497
+ 48.876357,
498
+ 2.355985
499
+ ],
500
+ "angle": -1.604872103409185,
501
+ "previousBearing": 2.671590079048848,
502
+ "nextBearing": 1.1348695288682398,
503
+ "distance": 111.2,
504
+ "_idCoordsInLeg": 52,
505
+ "duration": 82.1,
506
+ "name": "Rue du 8 Mai 1945"
507
+ },
508
+ {
509
+ "number": 11,
510
+ "coords": [
511
+ 48.876278,
512
+ 2.357437
513
+ ],
514
+ "angle": -1.683578352281056,
515
+ "previousBearing": 1.804927511232425,
516
+ "nextBearing": 0.34691320992368746,
517
+ "distance": 136.9,
518
+ "_idCoordsInLeg": 58,
519
+ "duration": 98.6,
520
+ "name": "Rue d'Alsace"
521
+ },
522
+ {
523
+ "number": 12,
524
+ "coords": [
525
+ 48.877437,
526
+ 2.358068
527
+ ],
528
+ "angle": 1.5619566409673145,
529
+ "previousBearing": 0.3429166322679493,
530
+ "nextBearing": 1.9225526448904278,
531
+ "distance": 6.8,
532
+ "_idCoordsInLeg": 61,
533
+ "duration": 4.9,
534
+ "name": ""
535
+ },
536
+ {
537
+ "number": 13,
538
+ "coords": [
539
+ 48.877416,
540
+ 2.358155
541
+ ],
542
+ "angle": 2.0855126907647956,
543
+ "previousBearing": 1.9225526448904278,
544
+ "nextBearing": 2.9786326077154257,
545
+ "distance": 0,
546
+ "_idCoordsInLeg": 62,
547
+ "duration": 0,
548
+ "name": ""
549
+ }
550
+ ]
551
+ },
552
+ {
553
+ "mode": "WALK",
554
+ "from": {
555
+ "coords": [
556
+ 48.8774156,
557
+ 2.3581551,
558
+ null,
559
+ "0"
560
+ ]
561
+ },
562
+ "to": {
563
+ "coords": [
564
+ 48.8772962,
565
+ 2.3584458,
566
+ null,
567
+ "0"
568
+ ]
569
+ },
570
+ "distance": 30.909140939457533,
571
+ "duration": 22.254581476409424,
572
+ "coords": [
573
+ [
574
+ 48.8774156,
575
+ 2.3581551,
576
+ null,
577
+ "0"
578
+ ],
579
+ [
580
+ 48.8774031,
581
+ 2.3582059,
582
+ null,
583
+ "0"
584
+ ],
585
+ [
586
+ 48.87739408877,
587
+ 2.3582397815,
588
+ null,
589
+ "0"
590
+ ],
591
+ [
592
+ 48.87738003272,
593
+ 2.35829263106,
594
+ null,
595
+ "0"
596
+ ],
597
+ [
598
+ 48.87737740687,
599
+ 2.35830250403,
600
+ null,
601
+ "0"
602
+ ],
603
+ [
604
+ 48.87736050007,
605
+ 2.35836607217,
606
+ null,
607
+ "0"
608
+ ],
609
+ [
610
+ 48.8773552,
611
+ 2.358386,
612
+ null,
613
+ "0"
614
+ ],
615
+ [
616
+ 48.87734966973,
617
+ 2.35840668389,
618
+ null,
619
+ "0"
620
+ ],
621
+ [
622
+ 48.87732716148,
623
+ 2.35849104813,
624
+ null,
625
+ "0"
626
+ ],
627
+ [
628
+ 48.87729021362492,
629
+ 2.3584691138693743,
630
+ null,
631
+ "0"
632
+ ]
633
+ ],
634
+ "steps": [
635
+ {
636
+ "number": 1,
637
+ "coords": [
638
+ 48.8774156,
639
+ 2.3581551,
640
+ null,
641
+ "0"
642
+ ],
643
+ "angle": 1.2127782103969411,
644
+ "previousBearing": 0,
645
+ "nextBearing": 1.9288144431928524,
646
+ "distance": 26.493752590446253,
647
+ "_idCoordsInLeg": 0,
648
+ "duration": 19.075501865121304
649
+ },
650
+ {
651
+ "number": 2,
652
+ "coords": [
653
+ 48.87732716148,
654
+ 2.35849104813,
655
+ null,
656
+ "0"
657
+ ],
658
+ "angle": 1.5839505274258527,
659
+ "previousBearing": 1.9561807173237418,
660
+ "nextBearing": -2.769362463691904,
661
+ "distance": 4.4153883490112795,
662
+ "_idCoordsInLeg": 8,
663
+ "duration": 3.1790796112881203
664
+ },
665
+ {
666
+ "number": 3,
667
+ "coords": [
668
+ 48.87729021362492,
669
+ 2.3584691138693743,
670
+ null,
671
+ "0"
672
+ ],
673
+ "angle": 1.570800373779623,
674
+ "previousBearing": -2.769362463691904,
675
+ "nextBearing": -1.1985701838817335,
676
+ "distance": 1.8323309306848967,
677
+ "_idCoordsInLeg": 9,
678
+ "lastStep": true
679
+ }
680
+ ]
681
+ }
682
+ ]
683
+ }
684
+ ]
685
+ }