corequery-gtfs 0.10.4 → 0.12.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.
- package/dist/conversion/service-converter.d.ts +7 -3
- package/dist/conversion/service-converter.js +60 -98
- package/dist/conversion/service-converter.js.map +1 -1
- package/dist/data/gtfs-feed.d.ts +3 -4
- package/dist/data/gtfs-feed.js.map +1 -1
- package/dist/data/gtfs-realtime-data.d.ts +6 -7
- package/dist/data/gtfs-realtime-data.js +7 -11
- package/dist/data/gtfs-realtime-data.js.map +1 -1
- package/dist/data/gtfs-schedule-data.d.ts +1 -1
- package/dist/data/trip/added/gtfs-added-trip-originating-movement.d.ts +24 -0
- package/dist/data/trip/added/gtfs-added-trip-originating-movement.js +40 -0
- package/dist/data/trip/added/gtfs-added-trip-originating-movement.js.map +1 -0
- package/dist/data/trip/added/gtfs-added-trip-passing-movement.d.ts +14 -0
- package/dist/data/trip/added/gtfs-added-trip-passing-movement.js +24 -0
- package/dist/data/trip/added/gtfs-added-trip-passing-movement.js.map +1 -0
- package/dist/data/trip/added/gtfs-added-trip-regular-movement.d.ts +30 -0
- package/dist/data/trip/added/gtfs-added-trip-regular-movement.js +51 -0
- package/dist/data/trip/added/gtfs-added-trip-regular-movement.js.map +1 -0
- package/dist/data/trip/added/gtfs-added-trip-terminating-movement.d.ts +24 -0
- package/dist/data/trip/added/gtfs-added-trip-terminating-movement.js +40 -0
- package/dist/data/trip/added/gtfs-added-trip-terminating-movement.js.map +1 -0
- package/dist/data/trip/added/gtfs-added-trip.d.ts +26 -0
- package/dist/data/trip/added/gtfs-added-trip.js +52 -0
- package/dist/data/trip/added/gtfs-added-trip.js.map +1 -0
- package/dist/data/trip/added/types.d.ts +20 -0
- package/dist/data/trip/added/types.js +2 -0
- package/dist/data/trip/added/types.js.map +1 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-originating-movement.d.ts +24 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-originating-movement.js +40 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-originating-movement.js.map +1 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-passing-movement.d.ts +14 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-passing-movement.js +24 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-passing-movement.js.map +1 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-regular-movement.d.ts +30 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-regular-movement.js +51 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-regular-movement.js.map +1 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-terminating-movement.d.ts +24 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-terminating-movement.js +40 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip-terminating-movement.js.map +1 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip.d.ts +28 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip.js +70 -0
- package/dist/data/trip/replaced/gtfs-replaced-trip.js.map +1 -0
- package/dist/data/trip/replaced/types.d.ts +20 -0
- package/dist/data/trip/replaced/types.js +2 -0
- package/dist/data/trip/replaced/types.js.map +1 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-originating-movement.d.ts +29 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-originating-movement.js +74 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-originating-movement.js.map +1 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-passing-movement.d.ts +17 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-passing-movement.js +35 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-passing-movement.js.map +1 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-regular-movement.d.ts +35 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-regular-movement.js +98 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-regular-movement.js.map +1 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-terminating-movement.d.ts +29 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-terminating-movement.js +74 -0
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-terminating-movement.js.map +1 -0
- package/dist/data/{gtfs-scheduled-trip.d.ts → trip/scheduled/gtfs-scheduled-trip.d.ts} +6 -4
- package/dist/data/{gtfs-scheduled-trip.js → trip/scheduled/gtfs-scheduled-trip.js} +3 -2
- package/dist/data/trip/scheduled/gtfs-scheduled-trip.js.map +1 -0
- package/dist/data/trip/scheduled/types.d.ts +33 -0
- package/dist/data/trip/scheduled/types.js +2 -0
- package/dist/data/trip/scheduled/types.js.map +1 -0
- package/dist/data/trip/types.d.ts +14 -0
- package/dist/data/trip/types.js +2 -0
- package/dist/data/trip/types.js.map +1 -0
- package/dist/data/trip/updated/gtfs-updated-trip-originating-movement.d.ts +36 -0
- package/dist/data/trip/updated/gtfs-updated-trip-originating-movement.js +82 -0
- package/dist/data/trip/updated/gtfs-updated-trip-originating-movement.js.map +1 -0
- package/dist/data/trip/updated/gtfs-updated-trip-passing-movement.d.ts +15 -0
- package/dist/data/trip/updated/gtfs-updated-trip-passing-movement.js +27 -0
- package/dist/data/trip/updated/gtfs-updated-trip-passing-movement.js.map +1 -0
- package/dist/data/trip/updated/gtfs-updated-trip-regular-movement.d.ts +48 -0
- package/dist/data/trip/updated/gtfs-updated-trip-regular-movement.js +129 -0
- package/dist/data/trip/updated/gtfs-updated-trip-regular-movement.js.map +1 -0
- package/dist/data/trip/updated/gtfs-updated-trip-terminating-movement.d.ts +36 -0
- package/dist/data/trip/updated/gtfs-updated-trip-terminating-movement.js +82 -0
- package/dist/data/trip/updated/gtfs-updated-trip-terminating-movement.js.map +1 -0
- package/dist/data/{gtfs-updated-trip.d.ts → trip/updated/gtfs-updated-trip.d.ts} +5 -3
- package/dist/data/{gtfs-updated-trip.js → trip/updated/gtfs-updated-trip.js} +0 -18
- package/dist/data/trip/updated/gtfs-updated-trip.js.map +1 -0
- package/dist/data/trip/updated/types.d.ts +24 -0
- package/dist/data/trip/updated/types.js +2 -0
- package/dist/data/trip/updated/types.js.map +1 -0
- package/dist/departures/gtfs-scheduled-movements-index.d.ts +2 -2
- package/dist/departures/iterator/departures-iterator.d.ts +3 -5
- package/dist/departures/iterator/departures-iterator.js.map +1 -1
- package/dist/departures/iterator/scheduled-departures-block-iterator.js +2 -2
- package/dist/departures/iterator/scheduled-departures-block-iterator.js.map +1 -1
- package/dist/departures/realtime-departures-block.d.ts +3 -4
- package/dist/departures/realtime-departures-block.js.map +1 -1
- package/dist/gtfs-service-source.js +12 -2
- package/dist/gtfs-service-source.js.map +1 -1
- package/dist/parser/gtfs-feed-parser.js +3 -0
- package/dist/parser/gtfs-feed-parser.js.map +1 -1
- package/dist/parser/gtfs-route-matcher.d.ts +31 -0
- package/dist/parser/gtfs-route-matcher.js +114 -0
- package/dist/parser/gtfs-route-matcher.js.map +1 -0
- package/dist/parser/realtime/gtfs-added-trip-update-parser.d.ts +49 -0
- package/dist/parser/realtime/gtfs-added-trip-update-parser.js +207 -0
- package/dist/parser/realtime/gtfs-added-trip-update-parser.js.map +1 -0
- package/dist/parser/realtime/gtfs-cancelled-trip-update-parser.d.ts +16 -0
- package/dist/parser/realtime/gtfs-cancelled-trip-update-parser.js +24 -0
- package/dist/parser/realtime/gtfs-cancelled-trip-update-parser.js.map +1 -0
- package/dist/parser/realtime/gtfs-realtime-data-parser.d.ts +6 -0
- package/dist/parser/realtime/gtfs-realtime-data-parser.js +16 -12
- package/dist/parser/realtime/gtfs-realtime-data-parser.js.map +1 -1
- package/dist/parser/realtime/{gtfs-trip-update-trip-identifier.d.ts → gtfs-scheduled-trip-identifier.d.ts} +6 -6
- package/dist/parser/realtime/{gtfs-trip-update-trip-identifier.js → gtfs-scheduled-trip-identifier.js} +2 -2
- package/dist/parser/realtime/gtfs-scheduled-trip-identifier.js.map +1 -0
- package/dist/parser/realtime/gtfs-trip-movements-interpolator.d.ts +7 -0
- package/dist/parser/realtime/gtfs-trip-movements-interpolator.js +183 -0
- package/dist/parser/realtime/gtfs-trip-movements-interpolator.js.map +1 -0
- package/dist/parser/realtime/gtfs-trip-update-parser-common-error-types.d.ts +25 -0
- package/dist/parser/realtime/gtfs-trip-update-parser-common-error-types.js +37 -0
- package/dist/parser/realtime/gtfs-trip-update-parser-common-error-types.js.map +1 -0
- package/dist/parser/realtime/gtfs-trip-update-parser.d.ts +15 -81
- package/dist/parser/realtime/gtfs-trip-update-parser.js +30 -272
- package/dist/parser/realtime/gtfs-trip-update-parser.js.map +1 -1
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.d.ts +76 -0
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.js +264 -0
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.js.map +1 -0
- package/dist/parser/schedule/gtfs-transfer-parser.d.ts +1 -1
- package/dist/parser/schedule/gtfs-transfer-parser.js +1 -1
- package/dist/parser/schedule/gtfs-transfer-parser.js.map +1 -1
- package/dist/parser/schedule/gtfs-trip-parser.d.ts +24 -8
- package/dist/parser/schedule/gtfs-trip-parser.js +120 -51
- package/dist/parser/schedule/gtfs-trip-parser.js.map +1 -1
- package/package.json +1 -1
- package/dist/data/gtfs-scheduled-trip-movements.d.ts +0 -118
- package/dist/data/gtfs-scheduled-trip-movements.js +0 -233
- package/dist/data/gtfs-scheduled-trip-movements.js.map +0 -1
- package/dist/data/gtfs-scheduled-trip.js.map +0 -1
- package/dist/data/gtfs-updated-trip-movements.d.ts +0 -124
- package/dist/data/gtfs-updated-trip-movements.js +0 -150
- package/dist/data/gtfs-updated-trip-movements.js.map +0 -1
- package/dist/data/gtfs-updated-trip.js.map +0 -1
- package/dist/data/utils.d.ts +0 -3
- package/dist/data/utils.js +0 -2
- package/dist/data/utils.js.map +0 -1
- package/dist/parser/realtime/gtfs-trip-update-trip-identifier.js.map +0 -1
- package/dist/parser/schedule/gtfs-route-matcher.d.ts +0 -53
- package/dist/parser/schedule/gtfs-route-matcher.js +0 -197
- package/dist/parser/schedule/gtfs-route-matcher.js.map +0 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { itsOk, map } from "@dan-schel/js-utils";
|
|
2
|
+
// We interpolate/extrapolate realtime times in cases where only one (or a few)
|
|
3
|
+
// movements have stop time updates in the GTFS-R feed.
|
|
4
|
+
//
|
|
5
|
+
// If all we know is "the train was 2 mins late at Bunyip", we assume it was 2
|
|
6
|
+
// mins late leaving Traralgon, and will be 2 mins late arriving at Southern
|
|
7
|
+
// Cross too.
|
|
8
|
+
//
|
|
9
|
+
// If we know a few stop time updates, we expolate to the edges, and interpolate
|
|
10
|
+
// between the known values, e.g.:
|
|
11
|
+
//
|
|
12
|
+
// - East Pakenham 7 mins late <-- extrapolated
|
|
13
|
+
// - Pakenham 7 mins late <-- extrapolated
|
|
14
|
+
// - Cardinia Road 7 mins late <-------------------- known
|
|
15
|
+
// - Officer 6 mins late <-- interpolated
|
|
16
|
+
// - Beaconsfield 5 mins late <-- interpolated
|
|
17
|
+
// - Berwick 4 mins late <-- interpolated
|
|
18
|
+
// - Narre Warren 3 mins late <-------------------- known
|
|
19
|
+
// - Hallam 3 mins late <-- extrapolated
|
|
20
|
+
// - Dandenong 3 mins late <-- extrapolated
|
|
21
|
+
//
|
|
22
|
+
// Interpolated times are stored in the `assumedRealtime...` times, rather than
|
|
23
|
+
// `knownRealtime...` times to distinguish them.
|
|
24
|
+
export class GtfsTripMovementsInterpolator {
|
|
25
|
+
interpolate(movements) {
|
|
26
|
+
const servicingMovements = movements.filter((m) => m.isServicing);
|
|
27
|
+
const delayValues = servicingMovements.map((x) => x.knownRealtimeDelay);
|
|
28
|
+
if (delayValues.every((x) => x == null))
|
|
29
|
+
return movements;
|
|
30
|
+
const allDelayValues = this._interpolateDelayValues(delayValues);
|
|
31
|
+
const proposedMovements = movements.map((m) => {
|
|
32
|
+
if (!m.isServicing)
|
|
33
|
+
return m;
|
|
34
|
+
const index = servicingMovements.indexOf(m);
|
|
35
|
+
const departureDelay = allDelayValues[index];
|
|
36
|
+
if (departureDelay == null)
|
|
37
|
+
throw new Error();
|
|
38
|
+
const zeroDuration = Temporal.Duration.from({ nanoseconds: 0 });
|
|
39
|
+
const arrivalDelay = allDelayValues[index - 1] ?? zeroDuration;
|
|
40
|
+
return this._applyDelays(m, arrivalDelay, departureDelay);
|
|
41
|
+
});
|
|
42
|
+
return this._eliminateTimeTravel(proposedMovements);
|
|
43
|
+
}
|
|
44
|
+
_interpolateDelayValues(delayValues) {
|
|
45
|
+
return delayValues.map((knownDelay, i) => {
|
|
46
|
+
if (knownDelay != null)
|
|
47
|
+
return knownDelay;
|
|
48
|
+
const iPrev = delayValues.findLastIndex((x, idx) => idx < i && x != null);
|
|
49
|
+
const iNext = delayValues.findIndex((x, idx) => idx > i && x != null);
|
|
50
|
+
const prev = delayValues[iPrev] ?? null;
|
|
51
|
+
const next = delayValues[iNext] ?? null;
|
|
52
|
+
if (prev != null && next != null) {
|
|
53
|
+
// Even at the nanosecond level, avoiding Math.round is impossible,
|
|
54
|
+
// since Temporal.Duration requires integer nanoseconds, but
|
|
55
|
+
// interpolation can always produce fractional nanoseconds (just like
|
|
56
|
+
// how dividing by 3 = 0.333333333...).
|
|
57
|
+
//
|
|
58
|
+
// I suspect rounding to the nearest nanosecond is probably precise
|
|
59
|
+
// enough for public transport services, but who can truly say?
|
|
60
|
+
// (CoreQuery will probably floor to the nearest minute for display
|
|
61
|
+
// purposes anyway).
|
|
62
|
+
return Temporal.Duration.from({
|
|
63
|
+
nanoseconds: Math.round(map(i, iPrev, iNext, prev.total("nanoseconds"), next.total("nanoseconds"))),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else if (prev != null) {
|
|
67
|
+
return prev;
|
|
68
|
+
}
|
|
69
|
+
else if (next != null) {
|
|
70
|
+
return next;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
// Would only happen if all `delayValues` are null, but we check that in
|
|
74
|
+
// `interpolate`.
|
|
75
|
+
throw new Error();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
_applyDelays(movement, arrivalDelay, departureDelay) {
|
|
80
|
+
let result = movement;
|
|
81
|
+
if ("assumedRealtimeArrivalTime" in movement &&
|
|
82
|
+
movement.knownRealtimeArrivalTime == null) {
|
|
83
|
+
result = result.with({
|
|
84
|
+
assumedRealtimeArrivalTime: movement.scheduledArrivalTime.add(arrivalDelay),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if ("assumedRealtimeDepartureTime" in movement &&
|
|
88
|
+
movement.knownRealtimeDepartureTime == null) {
|
|
89
|
+
result = result.with({
|
|
90
|
+
assumedRealtimeDepartureTime: movement.scheduledDepartureTime.add(departureDelay),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
_eliminateTimeTravel(movements) {
|
|
96
|
+
const result = [...movements];
|
|
97
|
+
// Step 1: Shift prior departure times to be earlier if they are after a
|
|
98
|
+
// subsequent departure time. Loop in reverse order to avoid cascading
|
|
99
|
+
// issues.
|
|
100
|
+
for (let i = result.length - 2; i >= 0; i--) {
|
|
101
|
+
const me = itsOk(result[i]);
|
|
102
|
+
if (!me.isServicing)
|
|
103
|
+
continue;
|
|
104
|
+
// We start from the second-last movement. A movement is terminating if
|
|
105
|
+
// and only if it is the last movement, so this should never happen.
|
|
106
|
+
if (me.type === "terminating")
|
|
107
|
+
throw new Error();
|
|
108
|
+
const next = result.find((m, j) => j > i && m.isServicing);
|
|
109
|
+
// And because the last movement will be a terminating movement, there
|
|
110
|
+
// should always be some next servicing movement.
|
|
111
|
+
if (next == null)
|
|
112
|
+
throw new Error();
|
|
113
|
+
// Same as `timeRelevantToDeparturesAlgorithm`, but semantically not quite
|
|
114
|
+
// the same thing. The departures algorithm _happens_ to prefer departure
|
|
115
|
+
// times except for terminating movements, which is exactly what we're
|
|
116
|
+
// after, but I think it's good to be explicit about it here.
|
|
117
|
+
const nextDepartureTime = "effectiveDepartureTime" in next
|
|
118
|
+
? next.effectiveDepartureTime
|
|
119
|
+
: next.effectiveArrivalTime;
|
|
120
|
+
const myDepartureTime = me.effectiveDepartureTime;
|
|
121
|
+
if (Temporal.Instant.compare(myDepartureTime, nextDepartureTime) > 0) {
|
|
122
|
+
// GtfsTripMovementsInterpolator makes no attempt to repair time travel
|
|
123
|
+
// issues caused by `knownRealtimeDepartureTime` values. Those have come
|
|
124
|
+
// from the GTFS-RT feed! If it happens, we'll throw out the trip update
|
|
125
|
+
// and report a parsing error.
|
|
126
|
+
if (me.knownRealtimeDepartureTime != null)
|
|
127
|
+
return null;
|
|
128
|
+
result[i] = me.with({
|
|
129
|
+
assumedRealtimeDepartureTime: nextDepartureTime,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// Step 2: Now that departures are in time order, adjust arrival times to
|
|
134
|
+
// ensure they're always between the neighbouring departure times.
|
|
135
|
+
for (let i = 1; i < result.length; i++) {
|
|
136
|
+
const me = itsOk(result[i]);
|
|
137
|
+
// There's no arrival time to adjust in terminating movements, and the
|
|
138
|
+
// above loop effectively uses the terminating movement's arrival time
|
|
139
|
+
// as the anchor of the entire algorithm, so it "can't be wrong".
|
|
140
|
+
if (!me.isServicing || me.type === "terminating")
|
|
141
|
+
continue;
|
|
142
|
+
// We start from the second movement. A movement is originating if and
|
|
143
|
+
// only if it is the first movement, so this should never happen.
|
|
144
|
+
if (me.type === "originating")
|
|
145
|
+
throw new Error();
|
|
146
|
+
const prev = result.find((m, j) => j < i && m.isServicing);
|
|
147
|
+
// And because the first movement will be an originating movement, there
|
|
148
|
+
// should always be some previous servicing movement.
|
|
149
|
+
if (prev == null || prev.type === "terminating")
|
|
150
|
+
throw new Error();
|
|
151
|
+
const prevDepartureTime = prev.effectiveDepartureTime;
|
|
152
|
+
const myDepartureTime = me.effectiveDepartureTime;
|
|
153
|
+
const myArrivalTime = me.effectiveArrivalTime;
|
|
154
|
+
if (Temporal.Instant.compare(myArrivalTime, myDepartureTime) > 0) {
|
|
155
|
+
// As above, we don't repair time travel if it comes from the feed.
|
|
156
|
+
if (me.knownRealtimeArrivalTime != null)
|
|
157
|
+
return null;
|
|
158
|
+
result[i] = me.with({
|
|
159
|
+
assumedRealtimeArrivalTime: myDepartureTime,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
if (Temporal.Instant.compare(myArrivalTime, prevDepartureTime) < 0) {
|
|
163
|
+
// As above, we don't repair time travel if it comes from the feed.
|
|
164
|
+
if (me.knownRealtimeArrivalTime != null)
|
|
165
|
+
return null;
|
|
166
|
+
result[i] = me.with({
|
|
167
|
+
assumedRealtimeArrivalTime: prevDepartureTime,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// TODO: On the CoreQuery service page, add:
|
|
175
|
+
//
|
|
176
|
+
// "Real-time data has not been provided for all stops. Times marked with * are
|
|
177
|
+
// estimates, extrapolated from the known times."
|
|
178
|
+
//
|
|
179
|
+
// or, alternatively:
|
|
180
|
+
//
|
|
181
|
+
// "Real-time data has not been provided for all stops. Times marked with * are
|
|
182
|
+
// _estimated_ estimates, extrapolated from the _provided_ estimates."
|
|
183
|
+
//# sourceMappingURL=gtfs-trip-movements-interpolator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gtfs-trip-movements-interpolator.js","sourceRoot":"","sources":["../../../src/parser/realtime/gtfs-trip-movements-interpolator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAMjD,+EAA+E;AAC/E,uDAAuD;AACvD,EAAE;AACF,8EAA8E;AAC9E,4EAA4E;AAC5E,aAAa;AACb,EAAE;AACF,gFAAgF;AAChF,kCAAkC;AAClC,EAAE;AACF,mDAAmD;AACnD,mDAAmD;AACnD,8DAA8D;AAC9D,mDAAmD;AACnD,mDA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sE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StopTimeUpdateJson, TripUpdateJson } from "../../data/raw/realtime-data-json.js";
|
|
2
|
+
export declare class NoStopTimeUpdateFieldGivenError {
|
|
3
|
+
readonly tripUpdate: TripUpdateJson;
|
|
4
|
+
readonly type = "no-stop-time-update-field-given";
|
|
5
|
+
constructor(tripUpdate: TripUpdateJson);
|
|
6
|
+
}
|
|
7
|
+
export declare class UnsupportedStopTimeUpdateEntryScheduleRelationshipError {
|
|
8
|
+
readonly tripUpdate: TripUpdateJson;
|
|
9
|
+
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
10
|
+
readonly type = "unsupported-stop-time-update-entry-schedule-relationship";
|
|
11
|
+
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson);
|
|
12
|
+
}
|
|
13
|
+
export declare class NecessaryFieldNotInStopTimeUpdateEntryError {
|
|
14
|
+
readonly tripUpdate: TripUpdateJson;
|
|
15
|
+
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
16
|
+
readonly field: "stopSequence" | "stopId";
|
|
17
|
+
readonly type = "necessary-field-not-in-stop-time-update-entry";
|
|
18
|
+
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson, field: "stopSequence" | "stopId");
|
|
19
|
+
}
|
|
20
|
+
export declare class StopTimeUpdateEntryReferencesUnmappedStopIdError {
|
|
21
|
+
readonly tripUpdate: TripUpdateJson;
|
|
22
|
+
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
23
|
+
readonly type = "stop-time-update-entry-references-unmapped-stop-id";
|
|
24
|
+
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson);
|
|
25
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export class NoStopTimeUpdateFieldGivenError {
|
|
2
|
+
tripUpdate;
|
|
3
|
+
type = "no-stop-time-update-field-given";
|
|
4
|
+
constructor(tripUpdate) {
|
|
5
|
+
this.tripUpdate = tripUpdate;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export class UnsupportedStopTimeUpdateEntryScheduleRelationshipError {
|
|
9
|
+
tripUpdate;
|
|
10
|
+
stopTimeUpdateEntry;
|
|
11
|
+
type = "unsupported-stop-time-update-entry-schedule-relationship";
|
|
12
|
+
constructor(tripUpdate, stopTimeUpdateEntry) {
|
|
13
|
+
this.tripUpdate = tripUpdate;
|
|
14
|
+
this.stopTimeUpdateEntry = stopTimeUpdateEntry;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export class NecessaryFieldNotInStopTimeUpdateEntryError {
|
|
18
|
+
tripUpdate;
|
|
19
|
+
stopTimeUpdateEntry;
|
|
20
|
+
field;
|
|
21
|
+
type = "necessary-field-not-in-stop-time-update-entry";
|
|
22
|
+
constructor(tripUpdate, stopTimeUpdateEntry, field) {
|
|
23
|
+
this.tripUpdate = tripUpdate;
|
|
24
|
+
this.stopTimeUpdateEntry = stopTimeUpdateEntry;
|
|
25
|
+
this.field = field;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export class StopTimeUpdateEntryReferencesUnmappedStopIdError {
|
|
29
|
+
tripUpdate;
|
|
30
|
+
stopTimeUpdateEntry;
|
|
31
|
+
type = "stop-time-update-entry-references-unmapped-stop-id";
|
|
32
|
+
constructor(tripUpdate, stopTimeUpdateEntry) {
|
|
33
|
+
this.tripUpdate = tripUpdate;
|
|
34
|
+
this.stopTimeUpdateEntry = stopTimeUpdateEntry;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=gtfs-trip-update-parser-common-error-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gtfs-trip-update-parser-common-error-types.js","sourceRoot":"","sources":["../../../src/parser/realtime/gtfs-trip-update-parser-common-error-types.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,+BAA+B;IAErB;IADZ,IAAI,GAAG,iCAAiC,CAAC;IAClD,YAAqB,UAA0B;QAA1B,eAAU,GAAV,UAAU,CAAgB;IAAG,CAAC;CACpD;AAED,MAAM,OAAO,uDAAuD;IAGvD;IACA;IAHF,IAAI,GAAG,0DAA0D,CAAC;IAC3E,YACW,UAA0B,EAC1B,mBAAuC;QADvC,eAAU,GAAV,UAAU,CAAgB;QAC1B,wBAAmB,GAAnB,mBAAmB,CAAoB;IAC/C,CAAC;CACL;AAED,MAAM,OAAO,2CAA2C;IAG3C;IACA;IACA;IAJF,IAAI,GAAG,+CAA+C,CAAC;IAChE,YACW,UAA0B,EAC1B,mBAAuC,EACvC,KAAgC;QAFhC,eAAU,GAAV,UAAU,CAAgB;QAC1B,wBAAmB,GAAnB,mBAAmB,CAAoB;QACvC,UAAK,GAAL,KAAK,CAA2B;IACxC,CAAC;CACL;AAED,MAAM,OAAO,gDAAgD;IAGhD;IACA;IAHF,IAAI,GAAG,oDAAoD,CAAC;IACrE,YACW,UAA0B,EAC1B,mBAAuC;QADvC,eAAU,GAAV,UAAU,CAAgB;QAC1B,wBAAmB,GAAnB,mBAAmB,CAAoB;IAC/C,CAAC;CACL"}
|
|
@@ -1,97 +1,31 @@
|
|
|
1
1
|
import type { GtfsScheduleData } from "../../data/gtfs-schedule-data.js";
|
|
2
|
-
import type {
|
|
3
|
-
import { GtfsUpdatedTrip } from "../../data/gtfs-updated-trip.js";
|
|
4
|
-
import type { StopTimeUpdateJson, TripUpdateJson, UpdatedTimeJson } from "../../data/raw/realtime-data-json.js";
|
|
5
|
-
import { type GtfsTripUpdateTripIdentificationError } from "./gtfs-trip-update-trip-identifier.js";
|
|
2
|
+
import type { TripUpdateJson } from "../../data/raw/realtime-data-json.js";
|
|
6
3
|
import type { StopGtfsIdMapping } from "../../data/ids/stop-gtfs-id-mapping.js";
|
|
4
|
+
import { type GtfsAddedTripUpdateParsingError } from "./gtfs-added-trip-update-parser.js";
|
|
5
|
+
import { type GtfsCancelledTripUpdateParsingError } from "./gtfs-cancelled-trip-update-parser.js";
|
|
6
|
+
import { type GtfsUpdatedTripUpdateParsingError } from "./gtfs-updated-trip-update-parser.js";
|
|
7
|
+
import type { LineRoutesMapping } from "../../data/route/line-routes-mapping.js";
|
|
8
|
+
import type { BonusLinesMapping } from "../../data/route/bonus-lines-mapping.js";
|
|
9
|
+
import type { LineGtfsIdMapping } from "../../data/ids/line-gtfs-id-mapping.js";
|
|
7
10
|
export type GtfsTripUpdateParserFields = {
|
|
8
11
|
readonly timezone: string;
|
|
9
12
|
readonly stopGtfsIdMapping: StopGtfsIdMapping;
|
|
13
|
+
readonly lineGtfsIdMapping: LineGtfsIdMapping;
|
|
14
|
+
readonly lineRoutesMapping: LineRoutesMapping;
|
|
15
|
+
readonly bonusLinesMapping: BonusLinesMapping;
|
|
10
16
|
readonly onError: (error: GtfsTripUpdateParsingError) => void;
|
|
11
17
|
};
|
|
12
18
|
export declare class GtfsTripUpdateParser {
|
|
13
|
-
private readonly _timezone;
|
|
14
|
-
private readonly _stopGtfsIdMapping;
|
|
15
19
|
private readonly _onError;
|
|
16
|
-
private readonly
|
|
20
|
+
private readonly _updatedTripParser;
|
|
21
|
+
private readonly _cancelledTripParser;
|
|
22
|
+
private readonly _addedTripParser;
|
|
17
23
|
constructor(fields: GtfsTripUpdateParserFields);
|
|
18
|
-
parse(tripUpdate: TripUpdateJson, scheduleData: GtfsScheduleData): GtfsUpdatedTrip | null;
|
|
19
|
-
private _parseForScheduledTrip;
|
|
20
|
-
private _parseForCancelledTrip;
|
|
21
|
-
private _parseUpdatedTime;
|
|
24
|
+
parse(tripUpdate: TripUpdateJson, scheduleData: GtfsScheduleData): import("../../data/trip/added/gtfs-added-trip.js").GtfsAddedTrip | import("../../data/trip/updated/gtfs-updated-trip.js").GtfsUpdatedTrip | null;
|
|
22
25
|
}
|
|
23
|
-
export type GtfsTripUpdateParsingError = UnsupportedTripUpdateScheduleRelationshipError |
|
|
26
|
+
export type GtfsTripUpdateParsingError = UnsupportedTripUpdateScheduleRelationshipError | GtfsUpdatedTripUpdateParsingError | GtfsCancelledTripUpdateParsingError | GtfsAddedTripUpdateParsingError;
|
|
24
27
|
export declare class UnsupportedTripUpdateScheduleRelationshipError {
|
|
25
28
|
readonly tripUpdate: TripUpdateJson;
|
|
26
29
|
readonly type = "unsupported-trip-update-schedule-relationship";
|
|
27
30
|
constructor(tripUpdate: TripUpdateJson);
|
|
28
31
|
}
|
|
29
|
-
export declare class NoStopTimeUpdateFieldGivenError {
|
|
30
|
-
readonly tripUpdate: TripUpdateJson;
|
|
31
|
-
readonly type = "no-stop-time-update-field-given";
|
|
32
|
-
constructor(tripUpdate: TripUpdateJson);
|
|
33
|
-
}
|
|
34
|
-
export declare class UnsupportedStopTimeUpdateEntryScheduleRelationshipError {
|
|
35
|
-
readonly tripUpdate: TripUpdateJson;
|
|
36
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
37
|
-
readonly type = "unsupported-stop-time-update-entry-schedule-relationship";
|
|
38
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson);
|
|
39
|
-
}
|
|
40
|
-
export declare class NecessaryFieldNotInStopTimeUpdateEntryError {
|
|
41
|
-
readonly tripUpdate: TripUpdateJson;
|
|
42
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
43
|
-
readonly field: "stopSequence" | "stopId";
|
|
44
|
-
readonly type = "necessary-field-not-in-stop-time-update-entry";
|
|
45
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson, field: "stopSequence" | "stopId");
|
|
46
|
-
}
|
|
47
|
-
export declare class StopTimeUpdateEntryReferencesNonExistentStopSequenceError {
|
|
48
|
-
readonly tripUpdate: TripUpdateJson;
|
|
49
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
50
|
-
readonly matchedTrip: GtfsScheduledTrip;
|
|
51
|
-
readonly type = "stop-time-update-entry-references-non-existent-stop-sequence";
|
|
52
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson, matchedTrip: GtfsScheduledTrip);
|
|
53
|
-
}
|
|
54
|
-
export declare class MultipleStopTimeUpdateEntriesForSameMovementIndexError {
|
|
55
|
-
readonly tripUpdate: TripUpdateJson;
|
|
56
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
57
|
-
readonly matchedTrip: GtfsScheduledTrip;
|
|
58
|
-
readonly matchedMovementIndex: number;
|
|
59
|
-
readonly type = "multiple-stop-time-update-entries-for-same-movement-index";
|
|
60
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson, matchedTrip: GtfsScheduledTrip, matchedMovementIndex: number);
|
|
61
|
-
}
|
|
62
|
-
export declare class StopTimeUpdateEntryReferencesUnmappedStopIdError {
|
|
63
|
-
readonly tripUpdate: TripUpdateJson;
|
|
64
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
65
|
-
readonly type = "stop-time-update-entry-references-unmapped-stop-id";
|
|
66
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson);
|
|
67
|
-
}
|
|
68
|
-
export declare class StopTimeUpdateEntryChangesStopError {
|
|
69
|
-
readonly tripUpdate: TripUpdateJson;
|
|
70
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
71
|
-
readonly matchedTrip: GtfsScheduledTrip;
|
|
72
|
-
readonly matchedMovementIndex: number;
|
|
73
|
-
readonly type = "stop-time-update-entry-changes-stop";
|
|
74
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson, matchedTrip: GtfsScheduledTrip, matchedMovementIndex: number);
|
|
75
|
-
}
|
|
76
|
-
export declare class NeitherTimeNorDelayGivenError {
|
|
77
|
-
readonly tripUpdate: TripUpdateJson;
|
|
78
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
79
|
-
readonly updatedTime: UpdatedTimeJson;
|
|
80
|
-
readonly type = "neither-time-nor-delay-given";
|
|
81
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson, updatedTime: UpdatedTimeJson);
|
|
82
|
-
}
|
|
83
|
-
export declare class TimeAndDelayDisagreeWithEachOtherError {
|
|
84
|
-
readonly tripUpdate: TripUpdateJson;
|
|
85
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
86
|
-
readonly updatedTime: UpdatedTimeJson;
|
|
87
|
-
readonly parsedFromTime: Temporal.Instant;
|
|
88
|
-
readonly parsedFromDelay: Temporal.Instant;
|
|
89
|
-
readonly type = "time-and-delay-disagree-with-each-other";
|
|
90
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson, updatedTime: UpdatedTimeJson, parsedFromTime: Temporal.Instant, parsedFromDelay: Temporal.Instant);
|
|
91
|
-
}
|
|
92
|
-
export declare class NeitherArrivalNorDepartureGivenError {
|
|
93
|
-
readonly tripUpdate: TripUpdateJson;
|
|
94
|
-
readonly stopTimeUpdateEntry: StopTimeUpdateJson;
|
|
95
|
-
readonly type = "neither-arrival-nor-departure-given";
|
|
96
|
-
constructor(tripUpdate: TripUpdateJson, stopTimeUpdateEntry: StopTimeUpdateJson);
|
|
97
|
-
}
|