minotor 11.2.2 → 11.3.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 (79) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/README.md +28 -0
  3. package/dist/cli.mjs +378 -127
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/gtfs/parser.d.ts +3 -1
  6. package/dist/gtfs/routes.d.ts +1 -2
  7. package/dist/gtfs/trips.d.ts +2 -1
  8. package/dist/parser.cjs.js +225 -81
  9. package/dist/parser.cjs.js.map +1 -1
  10. package/dist/parser.d.ts +6 -2
  11. package/dist/parser.esm.js +224 -82
  12. package/dist/parser.esm.js.map +1 -1
  13. package/dist/router.cjs.js +1 -1
  14. package/dist/router.cjs.js.map +1 -1
  15. package/dist/router.d.ts +5 -3
  16. package/dist/router.esm.js +1 -1
  17. package/dist/router.esm.js.map +1 -1
  18. package/dist/router.umd.js +1 -1
  19. package/dist/router.umd.js.map +1 -1
  20. package/dist/routing/query.d.ts +20 -0
  21. package/dist/routing/rangeState.d.ts +1 -0
  22. package/dist/routing/raptor.d.ts +2 -0
  23. package/dist/routing/result.d.ts +1 -4
  24. package/dist/routing/route.d.ts +9 -5
  25. package/dist/routing/state.d.ts +11 -1
  26. package/dist/timetable/route.d.ts +9 -5
  27. package/dist/timetable/timetable.d.ts +24 -2
  28. package/dist/transfers/__tests__/straightLineTransferGenerator.test.d.ts +1 -0
  29. package/dist/transfers/generator.d.ts +40 -0
  30. package/dist/transfers/straightLineTransferGenerator.d.ts +58 -0
  31. package/dist/utils/map.d.ts +10 -0
  32. package/package.json +1 -1
  33. package/src/__e2e__/router.test.ts +6 -2
  34. package/src/cli/minotor.ts +21 -1
  35. package/src/cli/perf.ts +4 -2
  36. package/src/cli/repl.ts +55 -35
  37. package/src/gtfs/__tests__/parser.test.ts +29 -1
  38. package/src/gtfs/__tests__/routes.test.ts +4 -3
  39. package/src/gtfs/__tests__/transfers.test.ts +8 -8
  40. package/src/gtfs/__tests__/trips.test.ts +60 -24
  41. package/src/gtfs/parser.ts +50 -1
  42. package/src/gtfs/profiles/__tests__/extended.test.ts +2 -1
  43. package/src/gtfs/profiles/extended.ts +14 -14
  44. package/src/gtfs/profiles/standard.ts +11 -10
  45. package/src/gtfs/routes.ts +5 -2
  46. package/src/gtfs/transfers.ts +6 -5
  47. package/src/gtfs/trips.ts +7 -14
  48. package/src/parser.ts +20 -2
  49. package/src/router.ts +15 -6
  50. package/src/routing/__tests__/access.test.ts +14 -6
  51. package/src/routing/__tests__/plainRouter.test.ts +47 -23
  52. package/src/routing/__tests__/plotter.test.ts +8 -3
  53. package/src/routing/__tests__/rangeResult.test.ts +6 -2
  54. package/src/routing/__tests__/rangeRouter.test.ts +32 -6
  55. package/src/routing/__tests__/raptor.test.ts +157 -9
  56. package/src/routing/__tests__/result.test.ts +9 -4
  57. package/src/routing/__tests__/route.test.ts +3 -4
  58. package/src/routing/__tests__/router.test.ts +2 -1
  59. package/src/routing/access.ts +7 -4
  60. package/src/routing/plainRouter.ts +1 -0
  61. package/src/routing/plotter.ts +8 -3
  62. package/src/routing/query.ts +18 -0
  63. package/src/routing/rangeRouter.ts +2 -0
  64. package/src/routing/rangeState.ts +4 -0
  65. package/src/routing/raptor.ts +19 -9
  66. package/src/routing/result.ts +32 -14
  67. package/src/routing/route.ts +13 -10
  68. package/src/routing/state.ts +30 -0
  69. package/src/timetable/__tests__/io.test.ts +22 -10
  70. package/src/timetable/__tests__/route.test.ts +18 -24
  71. package/src/timetable/__tests__/timetable.test.ts +17 -11
  72. package/src/timetable/io.ts +30 -28
  73. package/src/timetable/route.ts +14 -7
  74. package/src/timetable/timetable.ts +77 -31
  75. package/src/transfers/README.md +97 -0
  76. package/src/transfers/__tests__/straightLineTransferGenerator.test.ts +204 -0
  77. package/src/transfers/generator.ts +45 -0
  78. package/src/transfers/straightLineTransferGenerator.ts +143 -0
  79. package/src/utils/map.ts +22 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- ## [11.2.2](https://github.com/aubryio/minotor/compare/v11.2.1...v11.2.2) (2026-04-27)
