@wemap/routers 12.10.8 → 12.11.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 (170) hide show
  1. package/dist/helpers/InstructionManager.d.ts +20 -0
  2. package/dist/helpers/InstructionManagerV1.d.ts +7 -0
  3. package/{index.ts → dist/index.d.ts} +1 -11
  4. package/dist/index.js +1 -5099
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +100 -5
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/src/ItineraryInfoManager.d.ts +31 -0
  9. package/dist/src/RoutingError.d.ts +24 -0
  10. package/{src/StatusCode.ts → dist/src/StatusCode.d.ts} +2 -3
  11. package/dist/src/Utils.d.ts +6 -0
  12. package/dist/src/graph/Edge.d.ts +38 -0
  13. package/dist/src/graph/Graph.d.ts +40 -0
  14. package/dist/src/graph/GraphProjection.d.ts +11 -0
  15. package/dist/src/graph/GraphProjectionOptions.d.ts +7 -0
  16. package/dist/src/graph/GraphRoute.d.ts +19 -0
  17. package/dist/src/graph/GraphRouter.d.ts +20 -0
  18. package/dist/src/graph/GraphRouterEngine.d.ts +80 -0
  19. package/{src/graph/GraphRouterOptions.ts → dist/src/graph/GraphRouterOptions.d.ts} +6 -7
  20. package/dist/src/graph/GraphRouterOptionsBuilder.d.ts +23 -0
  21. package/dist/src/graph/GraphRouterOptionsFactors.d.ts +8 -0
  22. package/dist/src/graph/NoRouteFoundError.d.ts +12 -0
  23. package/dist/src/graph/Vertex.d.ts +19 -0
  24. package/dist/src/model/Itinerary.d.ts +81 -0
  25. package/dist/src/model/Leg.d.ts +66 -0
  26. package/dist/src/model/LevelChange.d.ts +7 -0
  27. package/dist/src/model/RouterRequest.d.ts +42 -0
  28. package/dist/src/model/Step.d.ts +42 -0
  29. package/dist/src/model/StepExtra.d.ts +3 -0
  30. package/dist/src/model/StepsBuilder.d.ts +16 -0
  31. package/dist/src/model/TransitMode.d.ts +5 -0
  32. package/{src/model/TravelMode.ts → dist/src/model/TravelMode.d.ts} +1 -2
  33. package/dist/src/model/generateSteps.d.ts +0 -0
  34. package/{src/remote/RemoteRouter.ts → dist/src/remote/RemoteRouter.d.ts} +2 -7
  35. package/dist/src/remote/RemoteRouterManager.d.ts +731 -0
  36. package/dist/src/remote/RemoteRouterUtils.d.ts +6 -0
  37. package/dist/src/remote/cityway/CitywayRemoteRouter.d.ts +109 -0
  38. package/dist/src/remote/deutsche-bahn/DeutscheBahnRemoteRouter.d.ts +31 -0
  39. package/dist/src/remote/geovelo/GeoveloRemoteRouter.d.ts +106 -0
  40. package/dist/src/remote/idfm/IdfmRemoteRouter.d.ts +123 -0
  41. package/dist/src/remote/navitia/NavitiaRemoteRouter.d.ts +34 -0
  42. package/dist/src/remote/navitia/types.d.ts +87 -0
  43. package/dist/src/remote/osrm/OsrmRemoteRouter.d.ts +70 -0
  44. package/dist/src/remote/otp/OtpRemoteRouter.d.ts +69 -0
  45. package/dist/src/remote/wemap-multi/WemapMultiRemoteRouter.d.ts +19 -0
  46. package/dist/src/types.d.ts +31 -0
  47. package/dist/src/wemap-multi/CustomGraphMap.d.ts +56 -0
  48. package/dist/src/wemap-multi/CustomGraphMapTester.d.ts +39 -0
  49. package/dist/src/wemap-multi/WemapMultiRouter.d.ts +14 -0
  50. package/dist/src/wemap-osm/OsmGraphUtils.d.ts +11 -0
  51. package/dist/tests/CommonTest.d.ts +8 -0
  52. package/package.json +11 -8
  53. package/assets/biocbon-bergere-rdc-network.osm +0 -163
  54. package/assets/bureaux-wemap-montpellier-network.osm +0 -174
  55. package/assets/components.osm +0 -146
  56. package/assets/elevator-models-4.osm +0 -89
  57. package/assets/elevator-models.osm +0 -354
  58. package/assets/exit-graph.osm +0 -25
  59. package/assets/gare-de-lest-network-pp-bounds.osm +0 -1613
  60. package/assets/gare-de-lyon-extract.osm +0 -174
  61. package/assets/geovelo-montpellier.json +0 -1144
  62. package/assets/horizontal-elevator.osm +0 -12
  63. package/assets/itinerary-deutsche-bahn-1.json +0 -368
  64. package/assets/itinerary-grenoble-otp-1.json +0 -1536
  65. package/assets/itinerary-grenoble-otp-2.json +0 -1092
  66. package/assets/itinerary-info-two-points-proj.osm +0 -39
  67. package/assets/itinerary-info-two-points.osm +0 -24
  68. package/assets/itinerary-lehavre-cityway-1.json +0 -6799
  69. package/assets/itinerary-lehavre-cityway-2.json +0 -2133
  70. package/assets/itinerary-lehavre-cityway-3.json +0 -12577
  71. package/assets/itinerary-lehavre-cityway-4.json +0 -1451
  72. package/assets/itinerary-lehavre-cityway-5.json +0 -5925
  73. package/assets/itinerary-lemans-navitia.json +0 -7768
  74. package/assets/itinerary-montpellier-osrm-3.json +0 -185
  75. package/assets/itinerary-montpellier-outdoor-without-steps.json +0 -110
  76. package/assets/itinerary-montpellier-outdoor.json +0 -513
  77. package/assets/itinerary-paris-idfm-2.json +0 -1838
  78. package/assets/itinerary-paris-idfm.json +0 -27727
  79. package/assets/itinerary-step-not-on-path-osrm.json +0 -457
  80. package/assets/itinerary-with-duplicate-nodes.json +0 -110
  81. package/assets/network-conveying-backward.osm +0 -74
  82. package/assets/network-elevator.osm +0 -48
  83. package/assets/network-escalators.osm +0 -50
  84. package/assets/network-simple.osm +0 -27
  85. package/assets/network-steps-same-level.osm +0 -283
  86. package/assets/network-with-modifiers.osm +0 -39
  87. package/assets/one-way.osm +0 -46
  88. package/assets/report-map-1.osm +0 -36
  89. package/assets/report-map-2.osm +0 -29
  90. package/assets/report-map-3.osm +0 -15
  91. package/assets/rr-wemap-multi-indoor-outdoor-indoor.json +0 -1352
  92. package/assets/rr-wemap-multi-indoor-outdoor.json +0 -145
  93. package/assets/rr-wemap-multi-multi-level.json +0 -262
  94. package/assets/rr-wemap-multi-outdoor-indoor.json +0 -145
  95. package/assets/rr-wemap-multi-outdoor-outdoor.json +0 -207
  96. package/assets/rr-wemap-multi-remote-indoor-indoor.json +0 -155
  97. package/assets/rr-wemap-multi-remote-indoor-outdoor-indoor.json +0 -668
  98. package/assets/rr-wemap-multi-remote-indoor-outdoor.json +0 -154
  99. package/assets/rr-wemap-multi-remote-outdoor-indoor.json +0 -179
  100. package/assets/rr-wemap-multi-remote-outdoor-outdoor.json +0 -109
  101. package/assets/stairs-and-exit.osm +0 -47
  102. package/helpers/InstructionManager.ts +0 -184
  103. package/helpers/InstructionManagerV1.ts +0 -95
  104. package/src/ItineraryInfoManager.spec.ts +0 -183
  105. package/src/ItineraryInfoManager.ts +0 -181
  106. package/src/RoutingError.ts +0 -60
  107. package/src/Utils.ts +0 -8
  108. package/src/graph/Edge.spec.ts +0 -32
  109. package/src/graph/Edge.ts +0 -64
  110. package/src/graph/Graph.spec.ts +0 -509
  111. package/src/graph/Graph.ts +0 -272
  112. package/src/graph/GraphProjection.ts +0 -15
  113. package/src/graph/GraphProjectionOptions.ts +0 -8
  114. package/src/graph/GraphRoute.spec.ts +0 -15
  115. package/src/graph/GraphRoute.ts +0 -43
  116. package/src/graph/GraphRouter.spec.ts +0 -317
  117. package/src/graph/GraphRouter.ts +0 -229
  118. package/src/graph/GraphRouterEngine.ts +0 -248
  119. package/src/graph/GraphRouterOptionsBuilder.ts +0 -98
  120. package/src/graph/NoRouteFoundError.ts +0 -39
  121. package/src/graph/Vertex.spec.ts +0 -42
  122. package/src/graph/Vertex.ts +0 -45
  123. package/src/model/Itinerary.spec.ts +0 -134
  124. package/src/model/Itinerary.ts +0 -370
  125. package/src/model/Leg.spec.ts +0 -107
  126. package/src/model/Leg.ts +0 -224
  127. package/src/model/LevelChange.spec.ts +0 -50
  128. package/src/model/LevelChange.ts +0 -14
  129. package/src/model/RouterRequest.ts +0 -33
  130. package/src/model/Step.spec.ts +0 -99
  131. package/src/model/Step.ts +0 -90
  132. package/src/model/StepExtra.ts +0 -1
  133. package/src/model/StepsBuilder.ts +0 -242
  134. package/src/model/TransitMode.spec.ts +0 -31
  135. package/src/model/TransitMode.ts +0 -28
  136. package/src/model/generateSteps.ts +0 -102
  137. package/src/remote/RemoteRouterManager.spec.ts +0 -178
  138. package/src/remote/RemoteRouterManager.ts +0 -72
  139. package/src/remote/RemoteRouterUtils.ts +0 -25
  140. package/src/remote/cityway/CitywayRemoteRouter.spec.ts +0 -122
  141. package/src/remote/cityway/CitywayRemoteRouter.ts +0 -435
  142. package/src/remote/deutsche-bahn/DeutscheBahnRemoteRouter.spec.ts +0 -52
  143. package/src/remote/deutsche-bahn/DeutscheBahnRemoteRouter.ts +0 -85
  144. package/src/remote/geovelo/GeoveloRemoteRouter.spec.ts +0 -54
  145. package/src/remote/geovelo/GeoveloRemoteRouter.ts +0 -293
  146. package/src/remote/idfm/IdfmRemoteRouter.spec.ts +0 -102
  147. package/src/remote/idfm/IdfmRemoteRouter.ts +0 -523
  148. package/src/remote/navitia/NavitiaRemoteRouter.spec.ts +0 -116
  149. package/src/remote/navitia/NavitiaRemoteRouter.ts +0 -445
  150. package/src/remote/navitia/types.ts +0 -73
  151. package/src/remote/osrm/OsrmRemoteRouter.spec.ts +0 -127
  152. package/src/remote/osrm/OsrmRemoteRouter.ts +0 -303
  153. package/src/remote/otp/OtpRemoteRouter.spec.ts +0 -103
  154. package/src/remote/otp/OtpRemoteRouter.ts +0 -223
  155. package/src/remote/wemap-multi/WemapMultiRemoteRouter.spec.ts +0 -103
  156. package/src/remote/wemap-multi/WemapMultiRemoteRouter.ts +0 -56
  157. package/src/types.ts +0 -32
  158. package/src/wemap-multi/CustomGraphMap.spec.ts +0 -40
  159. package/src/wemap-multi/CustomGraphMap.ts +0 -213
  160. package/src/wemap-multi/CustomGraphMapTester.spec.ts +0 -48
  161. package/src/wemap-multi/CustomGraphMapTester.ts +0 -90
  162. package/src/wemap-multi/WemapMultiRouter.spec.ts +0 -138
  163. package/src/wemap-multi/WemapMultiRouter.ts +0 -329
  164. package/src/wemap-osm/OsmGraphUtils.spec.ts +0 -165
  165. package/src/wemap-osm/OsmGraphUtils.ts +0 -173
  166. package/src/wemap-osm/OsmRouter.elevators.spec.ts +0 -106
  167. package/src/wemap-osm/OsmRouter.spec.ts +0 -292
  168. package/tests/CommonTest.ts +0 -78
  169. package/tsconfig.json +0 -3
  170. package/vite.config.ts +0 -4
