corequery-gtfs 0.11.0 → 0.13.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 +5 -1
- package/dist/conversion/service-converter.js +50 -2
- 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/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.js +1 -1
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-originating-movement.js.map +1 -1
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-regular-movement.js +1 -1
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-regular-movement.js.map +1 -1
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-terminating-movement.js +1 -1
- package/dist/data/trip/scheduled/gtfs-scheduled-trip-terminating-movement.js.map +1 -1
- 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 +2 -0
- package/dist/data/trip/updated/gtfs-updated-trip-originating-movement.js +10 -0
- package/dist/data/trip/updated/gtfs-updated-trip-originating-movement.js.map +1 -1
- package/dist/data/trip/updated/gtfs-updated-trip-regular-movement.d.ts +6 -0
- package/dist/data/trip/updated/gtfs-updated-trip-regular-movement.js +33 -0
- package/dist/data/trip/updated/gtfs-updated-trip-regular-movement.js.map +1 -1
- package/dist/data/trip/updated/gtfs-updated-trip-terminating-movement.d.ts +2 -0
- package/dist/data/trip/updated/gtfs-updated-trip-terminating-movement.js +10 -0
- package/dist/data/trip/updated/gtfs-updated-trip-terminating-movement.js.map +1 -1
- package/dist/data/trip/updated/gtfs-updated-trip.js +0 -18
- package/dist/data/trip/updated/gtfs-updated-trip.js.map +1 -1
- 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 +10 -0
- 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} +5 -5
- 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.js +18 -0
- package/dist/parser/realtime/gtfs-trip-movements-interpolator.js.map +1 -1
- 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 -90
- package/dist/parser/realtime/gtfs-trip-update-parser.js +33 -296
- package/dist/parser/realtime/gtfs-trip-update-parser.js.map +1 -1
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.d.ts +93 -0
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.js +365 -0
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.js.map +1 -0
- package/dist/parser/schedule/gtfs-trip-parser.d.ts +23 -7
- package/dist/parser/schedule/gtfs-trip-parser.js +119 -50
- package/dist/parser/schedule/gtfs-trip-parser.js.map +1 -1
- package/package.json +1 -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 -200
- package/dist/parser/schedule/gtfs-route-matcher.js.map +0 -1
|
@@ -1,36 +1,40 @@
|
|
|
1
1
|
import { GtfsScheduledTrip } from "../../data/trip/scheduled/gtfs-scheduled-trip.js";
|
|
2
2
|
import { GtfsStopTimeNormaliser, } from "./gtfs-stop-time-normaliser.js";
|
|
3
|
-
import { GtfsRouteMatcher, } from "
|
|
3
|
+
import { GtfsRouteMatcher, } from "../gtfs-route-matcher.js";
|
|
4
4
|
import { GtfsTransferParser, } from "./gtfs-transfer-parser.js";
|
|
5
|
+
import { itsOk } from "@dan-schel/js-utils";
|
|
6
|
+
import { GtfsScheduledTripOriginatingMovement } from "../../data/trip/scheduled/gtfs-scheduled-trip-originating-movement.js";
|
|
7
|
+
import { GtfsScheduledTripTerminatingMovement } from "../../data/trip/scheduled/gtfs-scheduled-trip-terminating-movement.js";
|
|
8
|
+
import { GtfsScheduledTripRegularMovement } from "../../data/trip/scheduled/gtfs-scheduled-trip-regular-movement.js";
|
|
9
|
+
import { GtfsScheduledTripPassingMovement } from "../../data/trip/scheduled/gtfs-scheduled-trip-passing-movement.js";
|
|
10
|
+
const STOP_TIME_PICKUP_TYPE_REGULAR = 0;
|
|
11
|
+
const STOP_TIME_PICKUP_TYPE_NO_PICKUP = 1;
|
|
12
|
+
const STOP_TIME_DROP_OFF_TYPE_REGULAR = 0;
|
|
13
|
+
const STOP_TIME_DROP_OFF_TYPE_NO_DROP_OFF = 1;
|
|
5
14
|
export class GtfsTripParser {
|
|
6
15
|
_lineRoutesMapping;
|
|
7
|
-
_bonusLinesMapping;
|
|
8
16
|
_lineGtfsIdMapping;
|
|
17
|
+
_stopGtfsIdMapping;
|
|
9
18
|
_onError;
|
|
10
19
|
_stopTimeNormaliser;
|
|
11
|
-
|
|
12
|
-
_bonusRouteMatcher;
|
|
20
|
+
_routeMatcher;
|
|
13
21
|
_transferParser;
|
|
14
22
|
constructor(fields) {
|
|
15
23
|
this._lineRoutesMapping = fields.lineRoutesMapping;
|
|
16
|
-
this._bonusLinesMapping = fields.bonusLinesMapping;
|
|
17
24
|
this._lineGtfsIdMapping = fields.lineGtfsIdMapping;
|
|
25
|
+
this._stopGtfsIdMapping = fields.stopGtfsIdMapping;
|
|
18
26
|
this._onError = fields.onError;
|
|
19
27
|
this._stopTimeNormaliser = new GtfsStopTimeNormaliser({
|
|
20
28
|
onError: this._onError,
|
|
21
29
|
});
|
|
22
|
-
this.
|
|
30
|
+
this._routeMatcher = new GtfsRouteMatcher({
|
|
23
31
|
onError: this._onError,
|
|
24
|
-
|
|
32
|
+
lineRoutesMapping: fields.lineRoutesMapping,
|
|
33
|
+
bonusLinesMapping: fields.bonusLinesMapping,
|
|
25
34
|
});
|
|
26
35
|
this._transferParser = new GtfsTransferParser({
|
|
27
36
|
onError: this._onError,
|
|
28
37
|
});
|
|
29
|
-
// We don't care if a bonus route doesn't match. Most of the time, it won't!
|
|
30
|
-
this._bonusRouteMatcher = new GtfsRouteMatcher({
|
|
31
|
-
onError: () => { },
|
|
32
|
-
stopGtfsIdMapping: fields.stopGtfsIdMapping,
|
|
33
|
-
});
|
|
34
38
|
}
|
|
35
39
|
parse(trips, stopTimes, transfers, calendars) {
|
|
36
40
|
const calendarMap = this._buildCalendarMap(calendars);
|
|
@@ -56,25 +60,29 @@ export class GtfsTripParser {
|
|
|
56
60
|
// Stop time normaliser reports its own errors.
|
|
57
61
|
if (normalizedStopTimes == null)
|
|
58
62
|
continue;
|
|
59
|
-
const
|
|
60
|
-
|
|
63
|
+
const servicingMovements = this._convertToServicingMovements(normalizedStopTimes);
|
|
64
|
+
if (servicingMovements == null)
|
|
65
|
+
continue;
|
|
66
|
+
const routeMatch = this._routeMatcher.match(lineIdMatch.lineId, servicingMovements, (stopId) => new GtfsScheduledTripPassingMovement({ stopId }));
|
|
61
67
|
// Route matcher reports its own errors.
|
|
62
|
-
if (
|
|
68
|
+
if (routeMatch == null)
|
|
63
69
|
continue;
|
|
64
|
-
const { lineIds, serviceTags } = this._applyBonusLines(lineIdMatch.lineId, routeMatchResult.serviceTags, normalizedStopTimes);
|
|
65
70
|
parsedTrips.push(new GtfsScheduledTrip({
|
|
66
71
|
gtfsTripId: trip.trip_id,
|
|
67
72
|
gtfsRouteId: trip.route_id,
|
|
68
73
|
calendar,
|
|
69
|
-
movements:
|
|
70
|
-
lineIds,
|
|
71
|
-
color:
|
|
72
|
-
serviceTags,
|
|
74
|
+
movements: routeMatch.movements,
|
|
75
|
+
lineIds: routeMatch.lineIds,
|
|
76
|
+
color: routeMatch.color,
|
|
77
|
+
serviceTags: routeMatch.serviceTags,
|
|
73
78
|
}));
|
|
74
79
|
}
|
|
75
80
|
const parsedTransfers = this._transferParser.parse(parsedTrips, transfers);
|
|
76
81
|
return { parsedTrips, parsedTransfers, ignoredTripIds };
|
|
77
82
|
}
|
|
83
|
+
_buildCalendarMap(calendars) {
|
|
84
|
+
return new Map(calendars.map((c) => [c.gtfsCalendarId, c]));
|
|
85
|
+
}
|
|
78
86
|
_organiseStopTimesIntoTrips(trips, stopTimes) {
|
|
79
87
|
const result = new Map();
|
|
80
88
|
// Step 1: Build a map from everything in trips.txt.
|
|
@@ -109,40 +117,80 @@ export class GtfsTripParser {
|
|
|
109
117
|
stopTimes: group.stopTimes,
|
|
110
118
|
}));
|
|
111
119
|
}
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const serviceTags = new Set();
|
|
121
|
-
for (const bonusLine of bonusLines.lines) {
|
|
122
|
-
const matchResult = this._bonusRouteMatcher.match(normalizedStopTimes, this._lineRoutesMapping.forLine(bonusLine));
|
|
123
|
-
if (matchResult != null) {
|
|
124
|
-
lineIds.add(bonusLine);
|
|
125
|
-
for (const serviceTag of matchResult.serviceTags) {
|
|
126
|
-
serviceTags.add(serviceTag);
|
|
127
|
-
}
|
|
120
|
+
_convertToServicingMovements(stopTimes) {
|
|
121
|
+
const result = [];
|
|
122
|
+
for (let i = 0; i < stopTimes.length; i++) {
|
|
123
|
+
const stopTime = itsOk(stopTimes[i]);
|
|
124
|
+
const gtfsIdMetadata = this._stopGtfsIdMapping.tryResolve(stopTime.stop_id);
|
|
125
|
+
if (gtfsIdMetadata == null) {
|
|
126
|
+
this._onError(new StopTimeReferencesUnmappedStopIdError(stopTime));
|
|
127
|
+
return null;
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
const positionId = gtfsIdMetadata.type === "positional" ? gtfsIdMetadata.positionId : null;
|
|
130
|
+
const picksUp = this._doesPickUp(stopTime);
|
|
131
|
+
const dropsOff = this._doesDropOff(stopTime);
|
|
132
|
+
if (i === 0) {
|
|
133
|
+
result.push(new GtfsScheduledTripOriginatingMovement({
|
|
134
|
+
stopId: gtfsIdMetadata.stopId,
|
|
135
|
+
positionId,
|
|
136
|
+
departureTime: stopTime.departure_time,
|
|
137
|
+
gtfsIdMetadata,
|
|
138
|
+
gtfsStopSequence: stopTime.stop_sequence,
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
else if (i === stopTimes.length - 1) {
|
|
142
|
+
result.push(new GtfsScheduledTripTerminatingMovement({
|
|
143
|
+
stopId: gtfsIdMetadata.stopId,
|
|
144
|
+
positionId,
|
|
145
|
+
arrivalTime: stopTime.arrival_time,
|
|
146
|
+
gtfsIdMetadata,
|
|
147
|
+
gtfsStopSequence: stopTime.stop_sequence,
|
|
148
|
+
}));
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
result.push(new GtfsScheduledTripRegularMovement({
|
|
152
|
+
stopId: gtfsIdMetadata.stopId,
|
|
153
|
+
positionId,
|
|
154
|
+
arrivalTime: stopTime.arrival_time,
|
|
155
|
+
departureTime: stopTime.departure_time,
|
|
156
|
+
picksUp,
|
|
157
|
+
dropsOff,
|
|
158
|
+
gtfsIdMetadata,
|
|
159
|
+
gtfsStopSequence: stopTime.stop_sequence,
|
|
160
|
+
}));
|
|
137
161
|
}
|
|
138
162
|
}
|
|
139
|
-
return
|
|
140
|
-
lineIds: Array.from(lineIds),
|
|
141
|
-
serviceTags: Array.from(serviceTags),
|
|
142
|
-
};
|
|
163
|
+
return result;
|
|
143
164
|
}
|
|
144
|
-
|
|
145
|
-
|
|
165
|
+
_doesPickUp(stopTime) {
|
|
166
|
+
if (stopTime.pickup_type === STOP_TIME_PICKUP_TYPE_REGULAR) {
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
else if (stopTime.pickup_type === STOP_TIME_PICKUP_TYPE_NO_PICKUP) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
this._onError(new UnexpectedPickupTypeError(stopTime));
|
|
174
|
+
// If pickup_type is unexpected, let's just treat it like a normal stop. I
|
|
175
|
+
// don't think we need to exclude the whole trip for something as minor as
|
|
176
|
+
// mislabelling pick up only stops.
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
_doesDropOff(stopTime) {
|
|
181
|
+
if (stopTime.drop_off_type === STOP_TIME_DROP_OFF_TYPE_REGULAR) {
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
else if (stopTime.drop_off_type === STOP_TIME_DROP_OFF_TYPE_NO_DROP_OFF) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
this._onError(new UnexpectedDropOffTypeError(stopTime));
|
|
189
|
+
// If drop_off_type is unexpected, let's just treat it like a normal stop.
|
|
190
|
+
// I don't think we need to exclude the whole trip for something as minor
|
|
191
|
+
// as mislabelling drop off only stops.
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
146
194
|
}
|
|
147
195
|
}
|
|
148
196
|
export class StopTimeReferencesNonExistentTripError {
|
|
@@ -173,4 +221,25 @@ export class TripReferencesUnmappedRouteIdError {
|
|
|
173
221
|
this.trip = trip;
|
|
174
222
|
}
|
|
175
223
|
}
|
|
224
|
+
export class StopTimeReferencesUnmappedStopIdError {
|
|
225
|
+
stopTime;
|
|
226
|
+
type = "stop-time-references-unmapped-stop-id";
|
|
227
|
+
constructor(stopTime) {
|
|
228
|
+
this.stopTime = stopTime;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
export class UnexpectedPickupTypeError {
|
|
232
|
+
stopTime;
|
|
233
|
+
type = "unexpected-pickup-type";
|
|
234
|
+
constructor(stopTime) {
|
|
235
|
+
this.stopTime = stopTime;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
export class UnexpectedDropOffTypeError {
|
|
239
|
+
stopTime;
|
|
240
|
+
type = "unexpected-drop-off-type";
|
|
241
|
+
constructor(stopTime) {
|
|
242
|
+
this.stopTime = stopTime;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
176
245
|
//# sourceMappingURL=gtfs-trip-parser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtfs-trip-parser.js","sourceRoot":"","sources":["../../../src/parser/schedule/gtfs-trip-parser.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EACL,sBAAsB,GAEvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,gBAAgB,GAEjB,MAAM,
|
|
1
|
+
{"version":3,"file":"gtfs-trip-parser.js","sourceRoot":"","sources":["../../../src/parser/schedule/gtfs-trip-parser.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EACL,sBAAsB,GAEvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,gBAAgB,GAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,oCAAoC,EAAE,MAAM,uEAAuE,CAAC;AAC7H,OAAO,EAAE,oCAAoC,EAAE,MAAM,uEAAuE,CAAC;AAC7H,OAAO,EAAE,gCAAgC,EAAE,MAAM,mEAAmE,CAAC;AACrH,OAAO,EAAE,gCAAgC,EAAE,MAAM,mEAAmE,CAAC;AAErH,MAAM,6BAA6B,GAA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,GAAR,QAAQ,CAAiB;IAAG,CAAC;CACnD;AAED,MAAM,OAAO,yBAAyB;IAEf;IADZ,IAAI,GAAG,wBAAwB,CAAC;IACzC,YAAqB,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;CACnD;AAED,MAAM,OAAO,0BAA0B;IAEhB;IADZ,IAAI,GAAG,0BAA0B,CAAC;IAC3C,YAAqB,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;CACnD"}
|
package/package.json
CHANGED
package/dist/data/utils.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { GtfsScheduledTripServicingMovement } from "./trip/scheduled/types.js";
|
|
2
|
-
import type { GtfsUpdatedTripServicingMovement } from "./trip/updated/types.js";
|
|
3
|
-
export type GtfsTripServicingMovement = GtfsScheduledTripServicingMovement | GtfsUpdatedTripServicingMovement;
|
package/dist/data/utils.js
DELETED
package/dist/data/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/data/utils.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gtfs-trip-update-trip-identifier.js","sourceRoot":"","sources":["../../../src/parser/realtime/gtfs-trip-update-trip-identifier.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,4BAA4B;IACtB,QAAQ,CAEf;IAEV,YAAY,MAA0C;QACpD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;IACjC,CAAC;IAED,QAAQ,CAAC,cAAkC,EAAE,YAA8B;QACzE,2EAA2E;QAC3E,wEAAwE;QACxE,yEAAyE;QACzE,sBAAsB;QACtB,IAAI,cAAc,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;YAClC,MAAM,GAAG,GAAG,sCAAsC,CAAC;YACnD,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,cAAc,EA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A0D,CAAC;YACvE,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC;QAC/C,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC,SAAS,EAAE,CAAC;IACxD,CAAC;CACF;AAQD,6EAA6E;AAC7E,gFAAgF;AAChF,uCAAuC;AACvC,MAAM,OAAO,sCAAsC;IAGtC;IACA;IAHF,IAAI,GAAG,wCAAwC,CAAC;IACzD,YACW,cAAkC,EAClC,KAA6B;QAD7B,mBAAc,GAAd,cAAc,CAAoB;QAClC,UAAK,GAAL,KAAK,CAAwB;IACrC,CAAC;CACL;AAED,MAAM,OAAO,8CAA8C;IAEpC;IADZ,IAAI,GAAG,iDAAiD,CAAC;IAClE,YAAqB,cAAkC;QAAlC,mBAAc,GAAd,cAAc,CAAoB;IAAG,CAAC;CAC5D;AAED,MAAM,OAAO,gCAAgC;IAGhC;IACA;IAHF,IAAI,GAAG,mCAAmC,CAAC;IACpD,YACW,cAAkC,EAClC,IAAuB;QADvB,mBAAc,GAAd,cAAc,CAAoB;QAClC,SAAI,GAAJ,IAAI,CAAmB;IAC/B,CAAC;CACL;AAED,MAAM,OAAO,0DAA0D;IAI1D;IACA;IAJF,IAAI,GACX,iEAAiE,CAAC;IACpE,YACW,cAAkC,EAClC,IAAuB;QADvB,mBAAc,GAAd,cAAc,CAAoB;QAClC,SAAI,GAAJ,IAAI,CAAmB;IAC/B,CAAC;CACL"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { Color } from "../../corequery-types.js";
|
|
2
|
-
import type { StopTimesCsv, StopTimesCsvRow } from "../../data/raw/schedule-csvs.js";
|
|
3
|
-
import type { StopGtfsIdMapping } from "../../data/ids/stop-gtfs-id-mapping.js";
|
|
4
|
-
import type { Route } from "../../data/route/route.js";
|
|
5
|
-
import type { GtfsScheduledTripMovement } from "../../data/trip/scheduled/types.js";
|
|
6
|
-
export type MatchedRoute = {
|
|
7
|
-
movements: readonly GtfsScheduledTripMovement[];
|
|
8
|
-
color: Color | null;
|
|
9
|
-
serviceTags: readonly number[];
|
|
10
|
-
};
|
|
11
|
-
export type GtfsRouteMatcherFields = {
|
|
12
|
-
readonly onError: (error: GtfsRouteMatchingError) => void;
|
|
13
|
-
readonly stopGtfsIdMapping: StopGtfsIdMapping;
|
|
14
|
-
};
|
|
15
|
-
export declare class GtfsRouteMatcher {
|
|
16
|
-
private readonly _onError;
|
|
17
|
-
private readonly _stopGtfsIdMapping;
|
|
18
|
-
constructor(fields: GtfsRouteMatcherFields);
|
|
19
|
-
match(stopTimes: StopTimesCsv, routesForLine: readonly Route[]): MatchedRoute | null;
|
|
20
|
-
private _matchToRoute;
|
|
21
|
-
private _addPassingMovementsFromRoute;
|
|
22
|
-
/**
|
|
23
|
-
* Take the rows from stop_times.txt and form a
|
|
24
|
-
* GtfsScheduledTripServicingMovement for each. Note that passing movements
|
|
25
|
-
* are not added at this stage. They're sprinkled in later once we've matched
|
|
26
|
-
* the trip to a route.
|
|
27
|
-
*/
|
|
28
|
-
private _convertToServicingMovements;
|
|
29
|
-
private _doesPickUp;
|
|
30
|
-
private _doesDropOff;
|
|
31
|
-
}
|
|
32
|
-
export type GtfsRouteMatchingError = NoMatchingRouteError | StopTimeReferencesUnmappedStopIdError | UnexpectedPickupTypeError | UnexpectedDropOffTypeError;
|
|
33
|
-
export declare class NoMatchingRouteError {
|
|
34
|
-
readonly stopTimes: StopTimesCsv;
|
|
35
|
-
readonly resolvedStopIds: readonly number[];
|
|
36
|
-
readonly type = "no-matching-route";
|
|
37
|
-
constructor(stopTimes: StopTimesCsv, resolvedStopIds: readonly number[]);
|
|
38
|
-
}
|
|
39
|
-
export declare class StopTimeReferencesUnmappedStopIdError {
|
|
40
|
-
readonly stopTime: StopTimesCsvRow;
|
|
41
|
-
readonly type = "stop-time-references-unmapped-stop-id";
|
|
42
|
-
constructor(stopTime: StopTimesCsvRow);
|
|
43
|
-
}
|
|
44
|
-
export declare class UnexpectedPickupTypeError {
|
|
45
|
-
readonly stopTime: StopTimesCsvRow;
|
|
46
|
-
readonly type = "unexpected-pickup-type";
|
|
47
|
-
constructor(stopTime: StopTimesCsvRow);
|
|
48
|
-
}
|
|
49
|
-
export declare class UnexpectedDropOffTypeError {
|
|
50
|
-
readonly stopTime: StopTimesCsvRow;
|
|
51
|
-
readonly type = "unexpected-drop-off-type";
|
|
52
|
-
constructor(stopTime: StopTimesCsvRow);
|
|
53
|
-
}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { GtfsScheduledTripOriginatingMovement } from "../../data/trip/scheduled/gtfs-scheduled-trip-originating-movement.js";
|
|
2
|
-
import { GtfsScheduledTripPassingMovement } from "../../data/trip/scheduled/gtfs-scheduled-trip-passing-movement.js";
|
|
3
|
-
import { GtfsScheduledTripRegularMovement } from "../../data/trip/scheduled/gtfs-scheduled-trip-regular-movement.js";
|
|
4
|
-
import { GtfsScheduledTripTerminatingMovement } from "../../data/trip/scheduled/gtfs-scheduled-trip-terminating-movement.js";
|
|
5
|
-
import { itsOk } from "@dan-schel/js-utils";
|
|
6
|
-
const STOP_TIME_PICKUP_TYPE_REGULAR = 0;
|
|
7
|
-
const STOP_TIME_PICKUP_TYPE_NO_PICKUP = 1;
|
|
8
|
-
const STOP_TIME_DROP_OFF_TYPE_REGULAR = 0;
|
|
9
|
-
const STOP_TIME_DROP_OFF_TYPE_NO_DROP_OFF = 1;
|
|
10
|
-
export class GtfsRouteMatcher {
|
|
11
|
-
_onError;
|
|
12
|
-
_stopGtfsIdMapping;
|
|
13
|
-
constructor(fields) {
|
|
14
|
-
this._onError = fields.onError;
|
|
15
|
-
this._stopGtfsIdMapping = fields.stopGtfsIdMapping;
|
|
16
|
-
}
|
|
17
|
-
match(stopTimes, routesForLine) {
|
|
18
|
-
const servicingMovements = this._convertToServicingMovements(stopTimes);
|
|
19
|
-
if (servicingMovements == null)
|
|
20
|
-
return null;
|
|
21
|
-
const match = this._matchToRoute(servicingMovements, routesForLine);
|
|
22
|
-
if (match == null) {
|
|
23
|
-
const stopIds = servicingMovements.map((movement) => movement.stopId);
|
|
24
|
-
this._onError(new NoMatchingRouteError(stopTimes, stopIds));
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
return match;
|
|
28
|
-
}
|
|
29
|
-
_matchToRoute(servicingMovements, routesForLine) {
|
|
30
|
-
// Step 1: Find the shortest route for this line which contains all the
|
|
31
|
-
// stops where the trip services as a subsequence.
|
|
32
|
-
const shortestMatch = routesForLine
|
|
33
|
-
.filter((r) => r.matchesStoppingOrder(servicingMovements.map((m) => m.stopId)))
|
|
34
|
-
.reduce((prev, me) => (prev == null || me.isShorterThan(prev) ? me : prev), null);
|
|
35
|
-
if (shortestMatch == null)
|
|
36
|
-
return null;
|
|
37
|
-
const { color, serviceTags } = shortestMatch;
|
|
38
|
-
// Step 2: Since stop_times.txt in GTFS only lists the stops the service
|
|
39
|
-
// actually serves (i.e. it doesn't have the express stops), use the matched
|
|
40
|
-
// route as a guide for which stops the service skipped, and add those into
|
|
41
|
-
// the list as passing movements.
|
|
42
|
-
const movements = this._addPassingMovementsFromRoute(servicingMovements, shortestMatch);
|
|
43
|
-
return { movements, color, serviceTags };
|
|
44
|
-
}
|
|
45
|
-
_addPassingMovementsFromRoute(servicingMovements, matchingRoute) {
|
|
46
|
-
const result = [];
|
|
47
|
-
let nextServicingMovementIndex = 0;
|
|
48
|
-
// Broadly: Iterate through the route's stops, and step through the trip
|
|
49
|
-
// movements simultaneously when they match. Add all route stops between
|
|
50
|
-
// first and last trip movements as servicing movements where found or
|
|
51
|
-
// passing movements otherwise.
|
|
52
|
-
for (const routeStop of matchingRoute.stops) {
|
|
53
|
-
const nextServicingMovement = servicingMovements[nextServicingMovementIndex];
|
|
54
|
-
// If there's no next servicing movement, then the index must be off the
|
|
55
|
-
// end of the array, so we're done (the service has terminated).
|
|
56
|
-
if (nextServicingMovement == null)
|
|
57
|
-
break;
|
|
58
|
-
if (routeStop.stopId === nextServicingMovement.stopId) {
|
|
59
|
-
// When the next movement from the trip matches the one in the route
|
|
60
|
-
// we're up to, add the servicing movement.
|
|
61
|
-
result.push(nextServicingMovement);
|
|
62
|
-
nextServicingMovementIndex++;
|
|
63
|
-
}
|
|
64
|
-
else if (nextServicingMovementIndex > 0 &&
|
|
65
|
-
!routeStop.collapseInStoppingPatterns) {
|
|
66
|
-
// Otherwise the stop from the route is an `type: "passing"` movement.
|
|
67
|
-
// `nextServicingMovementIndex > 0` stops us adding passing movements
|
|
68
|
-
// from the route before the service originates.
|
|
69
|
-
//
|
|
70
|
-
// For now, I'm skipping adding `collapseInStoppingPatterns` stops as
|
|
71
|
-
// passing movements. This flag means we don't want this stop to show up
|
|
72
|
-
// in stopping patterns normally, unless it's servicing (e.g. East
|
|
73
|
-
// Pakenham on the Gippsland line is one of these). I'm assuming there's
|
|
74
|
-
// nothing downstream that'll need to consider these collapsed stops.
|
|
75
|
-
//
|
|
76
|
-
// (If I need to reconsider this decision for some reason, maybe instead
|
|
77
|
-
// of adding those stops back in to this array with some sort of flag, I
|
|
78
|
-
// could consider adding the matched route itself as metadata to the
|
|
79
|
-
// trip? Probably having the index of the route stop in this array will
|
|
80
|
-
// be useful to reconcile the two.)
|
|
81
|
-
result.push(new GtfsScheduledTripPassingMovement({
|
|
82
|
-
stopId: routeStop.stopId,
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return result;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Take the rows from stop_times.txt and form a
|
|
90
|
-
* GtfsScheduledTripServicingMovement for each. Note that passing movements
|
|
91
|
-
* are not added at this stage. They're sprinkled in later once we've matched
|
|
92
|
-
* the trip to a route.
|
|
93
|
-
*/
|
|
94
|
-
_convertToServicingMovements(stopTimes) {
|
|
95
|
-
const result = [];
|
|
96
|
-
for (let i = 0; i < stopTimes.length; i++) {
|
|
97
|
-
const stopTime = itsOk(stopTimes[i]);
|
|
98
|
-
const gtfsIdMetadata = this._stopGtfsIdMapping.tryResolve(stopTime.stop_id);
|
|
99
|
-
if (gtfsIdMetadata == null) {
|
|
100
|
-
this._onError(new StopTimeReferencesUnmappedStopIdError(stopTime));
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
const positionId = gtfsIdMetadata.type === "positional" ? gtfsIdMetadata.positionId : null;
|
|
104
|
-
const picksUp = this._doesPickUp(stopTime);
|
|
105
|
-
const dropsOff = this._doesDropOff(stopTime);
|
|
106
|
-
if (i === 0) {
|
|
107
|
-
result.push(new GtfsScheduledTripOriginatingMovement({
|
|
108
|
-
stopId: gtfsIdMetadata.stopId,
|
|
109
|
-
positionId,
|
|
110
|
-
departureTime: stopTime.departure_time,
|
|
111
|
-
gtfsIdMetadata,
|
|
112
|
-
gtfsStopSequence: stopTime.stop_sequence,
|
|
113
|
-
}));
|
|
114
|
-
}
|
|
115
|
-
else if (i === stopTimes.length - 1) {
|
|
116
|
-
result.push(new GtfsScheduledTripTerminatingMovement({
|
|
117
|
-
stopId: gtfsIdMetadata.stopId,
|
|
118
|
-
positionId,
|
|
119
|
-
arrivalTime: stopTime.arrival_time,
|
|
120
|
-
gtfsIdMetadata,
|
|
121
|
-
gtfsStopSequence: stopTime.stop_sequence,
|
|
122
|
-
}));
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
result.push(new GtfsScheduledTripRegularMovement({
|
|
126
|
-
stopId: gtfsIdMetadata.stopId,
|
|
127
|
-
positionId,
|
|
128
|
-
arrivalTime: stopTime.arrival_time,
|
|
129
|
-
departureTime: stopTime.departure_time,
|
|
130
|
-
picksUp,
|
|
131
|
-
dropsOff,
|
|
132
|
-
gtfsIdMetadata,
|
|
133
|
-
gtfsStopSequence: stopTime.stop_sequence,
|
|
134
|
-
}));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return result;
|
|
138
|
-
}
|
|
139
|
-
_doesPickUp(stopTime) {
|
|
140
|
-
if (stopTime.pickup_type === STOP_TIME_PICKUP_TYPE_REGULAR) {
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
else if (stopTime.pickup_type === STOP_TIME_PICKUP_TYPE_NO_PICKUP) {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
this._onError(new UnexpectedPickupTypeError(stopTime));
|
|
148
|
-
// If pickup_type is unexpected, let's just treat it like a normal stop. I
|
|
149
|
-
// don't think we need to exclude the whole trip for something as minor as
|
|
150
|
-
// mislabelling pick up only stops.
|
|
151
|
-
return true;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
_doesDropOff(stopTime) {
|
|
155
|
-
if (stopTime.drop_off_type === STOP_TIME_DROP_OFF_TYPE_REGULAR) {
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
else if (stopTime.drop_off_type === STOP_TIME_DROP_OFF_TYPE_NO_DROP_OFF) {
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
this._onError(new UnexpectedDropOffTypeError(stopTime));
|
|
163
|
-
// If drop_off_type is unexpected, let's just treat it like a normal stop.
|
|
164
|
-
// I don't think we need to exclude the whole trip for something as minor
|
|
165
|
-
// as mislabelling drop off only stops.
|
|
166
|
-
return true;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
export class NoMatchingRouteError {
|
|
171
|
-
stopTimes;
|
|
172
|
-
resolvedStopIds;
|
|
173
|
-
type = "no-matching-route";
|
|
174
|
-
constructor(stopTimes, resolvedStopIds) {
|
|
175
|
-
this.stopTimes = stopTimes;
|
|
176
|
-
this.resolvedStopIds = resolvedStopIds;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
export class StopTimeReferencesUnmappedStopIdError {
|
|
180
|
-
stopTime;
|
|
181
|
-
type = "stop-time-references-unmapped-stop-id";
|
|
182
|
-
constructor(stopTime) {
|
|
183
|
-
this.stopTime = stopTime;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
export class UnexpectedPickupTypeError {
|
|
187
|
-
stopTime;
|
|
188
|
-
type = "unexpected-pickup-type";
|
|
189
|
-
constructor(stopTime) {
|
|
190
|
-
this.stopTime = stopTime;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
export class UnexpectedDropOffTypeError {
|
|
194
|
-
stopTime;
|
|
195
|
-
type = "unexpected-drop-off-type";
|
|
196
|
-
constructor(stopTime) {
|
|
197
|
-
this.stopTime = stopTime;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
//# sourceMappingURL=gtfs-route-matcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gtfs-route-matcher.js","sourceRoot":"","sources":["../../../src/parser/schedule/gtfs-route-matcher.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oCAAoC,EAAE,MAAM,uEAAuE,CAAC;AAC7H,OAAO,EAAE,gCAAgC,EAAE,MAAM,mEAAmE,CAAC;AACrH,OAAO,EAAE,gCAAgC,EAAE,MAAM,mEAAmE,CAAC;AACrH,OAAO,EAAE,oCAAoC,EAAE,MAAM,uEAAuE,CAAC;AAK7H,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,MAAM,6BAA6B,GAAG,CAAC,CAAC;AACxC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAC1C,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAC1C,MAAM,mCAAmC,GAAG,CAAC,CAAC;AAa9C,MAAM,OAAO,gBAAgB;IACV,QAAQ,CAA0C;IAClD,kBAAkB,CAAoB;IAEvD,YAAY,MAA8B;QACxC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACrD,CAAC;IAED,KAAK,CACH,SAAuB,EACvB,aAA+B;QAE/B,MAAM,kBAAkB,GAAG,IAAI,CAAC,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