1
+ # [11.3.0](https://github.com/aubryio/minotor/compare/v11.2.3...v11.3.0) (2026-07-21)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * prevent higher-round rRAPTOR labels from overwriting equal or better aggregate arrivals ([#69](https://github.com/aubryio/minotor/issues/69)) ([a35c4e2](https://github.com/aubryio/minotor/commit/a35c4e23caab026972fbab78e54c0de2a905feda))
6
+ * support for virtual transfers ([#73](https://github.com/aubryio/minotor/issues/73)) ([295ff24](https://github.com/aubryio/minotor/commit/295ff248c935e0fb7bdeddad802cbffb1142b0cb))
package/README.md CHANGED
@@ -34,6 +34,7 @@ A more complete isochrone map showcase can be found on [isochrone.ch](https://is
34
34
  ## Features
35
35
 
36
36
  - GTFS feed parsing (standard and extended)
37
+ - Virtual transfer generation — add missing walking transfers between nearby stops
37
38
  - Geographic and textual stop search
38
39
  - **Point queries** — earliest-arrival journey from an origin to a destination at a given time
39
40
  - **Range queries** — all Pareto-optimal journeys within a departure-time window
@@ -65,6 +66,28 @@ const stopsIndex = await parser.parseStops();
65
66
 
66
67
  Times are represented at the minute level (16-bit integers). Parsing can take a few minutes for large feeds.
67
68
 
69
+ #### Virtual transfers
70
+
71
+ Many GTFS feeds only partially populate `transfers.txt`, so nearby stops in different stations end up with no walking connection and can't be used as an interchange. Pass a `TransferGenerator` to the parser to synthesize the missing walking transfers before the timetable is serialized. The built-in `StraightLineTransferGenerator` connects nearby stops that aren't already linked, estimating walking time from the straight-line distance:
72
+
73
+ ```ts
74
+ import {
75
+ GtfsParser,
76
+ StraightLineTransferGenerator,
77
+ extendedGtfsProfile,
78
+ } from 'minotor/parser';
79
+
80
+ const parser = new GtfsParser(
81
+ 'gtfs-feed.zip',
82
+ extendedGtfsProfile,
83
+ new StraightLineTransferGenerator({ maxDistanceMeters: 500 }),
84
+ );
85
+
86
+ const timetable = await parser.parseTimetable(new Date());
87
+ ```
88
+
89
+ See [`src/transfers/README.md`](src/transfers/README.md) for the tuning options and how to plug in a custom generator (e.g. an external pedestrian routing engine).
90
+
68
91
  #### Stop search (browser or Node.js)
69
92
 
70
93
  ```ts
@@ -111,6 +134,7 @@ Query options:
111
134
  | ----------------------- | --------- | ---------------------------------------------------------------------- |
112
135
  | `maxTransfers` | `5` | Maximum number of transfers |
113
136
  | `minTransferTime` | `2 min` | Fallback minimum transfer time |
137
+ | `maxDuration` | unlimited | Maximum total journey duration from the query departure time |
114
138
  | `maxInitialWaitingTime` | unlimited | Maximum wait for the first vehicle after arriving at the boarding stop |
115
139
  | `transportModes` | all | Restrict to a subset of GTFS route types |
116
140
 
@@ -155,6 +179,10 @@ Parse GTFS data for today and save the timetable and stops index to `/tmp`:
155
179
 
156
180
  `minotor parse-gtfs gtfs_feed.zip`
157
181
 
182
+ Additionally generate virtual walking transfers between stops within 1 km:
183
+
184
+ `minotor parse-gtfs gtfs_feed.zip --virtual-transfers-radius 1000`
185
+
158
186
  Start the interactive REPL:
159
187
 
160
188
  `minotor repl`