@@ -1,207 +0,0 @@
1
- {
2
- "code": "Ok",
3
- "routes": [
4
- {
5
- "geometry": {
6
- "coordinates": [
7
- [
8
- 2.343447,
9
- 48.872645
10
- ],
11
- [
12
- 2.343243,
13
- 48.872674
14
- ],
15
- [
16
- 2.343126,
17
- 48.87269
18
- ],
19
- [
20
- 2.343135,
21
- 48.872638
22
- ]
23
- ],
24
- "type": "LineString"
25
- },
26
- "legs": [
27
- {
28
- "steps": [
29
- {
30
- "intersections": [
31
- {
32
- "out": 0,
33
- "entry": [
34
- true
35
- ],
36
- "bearings": [
37
- 282
38
- ],
39
- "location": [
40
- 2.343447,
41
- 48.872645
42
- ]
43
- }
44
- ],
45
- "driving_side": "right",
46
- "geometry": {
47
- "coordinates": [
48
- [
49
- 2.343447,
50
- 48.872645
51
- ],
52
- [
53
- 2.343243,
54
- 48.872674
55
- ],
56
- [
57
- 2.343126,
58
- 48.87269
59
- ]
60
- ],
61
- "type": "LineString"
62
- },
63
- "mode": "walking",
64
- "duration": 19.2,
65
- "maneuver": {
66
- "bearing_after": 282,
67
- "location": [
68
- 2.343447,
69
- 48.872645
70
- ],
71
- "bearing_before": 0,
72
- "type": "depart"
73
- },
74
- "weight": 19.2,
75
- "distance": 24,
76
- "name": "Rue Bergère"
77
- },
78
- {
79
- "intersections": [
80
- {
81
- "out": 2,
82
- "location": [
83
- 2.343126,
84
- 48.87269
85
- ],
86
- "bearings": [
87
- 0,
88
- 105,
89
- 180
90
- ],
91
- "entry": [
92
- true,
93
- false,
94
- true
95
- ],
96
- "in": 1
97
- }
98
- ],
99
- "driving_side": "right",
100
- "geometry": {
101
- "coordinates": [
102
- [
103
- 2.343126,
104
- 48.87269
105
- ],
106
- [
107
- 2.343135,
108
- 48.872638
109
- ]
110
- ],
111
- "type": "LineString"
112
- },
113
- "mode": "walking",
114
- "duration": 4.3,
115
- "maneuver": {
116
- "bearing_after": 174,
117
- "type": "turn",
118
- "modifier": "left",
119
- "bearing_before": 281,
120
- "location": [
121
- 2.343126,
122
- 48.87269
123
- ]
124
- },
125
- "weight": 4.3,
126
- "distance": 5.8,
127
- "name": "Rue du Faubourg Montmartre"
128
- },
129
- {
130
- "intersections": [
131
- {
132
- "in": 0,
133
- "entry": [
134
- true
135
- ],
136
- "bearings": [
137
- 354
138
- ],
139
- "location": [
140
- 2.343135,
141
- 48.872638
142
- ]
143
- }
144
- ],
145
- "driving_side": "right",
146
- "geometry": {
147
- "coordinates": [
148
- [
149
- 2.343135,
150
- 48.872638
151
- ],
152
- [
153
- 2.343135,
154
- 48.872638
155
- ]
156
- ],
157
- "type": "LineString"
158
- },
159
- "mode": "walking",
160
- "duration": 0,
161
- "maneuver": {
162
- "bearing_after": 0,
163
- "location": [
164
- 2.343135,
165
- 48.872638
166
- ],
167
- "bearing_before": 174,
168
- "type": "arrive"
169
- },
170
- "weight": 0,
171
- "distance": 0,
172
- "name": "Rue du Faubourg Montmartre"
173
- }
174
- ],
175
- "distance": 29.8,
176
- "duration": 23.5,
177
- "summary": "Rue Bergère, Rue du Faubourg Montmartre",
178
- "weight": 23.5
179
- }
180
- ],
181
- "distance": 29.8,
182
- "duration": 23.5,
183
- "weight_name": "duration",
184
- "weight": 23.5
185
- }
186
- ],
187
- "waypoints": [
188
- {
189
- "hint": "PPC2gd_8MoBtAAAA-AIAAD8AAACeAgAAOu90Qb1a00KRPgxBXp-6Qm0AAAD4AgAAPwAAAJ4CAAADAAAAF8IjAMW86QIZwiMAy7zpAgEAbwZ4CuwT",
190
- "distance": 0.683183,
191
- "name": "Rue Bergère",
192
- "location": [
193
- 2.343447,
194
- 48.872645
195
- ]
196
- },
197
- {
198
- "hint": "K_C2gTvwtoEQAAAAKwAAAJMDAAAAAAAA7h8WQEJAukATFP5CAAAAABAAAAArAAAAkwMAAAAAAAADAAAA38AjAL686QL-wCMAwLzpAgUAHxZ4CuwT",
199
- "distance": 2.28492,
200
- "name": "Rue du Faubourg Montmartre",
201
- "location": [
202
- 2.343135,
203
- 48.872638
204
- ]
205
- }
206
- ]
207
- }
@@ -1,155 +0,0 @@
1
- {
2
- "routerName": [
3
- "wemap-meta",
4
- "wemap"
5
- ],
6
- "origin": {
7
- "lat": 48.8725992,
8
- "lng": 2.343431
9
- },
10
- "destination": {
11
- "lat": 48.8725694,
12
- "lng": 2.3433
13
- },
14
- "itineraries": [
15
- {
16
- "origin": {
17
- "lat": 48.8725992,
18
- "lng": 2.343431
19
- },
20
- "destination": {
21
- "lat": 48.8725694,
22
- "lng": 2.3433
23
- },
24
- "distance": 13.06248469300833,
25
- "duration": 9.404988978965996,
26
- "transitMode": "WALK",
27
- "legs": [
28
- {
29
- "transitMode": "WALK",
30
- "start": {
31
- "coords": [
32
- 48.8725992,
33
- 2.343431
34
- ]
35
- },
36
- "end": {
37
- "coords": [
38
- 48.8725694,
39
- 2.3433
40
- ]
41
- },
42
- "distance": 13.06248469300833,
43
- "duration": 9.404988978965996,
44
- "coords": [
45
- [
46
- 48.87258947110776,
47
- 2.3434277129983445
48
- ],
49
- [
50
- 48.87259587423,
51
- 2.34338390486
52
- ],
53
- [
54
- 48.87258124098,
55
- 2.34333589031
56
- ],
57
- [
58
- 48.87256546238,
59
- 2.3433422765
60
- ],
61
- [
62
- 48.87256316665,
63
- 2.3432954559
64
- ],
65
- [
66
- 48.87256893059131,
67
- 2.3432943496755994
68
- ]
69
- ],
70
- "steps": [
71
- {
72
- "number": 1,
73
- "coords": [
74
- 48.87258947110776,
75
- 2.3434277129983445
76
- ],
77
- "angle": 1.5707971647295182,
78
- "previousBearing": -2.922923490486779,
79
- "nextBearing": -1.3521280016265034,
80
- "distance": 3.2858236212074967,
81
- "_idCoordsInLeg": 0,
82
- "firstStep": true,
83
- "duration": 2.3657930072693976
84
- },
85
- {
86
- "number": 2,
87
- "coords": [
88
- 48.87259587423,
89
- 2.34338390486
90
- ],
91
- "angle": -2.4890180243615894,
92
- "previousBearing": -1.3521280016265034,
93
- "nextBearing": -2.004702630854707,
94
- "distance": 3.8746286577192963,
95
- "_idCoordsInLeg": 1,
96
- "duration": 2.789732633557893
97
- },
98
- {
99
- "number": 3,
100
- "coords": [
101
- 48.87258124098,
102
- 2.34333589031
103
- ],
104
- "angle": -1.744526282752689,
105
- "previousBearing": -2.004702630854707,
106
- "nextBearing": 2.8814163054877757,
107
- "distance": 1.8176390154053135,
108
- "_idCoordsInLeg": 2,
109
- "duration": 1.3087000910918256
110
- },
111
- {
112
- "number": 4,
113
- "coords": [
114
- 48.87256546238,
115
- 2.3433422765
116
- ],
117
- "angle": 1.3850293864767702,
118
- "previousBearing": 2.8814163054877757,
119
- "nextBearing": -1.6452057345787876,
120
- "distance": 3.43766235177327,
121
- "_idCoordsInLeg": 3,
122
- "duration": 2.4751168932767538
123
- },
124
- {
125
- "number": 5,
126
- "coords": [
127
- 48.87256316665,
128
- 2.3432954559
129
- ],
130
- "angle": 1.6219564343030943,
131
- "previousBearing": -1.6452057345787876,
132
- "nextBearing": -0.12556951529208848,
133
- "distance": 0.6467310469029534,
134
- "_idCoordsInLeg": 4,
135
- "duration": 0.46564635377012564
136
- },
137
- {
138
- "number": 6,
139
- "coords": [
140
- 48.87256893059131,
141
- 2.3432943496755994
142
- ],
143
- "angle": 1.5708681716355168,
144
- "previousBearing": -0.12556951529208848,
145
- "nextBearing": 1.445154966662188,
146
- "distance": 0.41699712165318115,
147
- "_idCoordsInLeg": 5,
148
- "lastStep": true
149
- }
150
- ]
151
- }
152
- ]
153
- }
154
- ]
155
- }