diff --git a/test/bvg-journey.js b/test/bvg-journey.js new file mode 100644 index 00000000..f81305a4 --- /dev/null +++ b/test/bvg-journey.js @@ -0,0 +1,40 @@ +'use strict' + +const tapePromise = require('tape-promise').default +const tape = require('tape') + +const createClient = require('..') +const rawProfile = require('../p/bvg') +const raw = require('./fixtures/bvg-journey.json') +const expected = require('./fixtures/bvg-journey.js') + +const test = tapePromise(tape) +const client = createClient(rawProfile, 'public-transport/hafas-client:test') +const {profile} = client + +const opt = { + results: null, + via: null, + stopovers: true, + transfers: -1, + transferTime: 0, + accessibility: 'none', + bike: false, + tickets: true, + polylines: true, + remarks: true, + walkingSpeed: 'normal', + startWithWalking: true, + scheduledDays: true, + departure: '2019-08-18T14:03:50+02:00', + products: {} +} + +test('parses a journey correctly (BVG)', (t) => { + const common = profile.parseCommon(profile, opt, raw) + const parseJourney = profile.parseJourney(profile, opt, common) + const journey = parseJourney(common.outConL[0]) + + t.deepEqual(journey, expected) + t.end() +}) diff --git a/test/bvg-radar.js b/test/bvg-radar.js new file mode 100644 index 00000000..8c514a67 --- /dev/null +++ b/test/bvg-radar.js @@ -0,0 +1,32 @@ +'use strict' + +const tapePromise = require('tape-promise').default +const tape = require('tape') + +const createClient = require('..') +const rawProfile = require('../p/bvg') +const raw = require('./fixtures/bvg-radar.json') +const expected = require('./fixtures/bvg-radar.js') + +const test = tapePromise(tape) +const client = createClient(rawProfile, 'public-transport/hafas-client:test') +const {profile} = client + +const opt = { + results: 256, + duration: 30, + frames: 3, + products: null, + polylines: true, + departure: '2019-08-19T21:00:00+02:00', + products: {} +} + +test('parses a radar() response correctly (BVG)', (t) => { + const common = profile.parseCommon(profile, opt, raw) + const parseMovement = profile.parseMovement(profile, opt, common) + const movements = raw.jnyL.map(parseMovement) + + t.deepEqual(movements, expected) + t.end() +}) diff --git a/test/fixtures/bvg-journey.js b/test/fixtures/bvg-journey.js new file mode 100644 index 00000000..4e381a25 --- /dev/null +++ b/test/fixtures/bvg-journey.js @@ -0,0 +1,1056 @@ +'use strict' + +module.exports = { + type: 'journey', + legs: [{ + origin: { + type: 'location', + id: '900980968', + latitude: 52.521769, + longitude: 13.395231, + name: 'Berlin, Bodemuseum', + poi: true + }, + destination: { + type: 'stop', + id: '900000100007', + name: 'S Oranienburger Str.', + location: { + type: 'location', + id: '900100007', + latitude: 52.525158, + longitude: 13.393064 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + departure: '2019-08-18T14:06:00+02:00', + arrival: '2019-08-18T14:16:00+02:00', + public: true, + walking: true, + distance: 568 + }, { + origin: { + type: 'stop', + id: '900000100007', + name: 'S Oranienburger Str.', + location: { + type: 'location', + id: '900100007', + latitude: 52.525158, + longitude: 13.393064 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000058101', + name: 'S Südkreuz', + location: { + type: 'location', + id: '900058101', + latitude: 52.475465, + longitude: 13.365575 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: true, + regional: true + } + }, + departure: '2019-08-18T14:16:00+02:00', + arrival: '2019-08-18T14:29:00+02:00', + reachable: true, + departureDelay: 0, + arrivalDelay: 0, + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: { + type: 'stop', + id: '900000100007', + name: 'S Oranienburger Str.', + location: { + type: 'location', + id: '900100007', + latitude: 52.525158, + longitude: 13.393064 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + geometry: { + type: 'Point', + coordinates: [ + 13.39306, + 52.52516 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.39176, + 52.52284 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.39023, + 52.52216 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38866, + 52.52195 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38798, + 52.52174 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38744, + 52.52141 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38651, + 52.5206 + ] + } + }, + { + type: 'Feature', + properties: { + type: 'stop', + id: '900000100001', + name: 'S+U Friedrichstr.', + location: { + type: 'location', + id: '900100001', + latitude: 52.520268, + longitude: 13.387149 + }, + products: { + suburban: true, + subway: true, + tram: true, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + geometry: { + type: 'Point', + coordinates: [ + 13.38715, + 52.52027 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38635, + 52.52049 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38537, + 52.51974 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38567, + 52.51785 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.3855, + 52.51745 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38497, + 52.51691 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38444, + 52.51665 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38399, + 52.51657 + ] + } + }, + { + type: 'Feature', + properties: { + type: 'stop', + id: '900000100025', + name: 'S+U Brandenburger Tor', + location: { + type: 'location', + id: '900100025', + latitude: 52.51651, + longitude: 13.381936 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + geometry: { + type: 'Point', + coordinates: [ + 13.38194, + 52.51651 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38178, + 52.51643 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37888, + 52.51623 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37831, + 52.51609 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37768, + 52.51576 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37714, + 52.51313 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37669, + 52.51024 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.3767, + 52.50949 + ] + } + }, + { + type: 'Feature', + properties: { + type: 'stop', + id: '900000100020', + name: 'S+U Potsdamer Platz', + location: { + type: 'location', + id: '900100020', + latitude: 52.509337, + longitude: 13.376452 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: false, + ferry: false, + express: false, + regional: true + } + }, + geometry: { + type: 'Point', + coordinates: [ + 13.37645, + 52.50934 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37686, + 52.50873 + ] + } + }, + { + type: 'Feature', + properties: { + type: 'stop', + id: '900000012101', + name: 'S Anhalter Bahnhof', + location: { + type: 'location', + id: '900012101', + latitude: 52.504537, + longitude: 13.38208 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + geometry: { + type: 'Point', + coordinates: [ + 13.38208, + 52.50454 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.38181, + 52.5046 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37956, + 52.50099 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37902, + 52.50004 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37814, + 52.49942 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37639, + 52.4987 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37493, + 52.49795 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37338, + 52.49679 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37287, + 52.49597 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37242, + 52.49468 + ] + } + }, + { + type: 'Feature', + properties: { + type: 'stop', + id: '900000058103', + name: 'S+U Yorckstr. S2 S25 S26 U7', + location: { + type: 'location', + id: '900058103', + latitude: 52.49232, + longitude: 13.372227 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + geometry: { + type: 'Point', + coordinates: [ + 13.37223, + 52.49232 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37207, + 52.49233 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37186, + 52.48857 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.37121, + 52.48667 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.36503, + 52.47612 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.36524, + 52.476 + ] + } + }, + { + type: 'Feature', + properties: { + type: 'stop', + id: '900000058101', + name: 'S Südkreuz', + location: { + type: 'location', + id: '900058101', + latitude: 52.475465, + longitude: 13.365575 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: true, + regional: true + } + }, + geometry: { + type: 'Point', + coordinates: [ + 13.36558, + 52.47547 + ] + } + } + ] + }, + tripId: '1|32794|20|86|18082019', + line: { + type: 'line', + id: 's2', + fahrtNr: '14825', + name: 'S2', + public: true, + mode: 'train', + product: 'suburban', + operator: { + type: 'operator', + id: 's-bahn-berlin-gmbh', + name: 'S-Bahn Berlin GmbH' + }, + symbol: 'S', + nr: 2, + metro: false, + express: false, + night: false + }, + direction: 'S Blankenfelde (TF)', + arrivalPlatform: '1', + departurePlatform: '1', + stopovers: [{ + stop: { + type: 'stop', + id: '900000100007', + name: 'S Oranienburger Str.', + location: { + type: 'location', + id: '900100007', + latitude: 52.525158, + longitude: 13.393064 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-18T14:16:00+02:00', + departureDelay: 0, + departurePlatform: '1' + }, + { + stop: { + type: 'stop', + id: '900000100001', + name: 'S+U Friedrichstr.', + location: { + type: 'location', + id: '900100001', + latitude: 52.520268, + longitude: 13.387149 + }, + products: { + suburban: true, + subway: true, + tram: true, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + arrival: '2019-08-18T14:18:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '11', + departure: '2019-08-18T14:18:00+02:00', + departureDelay: 0, + departurePlatform: '11' + }, + { + stop: { + type: 'stop', + id: '900000100025', + name: 'S+U Brandenburger Tor', + location: { + type: 'location', + id: '900100025', + latitude: 52.51651, + longitude: 13.381936 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-18T14:19:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '1', + departure: '2019-08-18T14:20:00+02:00', + departureDelay: 0, + departurePlatform: '1' + }, + { + stop: { + type: 'stop', + id: '900000100020', + name: 'S+U Potsdamer Platz', + location: { + type: 'location', + id: '900100020', + latitude: 52.509337, + longitude: 13.376452 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: false, + ferry: false, + express: false, + regional: true + } + }, + arrival: '2019-08-18T14:21:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '11', + departure: '2019-08-18T14:22:00+02:00', + departureDelay: 0, + departurePlatform: '11' + }, + { + stop: { + type: 'stop', + id: '900000012101', + name: 'S Anhalter Bahnhof', + location: { + type: 'location', + id: '900012101', + latitude: 52.504537, + longitude: 13.38208 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-18T14:24:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '2', + departure: '2019-08-18T14:24:00+02:00', + departureDelay: 0, + departurePlatform: '2' + }, + { + stop: { + type: 'stop', + id: '900000058103', + name: 'S+U Yorckstr. S2 S25 S26 U7', + location: { + type: 'location', + id: '900058103', + latitude: 52.49232, + longitude: 13.372227 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-18T14:26:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '1', + departure: '2019-08-18T14:27:00+02:00', + departureDelay: 0, + departurePlatform: '1' + }, + { + stop: { + type: 'stop', + id: '900000058101', + name: 'S Südkreuz', + location: { + type: 'location', + id: '900058101', + latitude: 52.475465, + longitude: 13.365575 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: true, + regional: true + } + }, + arrival: '2019-08-18T14:29:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '1', + departure: null, + departureDelay: null, + departurePlatform: null + }], + remarks: [ + { + type: 'hint', + code: 'bf', + text: 'barrier-free' + }, + { + type: 'hint', + code: 'FB', + text: 'Bicycle conveyance' + } + ], + cycle: { + min: 300, + max: 600, + nr: 19 + } + }], + refreshToken: '¶HKI¶G@F$A=4@O=Berlin, Bodemuseum@X=13395231@Y=52521769@L=900980968@a=128@$A=1@O=S Oranienburger Str. (Berlin)@L=900100007@a=128@$201908181406$201908181416$$$1$§T$A=1@O=S Oranienburger Str. (Berlin)@L=900100007@a=128@$A=1@O=S Südkreuz Bhf (Berlin)@L=900058101@a=128@$201908181416$201908181429$ S2$$1$¶GP¶ft@0@2000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§bt@0@2000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§tf@$f@$f@$f@$f@$f@$§', + cycle: { + min: 300 + }, + scheduledDays: { + '2019-01-01': true, + '2019-01-02': true, + '2019-01-03': true, + '2019-01-04': true, + '2019-01-05': true, + '2019-01-06': true, + '2019-01-07': true, + '2019-01-08': true, + '2019-01-09': true, + '2019-01-10': true, + '2019-01-11': true, + '2019-01-12': true, + '2019-01-13': true, + '2019-01-14': true, + '2019-01-15': true, + '2019-01-16': true, + '2019-01-17': true, + '2019-01-18': true, + '2019-01-19': true, + '2019-01-20': true, + '2019-01-21': true, + '2019-01-22': true, + '2019-01-23': true, + '2019-01-24': true, + '2019-01-25': true, + '2019-01-26': true, + '2019-01-27': true, + '2019-01-28': true, + '2019-01-29': true, + '2019-01-30': true, + '2019-01-31': true, + '2019-02-01': true, + '2019-02-02': true, + '2019-02-03': true, + '2019-02-04': true, + '2019-02-05': true, + '2019-02-06': true, + '2019-02-07': true, + '2019-02-08': true, + '2019-02-09': true, + '2019-02-10': true, + '2019-02-11': true, + '2019-02-12': true, + '2019-02-13': true, + '2019-02-14': true, + '2019-02-15': true, + '2019-02-16': true, + '2019-02-17': true, + '2019-02-18': true, + '2019-02-19': true, + '2019-02-20': true, + '2019-02-21': true, + '2019-02-22': true, + '2019-02-23': true, + '2019-02-24': true, + '2019-02-25': true, + '2019-02-26': true, + '2019-02-27': true, + '2019-02-28': true, + '2019-03-01': true, + '2019-03-02': true, + '2019-03-03': true, + '2019-03-04': true, + '2019-03-05': true, + '2019-03-06': true, + '2019-03-07': true, + '2019-03-08': true, + '2019-03-09': true, + '2019-03-10': true, + '2019-03-11': true, + '2019-03-12': true, + '2019-03-13': true, + '2019-03-14': true, + '2019-03-15': true, + '2019-03-16': true, + '2019-03-17': true, + '2019-03-18': true, + '2019-03-19': true, + '2019-03-20': false, + '2019-03-21': false, + '2019-03-22': false, + '2019-03-23': false, + '2019-03-24': false, + '2019-03-25': false, + '2019-03-26': false, + '2019-03-27': false, + '2019-03-28': false, + '2019-03-29': false, + '2019-03-30': false, + '2019-03-31': false, + '2019-04-01': false, + '2019-04-02': false, + '2019-04-03': false, + '2019-04-04': false, + '2019-04-05': false, + '2019-04-06': false, + '2019-04-07': false, + '2019-04-08': false, + '2019-04-09': false, + '2019-04-10': false, + '2019-04-11': false, + '2019-04-12': false, + '2019-04-13': false, + '2019-04-14': false, + '2019-04-15': false, + '2019-04-16': false, + '2019-04-17': false, + '2019-04-18': false, + '2019-04-19': false, + '2019-04-20': false, + '2019-04-21': false, + '2019-04-22': false, + '2019-04-23': false, + '2019-04-24': false, + '2019-04-25': false, + '2019-04-26': false, + '2019-04-27': false, + '2019-04-28': false, + '2019-04-29': false, + '2019-04-30': false, + '2019-05-01': false, + '2019-05-02': false, + '2019-05-03': false, + '2019-05-04': false, + '2019-05-05': false, + '2019-05-06': true, + '2019-05-07': false, + '2019-05-08': false + } +} diff --git a/test/fixtures/bvg-journey.json b/test/fixtures/bvg-journey.json new file mode 100644 index 00000000..2bf827f1 --- /dev/null +++ b/test/fixtures/bvg-journey.json @@ -0,0 +1,1233 @@ +{ + "common": { + "locL": [ + { + "lid": "A=4@O=Berlin, Bodemuseum@X=13395231@Y=52521769@U=104@L=900980968@", + "type": "P", + "name": "Berlin, Bodemuseum", + "icoX": 0, + "extId": "900980968", + "state": "F", + "crd": { + "x": 13395231, + "y": 52521769, + "layerX": 0, + "crdSysX": 0 + } + }, + { + "lid": "A=1@O=S Südkreuz Bhf (Berlin)@X=13365575@Y=52475465@U=86@L=900058101@", + "type": "S", + "name": "S Südkreuz Bhf (Berlin)", + "icoX": 1, + "extId": "900058101", + "state": "F", + "crd": { + "x": 13365575, + "y": 52475465, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 105 + }, + { + "lid": "A=1@O=S Oranienburger Str. (Berlin)@X=13393064@Y=52525158@U=86@L=900100007@", + "type": "S", + "name": "S Oranienburger Str. (Berlin)", + "icoX": 1, + "extId": "900100007", + "state": "F", + "crd": { + "x": 13393064, + "y": 52525158, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 5 + }, + { + "lid": "A=1@O=S+U Friedrichstr. Bhf (Berlin)@X=13387149@Y=52520268@U=86@L=900100001@", + "type": "S", + "name": "S+U Friedrichstr. Bhf (Berlin)", + "icoX": 1, + "extId": "900100001", + "state": "F", + "crd": { + "x": 13387149, + "y": 52520268, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 79 + }, + { + "lid": "A=1@O=S+U Brandenburger Tor (Berlin)@X=13381936@Y=52516510@U=86@L=900100025@", + "type": "S", + "name": "S+U Brandenburger Tor (Berlin)", + "icoX": 1, + "extId": "900100025", + "state": "F", + "crd": { + "x": 13381936, + "y": 52516510, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 11 + }, + { + "lid": "A=1@O=S+U Potsdamer Platz Bhf (Berlin)@X=13376452@Y=52509337@U=86@L=900100020@", + "type": "S", + "name": "S+U Potsdamer Platz Bhf (Berlin)", + "icoX": 1, + "extId": "900100020", + "state": "F", + "crd": { + "x": 13376452, + "y": 52509337, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 65 + }, + { + "lid": "A=1@O=S Anhalter Bahnhof (Berlin)@X=13382080@Y=52504537@U=86@L=900012101@", + "type": "S", + "name": "S Anhalter Bahnhof (Berlin)", + "icoX": 1, + "extId": "900012101", + "state": "F", + "crd": { + "x": 13382080, + "y": 52504537, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 9 + }, + { + "lid": "A=1@O=S+U Yorckstr. S2 S25 S26 U7 (Berlin)@X=13372227@Y=52492320@U=86@L=900058103@", + "type": "S", + "name": "S+U Yorckstr. S2 S25 S26 U7 (Berlin)", + "icoX": 1, + "extId": "900058103", + "state": "F", + "crd": { + "x": 13372227, + "y": 52492320, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 9 + } + ], + "prodL": [ + { + "name": "Walk", + "icoX": 2 + }, + { + "name": "S2", + "nameS": "S2", + "number": "S2", + "icoX": 1, + "cls": 1, + "oprX": 0, + "prodCtx": { + "name": " S2", + "num": "14825", + "line": "S2", + "matchId": "2073", + "catOut": "S ", + "catOutS": "S-5", + "catOutL": "S ", + "catIn": "S-5", + "catCode": "0", + "admin": "DBS---" + } + }, + { + "name": "S2", + "nameS": "S2", + "number": "S2", + "icoX": 1, + "cls": 1, + "oprX": 1, + "prodCtx": { + "name": " S2", + "num": "14825", + "line": "S2", + "matchId": "2073", + "catOut": "S ", + "catOutS": "S-5", + "catOutL": "S ", + "catIn": "S-5", + "catCode": "0", + "admin": "DBS---" + } + } + ], + "polyL": [ + { + "delta": true, + "dim": 2, + "crdEncYX": "gyq_IsyvpA??nMbGfCpHh@xHh@fC`AjB`DxD`A_C??k@~CtCbExJ{@nA`@jBhBr@hBNxAJxK??N^f@bQZpB`A|BlOjB`QxAtCA\\p@xBqAdYs_@??Kt@pU`M|DjBzBnDnC|ItCbHfFtHbDdB`GxAvMd@??A^nVh@zJ`C|`Are@Vi@hBcA", + "crdEncS": "NNNNLNKNNNNNNLNKNNNKNKNLLMNNNNNKNMKNNLNNNMNNNNN", + "crdEncF": "???????????????????????????????????????????????", + "ppLocRefL": [ + { + "ppIdx": 0, + "locX": 2 + }, + { + "ppIdx": 8, + "locX": 3 + }, + { + "ppIdx": 17, + "locX": 4 + }, + { + "ppIdx": 26, + "locX": 5 + }, + { + "ppIdx": 28, + "locX": 6 + }, + { + "ppIdx": 39, + "locX": 7 + }, + { + "ppIdx": 46, + "locX": 1 + } + ] + } + ], + "layerL": [ + { + "id": "standard", + "name": "standard", + "index": 0, + "annoCnt": 0 + } + ], + "crdSysL": [ + { + "id": "standard", + "index": 0, + "type": "WGS84" + } + ], + "opL": [ + { + "name": "S-Bahn Berlin GmbH", + "icoX": 3 + }, + { + "name": "S-Bahn Berlin GmbH", + "icoX": 3, + "id": "S-Bahn Berlin GmbH" + } + ], + "remL": [ + { + "type": "A", + "code": "bf", + "prio": 2, + "icoX": 4, + "txtN": "barrier-free" + }, + { + "type": "A", + "code": "FB", + "prio": 350, + "icoX": 5, + "txtN": "Bicycle conveyance" + } + ], + "icoL": [ + { + "res": "POI" + }, + { + "res": "prod_comm_t" + }, + { + "res": "prod_walk", + "fg": { + "r": 255, + "g": 255, + "b": 255 + }, + "bg": { + "r": 238, + "g": 211, + "b": 21 + } + }, + { + "res": "DBS", + "txt": "S-Bahn Berlin GmbH" + }, + { + "res": "attr_info" + }, + { + "res": "attr_bike" + } + ] + }, + "outConL": [ + { + "cid": "C-0", + "date": "20190818", + "dur": "002300", + "chg": 0, + "sDays": { + "sDaysR": "daily", + "sDaysI": "not 28. Oct until 13. Dec 2019", + "sDaysB": "FFFFFFFFFFFFFFFFFFFC000000000004" + }, + "dep": { + "locX": 0, + "dInR": true, + "dTimeS": "140600", + "type": "N" + }, + "arr": { + "locX": 1, + "idx": 19, + "aPlatfS": "1", + "aPlatfR": "1", + "aOutR": true, + "aTimeS": "142900", + "aTimeR": "142900", + "aProgType": "PROGNOSED", + "type": "N" + }, + "secL": [ + { + "type": "WALK", + "icoX": 2, + "dep": { + "locX": 0, + "dInR": true, + "dTimeS": "140600", + "type": "N" + }, + "arr": { + "locX": 2, + "aOutR": true, + "aTimeS": "141600", + "type": "N" + }, + "gis": { + "dist": 568, + "durS": "001000", + "ctx": "G|1|G@F|A=4@O=Berlin, Bodemuseum@X=13395231@Y=52521769@U=104@L=900980968@|A=1@O=S Oranienburger Str. (Berlin)@X=13393064@Y=52525158@U=86@L=900100007@|18082019|140600|141600|bf|ft@0@2000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§bt@0@2000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§tf@$f@$f@$f@$f@$f@$§|", + "gisPrvr": "E", + "getDescr": true, + "getPoly": true + } + }, + { + "type": "JNY", + "icoX": 1, + "dep": { + "locX": 2, + "idx": 13, + "dProdX": 1, + "dPlatfS": "1", + "dPlatfR": "1", + "dInR": true, + "dTimeS": "141600", + "dTimeR": "141600", + "dProgType": "PROGNOSED", + "type": "N" + }, + "arr": { + "locX": 1, + "idx": 19, + "aPlatfS": "1", + "aPlatfR": "1", + "aOutR": true, + "aTimeS": "142900", + "aTimeR": "142900", + "aProgType": "PROGNOSED", + "type": "N" + }, + "jny": { + "jid": "1|32794|20|86|18082019", + "prodX": 2, + "dirTxt": "S Blankenfelde (TF) Bhf", + "status": "P", + "isRchbl": true, + "stopL": [ + { + "locX": 2, + "idx": 13, + "dProdX": 2, + "dPlatfS": "1", + "dPlatfR": "1", + "dInR": true, + "dTimeS": "141600", + "dTimeR": "141600", + "dProgType": "PROGNOSED", + "dDirTxt": "S Blankenfelde (TF) Bhf", + "dDirFlg": "2", + "type": "N" + }, + { + "locX": 3, + "idx": 14, + "aProdX": 2, + "aPlatfS": "11", + "aPlatfR": "11", + "aOutR": true, + "aTimeS": "141800", + "aTimeR": "141800", + "aProgType": "PROGNOSED", + "dProdX": 2, + "dPlatfS": "11", + "dPlatfR": "11", + "dInR": true, + "dTimeS": "141800", + "dTimeR": "141800", + "dProgType": "PROGNOSED", + "type": "N" + }, + { + "locX": 4, + "idx": 15, + "aProdX": 2, + "aPlatfS": "1", + "aPlatfR": "1", + "aOutR": true, + "aTimeS": "141900", + "aTimeR": "141900", + "aProgType": "PROGNOSED", + "dProdX": 2, + "dPlatfS": "1", + "dPlatfR": "1", + "dInR": true, + "dTimeS": "142000", + "dTimeR": "142000", + "dProgType": "PROGNOSED", + "type": "N" + }, + { + "locX": 5, + "idx": 16, + "aProdX": 2, + "aPlatfS": "11", + "aPlatfR": "11", + "aOutR": true, + "aTimeS": "142100", + "aTimeR": "142100", + "aProgType": "PROGNOSED", + "dProdX": 2, + "dPlatfS": "11", + "dPlatfR": "11", + "dInR": true, + "dTimeS": "142200", + "dTimeR": "142200", + "dProgType": "PROGNOSED", + "type": "N" + }, + { + "locX": 6, + "idx": 17, + "aProdX": 2, + "aPlatfS": "2", + "aPlatfR": "2", + "aOutR": true, + "aTimeS": "142400", + "aTimeR": "142400", + "aProgType": "PROGNOSED", + "dProdX": 2, + "dPlatfS": "2", + "dPlatfR": "2", + "dInR": true, + "dTimeS": "142400", + "dTimeR": "142400", + "dProgType": "PROGNOSED", + "type": "N" + }, + { + "locX": 7, + "idx": 18, + "aProdX": 2, + "aPlatfS": "1", + "aPlatfR": "1", + "aOutR": true, + "aTimeS": "142600", + "aTimeR": "142600", + "aProgType": "PROGNOSED", + "dProdX": 2, + "dPlatfS": "1", + "dPlatfR": "1", + "dInR": true, + "dTimeS": "142700", + "dTimeR": "142700", + "dProgType": "PROGNOSED", + "type": "N" + }, + { + "locX": 1, + "idx": 19, + "aProdX": 2, + "aPlatfS": "1", + "aPlatfR": "1", + "aOutR": true, + "aTimeS": "142900", + "aTimeR": "142900", + "aProgType": "PROGNOSED", + "type": "N" + } + ], + "polyG": { + "polyXL": [ + 0 + ], + "layerX": 0, + "crdSysX": 0 + }, + "freq": { + "minC": 5, + "maxC": 10, + "numC": 19 + }, + "ctxRecon": "T$A=1@O=S Oranienburger Str. (Berlin)@L=900100007@a=128@$A=1@O=S Südkreuz Bhf (Berlin)@L=900058101@a=128@$201908181416$201908181429$ S2$$1$", + "msgL": [ + { + "type": "REM", + "remX": 0, + "fLocX": 2, + "tLocX": 1, + "tagL": [ + "RES_JNY_DTL_H3" + ] + }, + { + "type": "REM", + "remX": 1, + "fLocX": 2, + "tLocX": 1, + "tagL": [ + "RES_JNY_DTL" + ] + } + ], + "subscr": "F", + "prodL": [ + { + "prodX": 2, + "fLocX": 2, + "tLocX": 1, + "fIdx": 13, + "tIdx": 19 + } + ] + } + } + ], + "ctxRecon": "¶HKI¶G@F$A=4@O=Berlin, Bodemuseum@X=13395231@Y=52521769@L=900980968@a=128@$A=1@O=S Oranienburger Str. (Berlin)@L=900100007@a=128@$201908181406$201908181416$$$1$§T$A=1@O=S Oranienburger Str. (Berlin)@L=900100007@a=128@$A=1@O=S Südkreuz Bhf (Berlin)@L=900058101@a=128@$201908181416$201908181429$ S2$$1$¶GP¶ft@0@2000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§bt@0@2000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§tf@$f@$f@$f@$f@$f@$§", + "freq": { + "minC": 5 + }, + "trfRes": { + "fareSetL": [ + { + "desc": "Tickets für die Verbindung S Oranienburger Str. (Berlin) (5555) - S Südkreuz Bhf (Berlin) (5555)", + "fareL": [ + { + "name": "Berlin Tarifgebiet A-B: Einzelfahrausweis", + "ticketL": [ + { + "name": "Regeltarif", + "prc": 280, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "MC0=" + } + } + }, + { + "name": "Ermäßigungstarif", + "prc": 170, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "MS0=" + } + } + }, + { + "name": "Fahrrad", + "prc": 190, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "Mi0=" + } + } + } + ] + }, + { + "name": "Berlin Tarifgebiet A-B: Tageskarte", + "ticketL": [ + { + "name": "Regeltarif", + "prc": 700, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "My0=" + } + } + }, + { + "name": "Ermäßigungstarif", + "prc": 470, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "NC0=" + } + } + }, + { + "name": "Fahrrad", + "prc": 480, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "NS0=" + } + } + } + ] + }, + { + "name": "Berlin Tarifgebiet A-B: Kleingruppen-", + "ticketL": [ + { + "name": "Tageskarte", + "prc": 1990, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "Ni0=" + } + } + } + ] + }, + { + "name": "Berlin Tarifgebiet A-B: Gruppentageskarte", + "ticketL": [ + { + "name": "Schüler", + "prc": 330, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "Ny0=" + } + } + } + ] + }, + { + "name": "Berlin Tarifgebiet A-B: 4-Fahrten-Karte", + "ticketL": [ + { + "name": "Regeltarif", + "prc": 900, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "OC0=" + } + } + }, + { + "name": "Ermäßigungstarif", + "prc": 560, + "cur": "EUR", + "extCont": { + "content": { + "type": "LIB_TARIFF", + "content": "OS0=" + } + } + } + ] + } + ] + } + ], + "bkgData": { + "common": { + "FEL": [ + { + "ID": [ + "900100007" + ], + "ON": [ + "S Oranienburger Str. (Berlin)" + ] + }, + { + "ID": [ + "" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "Einzelfahrausweis Regeltarif" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "Einzelfahrausweis Ermäßigungstarif" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "Einzelfahrausweis Fahrrad" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "Tageskarte Regeltarif" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "Tageskarte Ermäßigungstarif" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "Tageskarte Fahrrad" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "Kleingruppen- Tageskarte" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "Gruppentageskarte Schüler" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "4-Fahrten-Karte Regeltarif" + ] + }, + { + "ID": [ + "Berlin Tarifgebiet A-B" + ] + }, + { + "ID": [ + "4-Fahrten-Karte Ermäßigungstarif" + ] + } + ] + }, + "BOG": { + "BOL": [ + { + "P": "0-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 280 + }, + "PRD": 3, + "LVL": 2, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "1-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 170 + }, + "PRD": 5, + "LVL": 4, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "2-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 190 + }, + "PRD": 7, + "LVL": 6, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "3-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 700 + }, + "PRD": 9, + "LVL": 8, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "4-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 470 + }, + "PRD": 11, + "LVL": 10, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "5-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 480 + }, + "PRD": 13, + "LVL": 12, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "6-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 1990 + }, + "PRD": 15, + "LVL": 14, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "7-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 330 + }, + "PRD": 17, + "LVL": 16, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "8-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 900 + }, + "PRD": 19, + "LVL": 18, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + }, + { + "P": "9-", + "VT": "BVG-2", + "FS": "VBB", + "DV": 1, + "PRC": { + "CUR": "EUR", + "AMT": 560 + }, + "PRD": 21, + "LVL": 20, + "SV": { + "OS": 0 + }, + "TV": { + "BD": "20190818", + "BT": "141600" + } + } + ], + "OPT": false, + "ALT": true, + "SEQ": false + } + } + }, + "ovwTrfRefL": [ + { + "type": "T", + "fareSetX": 0, + "fareX": 0, + "ticketX": 0 + }, + { + "type": "T", + "fareSetX": 0, + "fareX": 0, + "ticketX": 1 + } + ], + "conSubscr": "U", + "recState": "U", + "cksum": "fb41d706_3", + "cksumDti": "d7a28dcc_3" + } + ], + "outCtxScrB": "1|OB|MT#11#13806#13806#13829#13829#0#0#165#13806#1#-2147483638#0#1#2|PDH#a420b7483aaf6af6ac22c06958a33a13|RD#18082019|RT#140618", + "outCtxScrF": "1|OF|MT#11#13806#13806#13829#13829#0#0#165#13806#1#-2147483638#0#1#2|PDH#a420b7483aaf6af6ac22c06958a33a13|RD#18082019|RT#140618", + "retCtxScrF": "1|OF|MT#11#13806#13806#13829#13829#0#0#165#13806#1#-2147483638#0#1#2|PDH#a420b7483aaf6af6ac22c06958a33a13|RD#18082019|RT#140618", + "fpB": "20190811", + "fpE": "20191214", + "planrtTS": "1566129966", + "outConGrpL": [ + { + "name": "Local public transport", + "grpid": "pt_only", + "conScoringL": [ + { + "type": "DT", + "conScoreL": [ + { + "score": 9175318980626219000, + "conRefL": [ + 0 + ] + } + ], + "name": "Departure" + }, + { + "type": "AT", + "conScoreL": [ + { + "score": 9175217825556464000, + "conRefL": [ + 0 + ] + } + ], + "name": "Arrival" + }, + { + "type": "TI", + "conScoreL": [ + { + "score": 9223270858871538000, + "conRefL": [ + 0 + ] + } + ], + "name": "Duration" + } + ], + "initScoringType": "DT", + "requests": [ + { + "id": "OEV", + "autosend": true + }, + { + "id": "BERLKOENIG", + "autosend": true + } + ], + "scrollable": true + }, + { + "name": "Car", + "grpid": "car_only", + "conScoringL": [ + { + "type": "DT", + "name": "Departure" + }, + { + "type": "AT", + "name": "Arrival" + }, + { + "type": "TI", + "name": "Duration" + } + ], + "initScoringType": "DT", + "requests": [ + { + "id": "CAR", + "autosend": false + }, + { + "id": "TAXI", + "autosend": false + } + ], + "scrollable": false + }, + { + "name": "Bike", + "grpid": "bike_only", + "conScoringL": [ + { + "type": "DT", + "name": "Departure" + }, + { + "type": "AT", + "name": "Arrival" + }, + { + "type": "TI", + "name": "Duration" + } + ], + "initScoringType": "DT", + "requests": [ + { + "id": "BIKE", + "autosend": false + } + ], + "scrollable": false + }, + { + "name": "Walk", + "grpid": "foot_only", + "conScoringL": [ + { + "type": "DT", + "name": "Departure" + }, + { + "type": "AT", + "name": "Arrival" + }, + { + "type": "TI", + "name": "Duration" + } + ], + "initScoringType": "DT", + "requests": [ + { + "id": "WALK", + "autosend": false + } + ], + "scrollable": false + }, + { + "name": "Car & Local public transport", + "grpid": "car_ride", + "conScoringL": [ + { + "type": "DT", + "name": "Departure" + }, + { + "type": "AT", + "name": "Arrival" + }, + { + "type": "TI", + "name": "Duration" + } + ], + "initScoringType": "DT", + "requests": [ + { + "id": "CAR_OEV_WALK", + "autosend": false + }, + { + "id": "TAXI_OEV_TAXI", + "autosend": false + }, + { + "id": "WALK_OEV_TAXI", + "autosend": false + }, + { + "id": "TAXI_OEV_WALK", + "autosend": false + } + ], + "scrollable": false + }, + { + "name": "Bicycle & Local public transport", + "grpid": "bike_ride", + "conScoringL": [ + { + "type": "DT", + "name": "Departure" + }, + { + "type": "AT", + "name": "Arrival" + }, + { + "type": "TI", + "name": "Duration" + } + ], + "initScoringType": "DT", + "requests": [ + { + "id": "BIKE_OEV_WALK", + "autosend": false + }, + { + "id": "BIKE_OEV_BIKE", + "autosend": false + } + ], + "scrollable": false + } + ] +} diff --git a/test/fixtures/bvg-radar.js b/test/fixtures/bvg-radar.js new file mode 100644 index 00000000..f07cbbc1 --- /dev/null +++ b/test/fixtures/bvg-radar.js @@ -0,0 +1,2884 @@ +'use strict' + +module.exports = [ + { + direction: 'Hohenschönhausen, Zingster Str.', + tripId: '1|57637|1|86|19082019', + line: { + type: 'line', + id: 'm4', + fahrtNr: null, + name: 'M4', + public: true, + mode: 'train', + product: 'tram', + symbol: 'M', + nr: 4, + metro: true, + express: false, + night: false + }, + location: { + type: 'location', + latitude: 52.52211, + longitude: 13.414728 + }, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T20:26:00+02:00', + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:30:00+02:00', + arrivalDelay: 60, + arrivalPlatform: null, + departure: '2019-08-19T20:30:00+02:00', + departureDelay: 60, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:34:00+02:00', + arrivalDelay: 180, + arrivalPlatform: null, + departure: '2019-08-19T20:34:00+02:00', + departureDelay: 180, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000151003', + name: 'Zingster Str.', + location: { + type: 'location', + id: '900151003', + latitude: 52.57236, + longitude: 13.495164 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T21:01:00+02:00', + arrivalDelay: 180, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ], + frames: [ + { + origin: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 0 + }, + { + origin: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 10000 + }, + { + origin: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 20000 + }, + { + origin: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 30000 + } + ], + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41473, + 52.52211 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.4149, + 52.52222 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41507, + 52.52234 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.4151, + 52.52236 + ] + } + } + ] + } + }, + { + direction: 'S Spandau', + tripId: '1|35835|39|86|19082019', + line: { + type: 'line', + id: 's9', + fahrtNr: null, + name: 'S9', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 9, + metro: false, + express: false, + night: false + }, + location: { + type: 'location', + latitude: 52.521877, + longitude: 13.410899 + }, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000260005', + name: 'S Flughafen Berlin-Schönefeld', + location: { + type: 'location', + id: '900260005', + latitude: 52.390796, + longitude: 13.51352 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T19:57:00+02:00', + departureDelay: 0, + departurePlatform: '13' + }, + { + stop: { + type: 'stop', + id: '900000100003', + name: 'S+U Alexanderplatz', + location: { + type: 'location', + id: '900100003', + latitude: 52.521508, + longitude: 13.411267 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + arrival: '2019-08-19T20:32:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '4', + departure: '2019-08-19T20:33:00+02:00', + departureDelay: 0, + departurePlatform: '4' + }, + { + stop: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:34:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '4', + departure: '2019-08-19T20:35:00+02:00', + departureDelay: 0, + departurePlatform: '4' + }, + { + stop: { + type: 'stop', + id: '900000029101', + name: 'S Spandau', + location: { + type: 'location', + id: '900029101', + latitude: 52.534794, + longitude: 13.197477 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: false, + ferry: false, + express: true, + regional: true + } + }, + arrival: '2019-08-19T21:07:00+02:00', + arrivalDelay: 0, + arrivalPlatform: '2', + departure: null, + departureDelay: null, + departurePlatform: null + } + ], + frames: [ + { + origin: { + type: 'stop', + id: '900000100003', + name: 'S+U Alexanderplatz', + location: { + type: 'location', + id: '900100003', + latitude: 52.521508, + longitude: 13.411267 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + destination: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 0 + }, + { + origin: { + type: 'stop', + id: '900000100003', + name: 'S+U Alexanderplatz', + location: { + type: 'location', + id: '900100003', + latitude: 52.521508, + longitude: 13.411267 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + destination: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 10000 + }, + { + origin: { + type: 'stop', + id: '900000100003', + name: 'S+U Alexanderplatz', + location: { + type: 'location', + id: '900100003', + latitude: 52.521508, + longitude: 13.411267 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + destination: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 20000 + }, + { + origin: { + type: 'stop', + id: '900000100003', + name: 'S+U Alexanderplatz', + location: { + type: 'location', + id: '900100003', + latitude: 52.521508, + longitude: 13.411267 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + destination: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 30000 + } + ], + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.4109, + 52.52188 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.40921, + 52.52268 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.40738, + 52.5233 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.40532, + 52.52338 + ] + } + } + ] + } + }, + { + direction: 'S+U Hermannstr.', + tripId: '1|31029|0|86|19082019', + line: { + type: 'line', + id: 'u8', + fahrtNr: null, + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + location: { + type: 'location', + latitude: 52.52096, + longitude: 13.412652 + }, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000085104', + name: 'U Paracelsus-Bad', + location: { + type: 'location', + id: '900085104', + latitude: 52.574536, + longitude: 13.347534 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T20:17:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100705', + name: 'S+U Alexanderplatz [U8]', + location: { + type: 'location', + id: '900100705', + latitude: 52.521616, + longitude: 13.412121 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:33:00+02:00', + arrivalDelay: 0, + arrivalPlatform: null, + departure: '2019-08-19T20:33:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:35:00+02:00', + arrivalDelay: 0, + arrivalPlatform: null, + departure: '2019-08-19T20:35:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000079221', + name: 'S+U Hermannstr.', + location: { + type: 'location', + id: '900079221', + latitude: 52.467177, + longitude: 13.4317 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:47:00+02:00', + arrivalDelay: 0, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ], + frames: [ + { + origin: { + type: 'stop', + id: '900000100705', + name: 'S+U Alexanderplatz [U8]', + location: { + type: 'location', + id: '900100705', + latitude: 52.521616, + longitude: 13.412121 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 0 + }, + { + origin: { + type: 'stop', + id: '900000100705', + name: 'S+U Alexanderplatz [U8]', + location: { + type: 'location', + id: '900100705', + latitude: 52.521616, + longitude: 13.412121 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 10000 + }, + { + origin: { + type: 'stop', + id: '900000100705', + name: 'S+U Alexanderplatz [U8]', + location: { + type: 'location', + id: '900100705', + latitude: 52.521616, + longitude: 13.412121 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 20000 + }, + { + origin: { + type: 'stop', + id: '900000100705', + name: 'S+U Alexanderplatz [U8]', + location: { + type: 'location', + id: '900100705', + latitude: 52.521616, + longitude: 13.412121 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 30000 + } + ], + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41265, + 52.52096 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41286, + 52.5208 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41352, + 52.52026 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41423, + 52.51976 + ] + } + } + ] + } + }, + { + direction: 'S+U Alexanderplatz', + tripId: '1|30336|6|86|19082019', + line: { + type: 'line', + id: 'u5', + fahrtNr: null, + name: 'U5', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 5, + metro: false, + express: false, + night: false + }, + location: { + type: 'location', + latitude: 52.522182, + longitude: 13.415394 + }, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000175004', + name: 'U Kaulsdorf-Nord', + location: { + type: 'location', + id: '900175004', + latitude: 52.521436, + longitude: 13.588759 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T20:08:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100017', + name: 'U Schillingstr.', + location: { + type: 'location', + id: '900100017', + latitude: 52.520313, + longitude: 13.421893 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:31:00+02:00', + arrivalDelay: -60, + arrivalPlatform: null, + departure: '2019-08-19T20:31:00+02:00', + departureDelay: -60, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100704', + name: 'S+U Alexanderplatz [U5]', + location: { + type: 'location', + id: '900100704', + latitude: 52.521607, + longitude: 13.41311 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:34:00+02:00', + arrivalDelay: 0, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100704', + name: 'S+U Alexanderplatz [U5]', + location: { + type: 'location', + id: '900100704', + latitude: 52.521607, + longitude: 13.41311 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:34:00+02:00', + arrivalDelay: 0, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ], + frames: [ + { + origin: { + type: 'stop', + id: '900000100017', + name: 'U Schillingstr.', + location: { + type: 'location', + id: '900100017', + latitude: 52.520313, + longitude: 13.421893 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100704', + name: 'S+U Alexanderplatz [U5]', + location: { + type: 'location', + id: '900100704', + latitude: 52.521607, + longitude: 13.41311 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 0 + }, + { + origin: { + type: 'stop', + id: '900000100017', + name: 'U Schillingstr.', + location: { + type: 'location', + id: '900100017', + latitude: 52.520313, + longitude: 13.421893 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100704', + name: 'S+U Alexanderplatz [U5]', + location: { + type: 'location', + id: '900100704', + latitude: 52.521607, + longitude: 13.41311 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 10000 + }, + { + origin: { + type: 'stop', + id: '900000100017', + name: 'U Schillingstr.', + location: { + type: 'location', + id: '900100017', + latitude: 52.520313, + longitude: 13.421893 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100704', + name: 'S+U Alexanderplatz [U5]', + location: { + type: 'location', + id: '900100704', + latitude: 52.521607, + longitude: 13.41311 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 20000 + }, + { + origin: { + type: 'stop', + id: '900000100017', + name: 'U Schillingstr.', + location: { + type: 'location', + id: '900100017', + latitude: 52.520313, + longitude: 13.421893 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100704', + name: 'S+U Alexanderplatz [U5]', + location: { + type: 'location', + id: '900100704', + latitude: 52.521607, + longitude: 13.41311 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 30000 + } + ], + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41539, + 52.52218 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41487, + 52.52201 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41439, + 52.5218 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41389, + 52.52159 + ] + } + } + ] + } + }, + { + direction: 'S+U Pankow', + tripId: '1|30095|5|86|19082019', + line: { + type: 'line', + id: 'u2', + fahrtNr: null, + name: 'U2', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 2, + metro: false, + express: false, + night: false + }, + location: { + type: 'location', + latitude: 52.520043, + longitude: 13.413506 + }, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000026201', + name: 'U Theodor-Heuss-Platz', + location: { + type: 'location', + id: '900026201', + latitude: 52.509795, + longitude: 13.272977 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T20:04:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100015', + name: 'U Klosterstr.', + location: { + type: 'location', + id: '900100015', + latitude: 52.517229, + longitude: 13.412454 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:32:00+02:00', + arrivalDelay: 60, + arrivalPlatform: null, + departure: '2019-08-19T20:32:00+02:00', + departureDelay: 60, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100703', + name: 'S+U Alexanderplatz [U2]', + location: { + type: 'location', + id: '900100703', + latitude: 52.522075, + longitude: 13.413596 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:34:00+02:00', + arrivalDelay: 60, + arrivalPlatform: null, + departure: '2019-08-19T20:34:00+02:00', + departureDelay: 60, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000130002', + name: 'S+U Pankow', + location: { + type: 'location', + id: '900130002', + latitude: 52.567281, + longitude: 13.412283 + }, + products: { + suburban: true, + subway: true, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:46:00+02:00', + arrivalDelay: 60, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ], + frames: [ + { + origin: { + type: 'stop', + id: '900000100015', + name: 'U Klosterstr.', + location: { + type: 'location', + id: '900100015', + latitude: 52.517229, + longitude: 13.412454 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100703', + name: 'S+U Alexanderplatz [U2]', + location: { + type: 'location', + id: '900100703', + latitude: 52.522075, + longitude: 13.413596 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 0 + }, + { + origin: { + type: 'stop', + id: '900000100015', + name: 'U Klosterstr.', + location: { + type: 'location', + id: '900100015', + latitude: 52.517229, + longitude: 13.412454 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100703', + name: 'S+U Alexanderplatz [U2]', + location: { + type: 'location', + id: '900100703', + latitude: 52.522075, + longitude: 13.413596 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 10000 + }, + { + origin: { + type: 'stop', + id: '900000100015', + name: 'U Klosterstr.', + location: { + type: 'location', + id: '900100015', + latitude: 52.517229, + longitude: 13.412454 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100703', + name: 'S+U Alexanderplatz [U2]', + location: { + type: 'location', + id: '900100703', + latitude: 52.522075, + longitude: 13.413596 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 20000 + }, + { + origin: { + type: 'stop', + id: '900000100015', + name: 'U Klosterstr.', + location: { + type: 'location', + id: '900100015', + latitude: 52.517229, + longitude: 13.412454 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100703', + name: 'S+U Alexanderplatz [U2]', + location: { + type: 'location', + id: '900100703', + latitude: 52.522075, + longitude: 13.413596 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 30000 + } + ], + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41351, + 52.52005 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41429, + 52.52035 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41473, + 52.52084 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41453, + 52.52139 + ] + } + } + ] + } + }, + { + direction: 'Hellersdorf, Riesaer Str.', + tripId: '1|29455|8|86|19082019', + line: { + type: 'line', + id: 'm6', + fahrtNr: null, + name: 'M6', + public: true, + mode: 'train', + product: 'tram', + symbol: 'M', + nr: 6, + metro: true, + express: false, + night: false + }, + location: { + type: 'location', + latitude: 52.522353, + longitude: 13.415097 + }, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T20:25:00+02:00', + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:33:00+02:00', + arrivalDelay: 180, + arrivalPlatform: null, + departure: '2019-08-19T20:33:00+02:00', + departureDelay: 180, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:36:00+02:00', + arrivalDelay: 180, + arrivalPlatform: null, + departure: '2019-08-19T20:36:00+02:00', + departureDelay: 180, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000175013', + name: 'Riesaer Str.', + location: { + type: 'location', + id: '900175013', + latitude: 52.529401, + longitude: 13.624186 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T21:22:00+02:00', + arrivalDelay: 180, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ], + frames: [ + { + origin: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 0 + }, + { + origin: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 10000 + }, + { + origin: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 20000 + }, + { + origin: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 30000 + } + ], + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.4151, + 52.52236 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41513, + 52.52238 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41541, + 52.52263 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41569, + 52.52286 + ] + } + } + ] + } + }, + { + direction: 'S Hackescher Markt', + tripId: '1|29362|4|86|19082019', + line: { + type: 'line', + id: 'm6', + fahrtNr: null, + name: 'M6', + public: true, + mode: 'train', + product: 'tram', + symbol: 'M', + nr: 6, + metro: true, + express: false, + night: false + }, + location: { + type: 'location', + latitude: 52.521283, + longitude: 13.411034 + }, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000175013', + name: 'Riesaer Str.', + location: { + type: 'location', + id: '900175013', + latitude: 52.529401, + longitude: 13.624186 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T19:39:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:33:00+02:00', + arrivalDelay: 180, + arrivalPlatform: null, + departure: '2019-08-19T20:33:00+02:00', + departureDelay: 180, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100515', + name: 'Spandauer Str./Marienkirche', + location: { + type: 'location', + id: '900100515', + latitude: 52.520025, + longitude: 13.404822 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:35:00+02:00', + arrivalDelay: 180, + arrivalPlatform: null, + departure: '2019-08-19T20:35:00+02:00', + departureDelay: 180, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:36:00+02:00', + arrivalDelay: 180, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ], + frames: [ + { + origin: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100515', + name: 'Spandauer Str./Marienkirche', + location: { + type: 'location', + id: '900100515', + latitude: 52.520025, + longitude: 13.404822 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 0 + }, + { + origin: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100515', + name: 'Spandauer Str./Marienkirche', + location: { + type: 'location', + id: '900100515', + latitude: 52.520025, + longitude: 13.404822 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 10000 + }, + { + origin: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100515', + name: 'Spandauer Str./Marienkirche', + location: { + type: 'location', + id: '900100515', + latitude: 52.520025, + longitude: 13.404822 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 20000 + }, + { + origin: { + type: 'stop', + id: '900000100026', + name: 'S+U Alexanderplatz/Gontardstr.', + location: { + type: 'location', + id: '900100026', + latitude: 52.521059, + longitude: 13.41125 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100515', + name: 'Spandauer Str./Marienkirche', + location: { + type: 'location', + id: '900100515', + latitude: 52.520025, + longitude: 13.404822 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + t: 30000 + } + ], + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41103, + 52.52129 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41057, + 52.52157 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41001, + 52.52191 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.40943, + 52.52221 + ] + } + } + ] + } + }, + { + direction: 'S+U Hauptbahnhof', + tripId: '1|29174|2|86|19082019', + line: { + type: 'line', + id: 'm5', + fahrtNr: null, + name: 'M5', + public: true, + mode: 'train', + product: 'tram', + symbol: 'M', + nr: 5, + metro: true, + express: false, + night: false + }, + location: { + type: 'location', + latitude: 52.52389, + longitude: 13.416814 + }, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000151003', + name: 'Zingster Str.', + location: { + type: 'location', + id: '900151003', + latitude: 52.57236, + longitude: 13.495164 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T19:59:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:32:00+02:00', + arrivalDelay: 120, + arrivalPlatform: null, + departure: '2019-08-19T20:32:00+02:00', + departureDelay: 120, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:34:00+02:00', + arrivalDelay: 60, + arrivalPlatform: null, + departure: '2019-08-19T20:34:00+02:00', + departureDelay: 60, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000003259', + name: 'Lüneburger Str.', + location: { + type: 'location', + id: '900003259', + latitude: 52.523315, + longitude: 13.36207 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:55:00+02:00', + arrivalDelay: 60, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ], + frames: [ + { + origin: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 0 + }, + { + origin: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 10000 + }, + { + origin: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 20000 + }, + { + origin: { + type: 'stop', + id: '900000100040', + name: 'Mollstr./Otto-Braun-Str.', + location: { + type: 'location', + id: '900100040', + latitude: 52.525185, + longitude: 13.419942 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + destination: { + type: 'stop', + id: '900000100005', + name: 'U Alexanderplatz [Tram]', + location: { + type: 'location', + id: '900100005', + latitude: 52.522389, + longitude: 13.414495 + }, + products: { + suburban: false, + subway: false, + tram: true, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + t: 30000 + } + ], + polyline: { + type: 'FeatureCollection', + features: [ + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41681, + 52.52389 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41628, + 52.52345 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41574, + 52.52301 + ] + } + }, + { + type: 'Feature', + properties: {}, + geometry: { + type: 'Point', + coordinates: [ + 13.41521, + 52.52257 + ] + } + } + ] + } + } +] diff --git a/test/fixtures/bvg-radar.json b/test/fixtures/bvg-radar.json new file mode 100644 index 00000000..9a767aec --- /dev/null +++ b/test/fixtures/bvg-radar.json @@ -0,0 +1,1332 @@ +{ + "common": { + "locL": [ + { + "lid": "A=1@O=S Hackescher Markt (Berlin)@X=13402359@Y=52522605@U=86@L=900100002@", + "type": "S", + "name": "S Hackescher Markt (Berlin)", + "icoX": 1, + "extId": "900100002", + "state": "F", + "crd": { + "x": 13402359, + "y": 52522605, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 13 + }, + { + "lid": "A=1@O=S+U Alexanderplatz Bhf/Gontardstr. (Berlin)@X=13411250@Y=52521059@U=86@L=900100026@", + "type": "S", + "name": "S+U Alexanderplatz Bhf/Gontardstr. (Berlin)", + "icoX": 0, + "extId": "900100026", + "state": "F", + "crd": { + "x": 13411250, + "y": 52521059, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 4 + }, + { + "lid": "A=1@O=U Alexanderplatz (Berlin) [Tram]@X=13414495@Y=52522389@U=86@L=900100005@", + "type": "S", + "name": "U Alexanderplatz (Berlin) [Tram]", + "icoX": 0, + "extId": "900100005", + "state": "F", + "crd": { + "x": 13414495, + "y": 52522389, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 4 + }, + { + "lid": "A=1@O=Zingster Str. (Berlin)@X=13495164@Y=52572360@U=86@L=900151003@", + "type": "S", + "name": "Zingster Str. (Berlin)", + "icoX": 0, + "extId": "900151003", + "state": "F", + "crd": { + "x": 13495164, + "y": 52572360, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 4 + }, + { + "lid": "A=1@O=S Flughafen Berlin-Schönefeld Bhf@X=13513520@Y=52390796@U=86@L=900260005@", + "type": "S", + "name": "S Flughafen Berlin-Schönefeld Bhf", + "icoX": 1, + "extId": "900260005", + "state": "F", + "crd": { + "x": 13513520, + "y": 52390796, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 73 + }, + { + "lid": "A=1@O=S+U Alexanderplatz Bhf (Berlin)@X=13411267@Y=52521508@U=86@L=900100003@", + "type": "S", + "name": "S+U Alexanderplatz Bhf (Berlin)", + "icoX": 1, + "extId": "900100003", + "state": "F", + "crd": { + "x": 13411267, + "y": 52521508, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 73 + }, + { + "lid": "A=1@O=S Spandau Bhf (Berlin)@X=13197477@Y=52534794@U=86@L=900029101@", + "type": "S", + "name": "S Spandau Bhf (Berlin)", + "icoX": 1, + "extId": "900029101", + "state": "F", + "crd": { + "x": 13197477, + "y": 52534794, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 97 + }, + { + "lid": "A=1@O=U Paracelsus-Bad (Berlin)@X=13347534@Y=52574536@U=86@L=900085104@", + "type": "S", + "name": "U Paracelsus-Bad (Berlin)", + "icoX": 2, + "extId": "900085104", + "state": "F", + "crd": { + "x": 13347534, + "y": 52574536, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=S+U Alexanderplatz (Berlin) [U8]@X=13412121@Y=52521616@U=86@L=900100705@", + "type": "S", + "name": "S+U Alexanderplatz (Berlin) [U8]", + "icoX": 2, + "extId": "900100705", + "state": "F", + "crd": { + "x": 13412121, + "y": 52521616, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 2 + }, + { + "lid": "A=1@O=S+U Jannowitzbrücke (Berlin)@X=13418027@Y=52515503@U=86@L=900100004@", + "type": "S", + "name": "S+U Jannowitzbrücke (Berlin)", + "icoX": 1, + "extId": "900100004", + "state": "F", + "crd": { + "x": 13418027, + "y": 52515503, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 11 + }, + { + "lid": "A=1@O=S+U Hermannstr. (Berlin)@X=13431700@Y=52467177@U=86@L=900079221@", + "type": "S", + "name": "S+U Hermannstr. (Berlin)", + "icoX": 1, + "extId": "900079221", + "state": "F", + "crd": { + "x": 13431700, + "y": 52467177, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 11 + }, + { + "lid": "A=1@O=U Kaulsdorf-Nord (Berlin)@X=13588759@Y=52521436@U=86@L=900175004@", + "type": "S", + "name": "U Kaulsdorf-Nord (Berlin)", + "icoX": 2, + "extId": "900175004", + "state": "F", + "crd": { + "x": 13588759, + "y": 52521436, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Schillingstr. (Berlin)@X=13421893@Y=52520313@U=86@L=900100017@", + "type": "S", + "name": "U Schillingstr. (Berlin)", + "icoX": 2, + "extId": "900100017", + "state": "F", + "crd": { + "x": 13421893, + "y": 52520313, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=S+U Alexanderplatz (Berlin) [U5]@X=13413110@Y=52521607@U=86@L=900100704@", + "type": "S", + "name": "S+U Alexanderplatz (Berlin) [U5]", + "icoX": 2, + "extId": "900100704", + "state": "F", + "crd": { + "x": 13413110, + "y": 52521607, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 2 + }, + { + "lid": "A=1@O=U Theodor-Heuss-Platz (Berlin)@X=13272977@Y=52509795@U=86@L=900026201@", + "type": "S", + "name": "U Theodor-Heuss-Platz (Berlin)", + "icoX": 2, + "extId": "900026201", + "state": "F", + "crd": { + "x": 13272977, + "y": 52509795, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Klosterstr. (Berlin)@X=13412454@Y=52517229@U=86@L=900100015@", + "type": "S", + "name": "U Klosterstr. (Berlin)", + "icoX": 2, + "extId": "900100015", + "state": "F", + "crd": { + "x": 13412454, + "y": 52517229, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 2 + }, + { + "lid": "A=1@O=S+U Alexanderplatz (Berlin) [U2]@X=13413596@Y=52522075@U=86@L=900100703@", + "type": "S", + "name": "S+U Alexanderplatz (Berlin) [U2]", + "icoX": 2, + "extId": "900100703", + "state": "F", + "crd": { + "x": 13413596, + "y": 52522075, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 2 + }, + { + "lid": "A=1@O=S+U Pankow (Berlin)@X=13412283@Y=52567281@U=86@L=900130002@", + "type": "S", + "name": "S+U Pankow (Berlin)", + "icoX": 1, + "extId": "900130002", + "state": "F", + "crd": { + "x": 13412283, + "y": 52567281, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 15 + }, + { + "lid": "A=1@O=Mollstr./Otto-Braun-Str. (Berlin)@X=13419942@Y=52525185@U=86@L=900100040@", + "type": "S", + "name": "Mollstr./Otto-Braun-Str. (Berlin)", + "icoX": 0, + "extId": "900100040", + "state": "F", + "crd": { + "x": 13419942, + "y": 52525185, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 12 + }, + { + "lid": "A=1@O=Riesaer Str. (Berlin)@X=13624186@Y=52529401@U=86@L=900175013@", + "type": "S", + "name": "Riesaer Str. (Berlin)", + "icoX": 0, + "extId": "900175013", + "state": "F", + "crd": { + "x": 13624186, + "y": 52529401, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 12 + }, + { + "lid": "A=1@O=Spandauer Str./Marienkirche (Berlin)@X=13404822@Y=52520025@U=86@L=900100515@", + "type": "S", + "name": "Spandauer Str./Marienkirche (Berlin)", + "icoX": 0, + "extId": "900100515", + "state": "F", + "crd": { + "x": 13404822, + "y": 52520025, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 12 + }, + { + "lid": "A=1@O=Lüneburger Str. (Berlin)@X=13361647@Y=52523135@U=86@L=900003259@", + "type": "S", + "name": "Lüneburger Str. (Berlin)", + "icoX": 3, + "extId": "900003259", + "state": "F", + "crd": { + "x": 13362070, + "y": 52523315, + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 4 + } + ], + "prodL": [ + { + "name": "M4", + "nameS": "M4", + "icoX": 0, + "cls": 4 + }, + { + "name": "S9", + "nameS": "S9", + "icoX": 1, + "cls": 1 + }, + { + "name": "U8", + "nameS": "U8", + "icoX": 2, + "cls": 2 + }, + { + "name": "U5", + "nameS": "U5", + "icoX": 2, + "cls": 2 + }, + { + "name": "U2", + "nameS": "U2", + "icoX": 2, + "cls": 2 + }, + { + "name": "M6", + "nameS": "M6", + "icoX": 0, + "cls": 4 + }, + { + "name": "M5", + "nameS": "M5", + "icoX": 0, + "cls": 4 + } + ], + "polyL": [ + { + "delta": true, + "dim": 2, + "crdEncYX": "efq_Iaa{pAUa@Wa@CE", + "crdEncS": "NNNN", + "crdEncF": "????" + }, + { + "delta": true, + "dim": 2, + "crdEncYX": "wdq_IcizpA_DpI{BlJOzK", + "crdEncS": "NNNN", + "crdEncF": "????" + }, + { + "delta": true, + "dim": 2, + "crdEncYX": "__q_IatzpA^i@jBcCbBmC", + "crdEncS": "NNNN", + "crdEncF": "????" + }, + { + "delta": true, + "dim": 2, + "crdEncYX": "sfq_Iee{pA`@fBh@~Ah@bB", + "crdEncS": "NNNN", + "crdEncF": "????" + }, + { + "delta": true, + "dim": 2, + "crdEncYX": "iyp_ImyzpA{@{CaBwAmBf@", + "crdEncS": "NNNN", + "crdEncF": "????" + }, + { + "delta": true, + "dim": 2, + "crdEncYX": "wgq_Ikc{pACEq@w@m@w@", + "crdEncS": "NNNN", + "crdEncF": "????" + }, + { + "delta": true, + "dim": 2, + "crdEncYX": "aaq_I}izpAw@zAcAnB{@rB", + "crdEncS": "NNNN", + "crdEncF": "????" + }, + { + "delta": true, + "dim": 2, + "crdEncYX": "iqq_Ian{pAvAhBvAjBvAhB", + "crdEncS": "NNNN", + "crdEncF": "????" + } + ], + "layerL": [ + { + "id": "standard", + "name": "standard", + "index": 0, + "annoCnt": 0 + } + ], + "crdSysL": [ + { + "id": "standard", + "index": 0, + "type": "WGS84" + } + ], + "opL": [], + "remL": [], + "icoL": [ + { + "res": "prod_tram_t" + }, + { + "res": "prod_comm_t" + }, + { + "res": "prod_sub_t" + }, + { + "res": "STA" + } + ] + }, + "date": "20190819", + "time": "203304", + "jnyL": [ + { + "jid": "1|57637|1|86|19082019", + "date": "20190819", + "prodX": 0, + "dirTxt": "Hohenschönhausen, Zingster Str.", + "dirGeo": 3, + "stopL": [ + { + "locX": 0, + "dInS": true, + "dInR": true, + "dTimeS": "202600" + }, + { + "locX": 1, + "aOutS": true, + "aOutR": true, + "aTimeS": "202900", + "aTimeR": "203000", + "dInS": true, + "dInR": true, + "dTimeS": "202900", + "dTimeR": "203000" + }, + { + "locX": 2, + "aOutS": true, + "aOutR": true, + "aTimeS": "203100", + "aTimeR": "203400", + "dInS": true, + "dInR": true, + "dTimeS": "203100", + "dTimeR": "203400" + }, + { + "locX": 3, + "aOutS": true, + "aOutR": true, + "aTimeS": "205800", + "aTimeR": "210100" + } + ], + "proc": 80, + "pos": { + "x": 13414728, + "y": 52522110 + }, + "ani": { + "mSec": [ + 0, + 10000, + 20000, + 30000 + ], + "proc": [ + 80, + 84, + 88, + 93 + ], + "procAbs": [ + 280, + 284, + 288, + 293 + ], + "fLocX": [ + 1, + 1, + 1, + 1 + ], + "tLocX": [ + 2, + 2, + 2, + 2 + ], + "dirGeo": [ + 4, + 4, + 5, + -1 + ], + "stcOutputX": [ + -1, + -1, + -1, + -1 + ], + "polyG": { + "polyXL": [ + 0 + ] + }, + "state": [ + "O", + "O", + "O", + "O" + ] + }, + "isBase": false + }, + { + "jid": "1|35835|39|86|19082019", + "date": "20190819", + "prodX": 1, + "dirTxt": "S Spandau Bhf (Berlin)", + "dirGeo": 14, + "stopL": [ + { + "locX": 4, + "dPlatfS": "13", + "dPlatfR": "13", + "dInS": true, + "dInR": true, + "dTimeS": "195700", + "dTimeR": "195700" + }, + { + "locX": 5, + "aPlatfS": "4", + "aPlatfR": "4", + "aOutS": true, + "aOutR": true, + "aTimeS": "203200", + "aTimeR": "203200", + "dPlatfS": "4", + "dPlatfR": "4", + "dInS": true, + "dInR": true, + "dTimeS": "203300", + "dTimeR": "203300" + }, + { + "locX": 0, + "aPlatfS": "4", + "aPlatfR": "4", + "aOutS": true, + "aOutR": true, + "aTimeS": "203400", + "aTimeR": "203400", + "dPlatfS": "4", + "dPlatfR": "4", + "dInS": true, + "dInR": true, + "dTimeS": "203500", + "dTimeR": "203500" + }, + { + "locX": 6, + "aPlatfS": "2", + "aPlatfR": "2", + "aOutS": true, + "aOutR": true, + "aTimeS": "210700", + "aTimeR": "210700" + } + ], + "proc": 8, + "pos": { + "x": 13410899, + "y": 52521877 + }, + "ani": { + "mSec": [ + 0, + 10000, + 20000, + 30000 + ], + "proc": [ + 8, + 28, + 47, + 68 + ], + "procAbs": [ + 1208, + 1228, + 1247, + 1268 + ], + "fLocX": [ + 5, + 5, + 5, + 5 + ], + "tLocX": [ + 0, + 0, + 0, + 0 + ], + "dirGeo": [ + 12, + 13, + 15, + 17 + ], + "stcOutputX": [ + -1, + -1, + -1, + -1 + ], + "polyG": { + "polyXL": [ + 1 + ] + }, + "state": [ + "O", + "O", + "O", + "O" + ] + }, + "isBase": false + }, + { + "jid": "1|31029|0|86|19082019", + "date": "20190819", + "prodX": 2, + "dirTxt": "S+U Hermannstr. (Berlin)", + "dirGeo": 26, + "stopL": [ + { + "locX": 7, + "dInS": true, + "dInR": true, + "dTimeS": "201700", + "dTimeR": "201700" + }, + { + "locX": 8, + "aOutS": true, + "aOutR": true, + "aTimeS": "203300", + "aTimeR": "203300", + "dInS": true, + "dInR": true, + "dTimeS": "203300", + "dTimeR": "203300" + }, + { + "locX": 9, + "aOutS": true, + "aOutR": true, + "aTimeS": "203500", + "aTimeR": "203500", + "dInS": true, + "dInR": true, + "dTimeS": "203500", + "dTimeR": "203500" + }, + { + "locX": 10, + "aOutS": true, + "aOutR": true, + "aTimeS": "204700", + "aTimeR": "204700" + } + ], + "proc": 3, + "pos": { + "x": 13412652, + "y": 52520960 + }, + "ani": { + "mSec": [ + 0, + 10000, + 20000, + 30000 + ], + "proc": [ + 3, + 12, + 21, + 30 + ], + "procAbs": [ + 1003, + 1012, + 1021, + 1030 + ], + "fLocX": [ + 8, + 8, + 8, + 8 + ], + "tLocX": [ + 9, + 9, + 9, + 9 + ], + "dirGeo": [ + 27, + 27, + 27, + 27 + ], + "stcOutputX": [ + -1, + -1, + -1, + -1 + ], + "polyG": { + "polyXL": [ + 2 + ] + }, + "state": [ + "O", + "O", + "O", + "O" + ] + }, + "isBase": false + }, + { + "jid": "1|30336|6|86|19082019", + "date": "20190819", + "prodX": 3, + "dirTxt": "S+U Alexanderplatz", + "dirGeo": 14, + "stopL": [ + { + "locX": 11, + "dInS": true, + "dInR": true, + "dTimeS": "200800", + "dTimeR": "200800" + }, + { + "locX": 12, + "aOutS": true, + "aOutR": true, + "aTimeS": "203200", + "aTimeR": "203100", + "dInS": true, + "dInR": true, + "dTimeS": "203200", + "dTimeR": "203100" + }, + { + "locX": 13, + "aOutS": true, + "aOutR": true, + "aTimeS": "203400", + "aTimeR": "203400" + }, + { + "locX": 13, + "aOutS": true, + "aOutR": true, + "aTimeS": "203400", + "aTimeR": "203400" + } + ], + "proc": 72, + "pos": { + "x": 13415394, + "y": 52522182 + }, + "ani": { + "mSec": [ + 0, + 10000, + 20000, + 30000 + ], + "proc": [ + 72, + 78, + 84, + 90 + ], + "procAbs": [ + 1372, + 1378, + 1384, + 1390 + ], + "fLocX": [ + 12, + 12, + 12, + 12 + ], + "tLocX": [ + 13, + 13, + 13, + 13 + ], + "dirGeo": [ + 18, + 19, + 19, + 19 + ], + "stcOutputX": [ + -1, + -1, + -1, + -1 + ], + "polyG": { + "polyXL": [ + 3 + ] + }, + "state": [ + "O", + "O", + "O", + "O" + ] + }, + "isBase": false + }, + { + "jid": "1|30095|5|86|19082019", + "date": "20190819", + "prodX": 4, + "dirTxt": "S+U Pankow (Berlin)", + "dirGeo": 7, + "stopL": [ + { + "locX": 14, + "dInS": true, + "dInR": true, + "dTimeS": "200400", + "dTimeR": "200400" + }, + { + "locX": 15, + "aOutS": true, + "aOutR": true, + "aTimeS": "203100", + "aTimeR": "203200", + "dInS": true, + "dInR": true, + "dTimeS": "203100", + "dTimeR": "203200" + }, + { + "locX": 16, + "aOutS": true, + "aOutR": true, + "aTimeS": "203300", + "aTimeR": "203400", + "dInS": true, + "dInR": true, + "dTimeS": "203300", + "dTimeR": "203400" + }, + { + "locX": 17, + "aOutS": true, + "aOutR": true, + "aTimeS": "204500", + "aTimeR": "204600" + } + ], + "proc": 58, + "pos": { + "x": 13413506, + "y": 52520043 + }, + "ani": { + "mSec": [ + 0, + 10000, + 20000, + 30000 + ], + "proc": [ + 58, + 67, + 76, + 85 + ], + "procAbs": [ + 1858, + 1867, + 1876, + 1885 + ], + "fLocX": [ + 15, + 15, + 15, + 15 + ], + "tLocX": [ + 16, + 16, + 16, + 16 + ], + "dirGeo": [ + 2, + 5, + 9, + 10 + ], + "stcOutputX": [ + -1, + -1, + -1, + -1 + ], + "polyG": { + "polyXL": [ + 4 + ] + }, + "state": [ + "O", + "O", + "O", + "O" + ] + }, + "isBase": false + }, + { + "jid": "1|29455|8|86|19082019", + "date": "20190819", + "prodX": 5, + "dirTxt": "Hellersdorf, Riesaer Str.", + "dirGeo": 3, + "stopL": [ + { + "locX": 0, + "dInS": true, + "dInR": true, + "dTimeS": "202500" + }, + { + "locX": 2, + "aOutS": true, + "aOutR": true, + "aTimeS": "203000", + "aTimeR": "203300", + "dInS": true, + "dInR": true, + "dTimeS": "203000", + "dTimeR": "203300" + }, + { + "locX": 18, + "aOutS": true, + "aOutR": true, + "aTimeS": "203300", + "aTimeR": "203600", + "dInS": true, + "dInR": true, + "dTimeS": "203300", + "dTimeR": "203600" + }, + { + "locX": 19, + "aOutS": true, + "aOutR": true, + "aTimeS": "211900", + "aTimeR": "212200" + } + ], + "proc": 2, + "pos": { + "x": 13415097, + "y": 52522353 + }, + "ani": { + "mSec": [ + 0, + 10000, + 20000, + 30000 + ], + "proc": [ + 2, + 8, + 14, + 20 + ], + "procAbs": [ + 302, + 308, + 314, + 320 + ], + "fLocX": [ + 2, + 2, + 2, + 2 + ], + "tLocX": [ + 18, + 18, + 18, + 18 + ], + "dirGeo": [ + 5, + 5, + 4, + 5 + ], + "stcOutputX": [ + -1, + -1, + -1, + -1 + ], + "polyG": { + "polyXL": [ + 5 + ] + }, + "state": [ + "O", + "O", + "O", + "O" + ] + }, + "isBase": false + }, + { + "jid": "1|29362|4|86|19082019", + "date": "20190819", + "prodX": 5, + "dirTxt": "S Hackescher Markt", + "dirGeo": 17, + "stopL": [ + { + "locX": 19, + "dInS": true, + "dInR": true, + "dTimeS": "193900", + "dTimeR": "193900" + }, + { + "locX": 1, + "aOutS": true, + "aOutR": true, + "aTimeS": "203000", + "aTimeR": "203300", + "dInS": true, + "dInR": true, + "dTimeS": "203000", + "dTimeR": "203300" + }, + { + "locX": 20, + "aOutS": true, + "aOutR": true, + "aTimeS": "203200", + "aTimeR": "203500", + "dInS": true, + "dInR": true, + "dTimeS": "203200", + "dTimeR": "203500" + }, + { + "locX": 0, + "aOutS": true, + "aOutR": true, + "aTimeS": "203300", + "aTimeR": "203600" + } + ], + "proc": 3, + "pos": { + "x": 13411034, + "y": 52521283 + }, + "ani": { + "mSec": [ + 0, + 10000, + 20000, + 30000 + ], + "proc": [ + 3, + 12, + 21, + 30 + ], + "procAbs": [ + 3603, + 3612, + 3621, + 3630 + ], + "fLocX": [ + 1, + 1, + 1, + 1 + ], + "tLocX": [ + 20, + 20, + 20, + 20 + ], + "dirGeo": [ + 11, + 11, + 12, + 17 + ], + "stcOutputX": [ + -1, + -1, + -1, + -1 + ], + "polyG": { + "polyXL": [ + 6 + ] + }, + "state": [ + "O", + "O", + "O", + "O" + ] + }, + "isBase": false + }, + { + "jid": "1|29174|2|86|19082019", + "date": "20190819", + "prodX": 6, + "dirTxt": "S+U Hauptbahnhof", + "dirGeo": 19, + "stopL": [ + { + "locX": 3, + "dInS": true, + "dInR": true, + "dTimeS": "195900", + "dTimeR": "195900" + }, + { + "locX": 18, + "aOutS": true, + "aOutR": true, + "aTimeS": "203000", + "aTimeR": "203200", + "dInS": true, + "dInR": true, + "dTimeS": "203000", + "dTimeR": "203200" + }, + { + "locX": 2, + "aOutS": true, + "aOutR": true, + "aTimeS": "203300", + "aTimeR": "203400", + "dInS": true, + "dInR": true, + "dTimeS": "203300", + "dTimeR": "203400" + }, + { + "locX": 21, + "aOutS": true, + "aOutR": true, + "aTimeS": "205400", + "aTimeR": "205500" + } + ], + "proc": 58, + "pos": { + "x": 13416814, + "y": 52523890 + }, + "ani": { + "mSec": [ + 0, + 10000, + 20000, + 30000 + ], + "proc": [ + 58, + 67, + 76, + 85 + ], + "procAbs": [ + 2258, + 2267, + 2276, + 2285 + ], + "fLocX": [ + 18, + 18, + 18, + 18 + ], + "tLocX": [ + 2, + 2, + 2, + 2 + ], + "dirGeo": [ + 20, + 20, + 20, + 20 + ], + "stcOutputX": [ + -1, + -1, + -1, + -1 + ], + "polyG": { + "polyXL": [ + 7 + ] + }, + "state": [ + "O", + "O", + "O", + "O" + ] + }, + "isBase": false + } + ], + "layerX": 0, + "crdSysX": 0, + "fpB": "20190811", + "fpE": "20191214", + "planrtTS": "1566239555" +} diff --git a/test/fixtures/vbb-departures.js b/test/fixtures/vbb-departures.js new file mode 100644 index 00000000..d6b536d8 --- /dev/null +++ b/test/fixtures/vbb-departures.js @@ -0,0 +1,2185 @@ +'use strict' + +module.exports = [ + { + tripId: '1|31015|8|86|19082019', + stop: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + }, + lines: [ + { + type: 'line', + id: 's3', + fahrtNr: null, + name: 'S3', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 3, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's5', + fahrtNr: null, + name: 'S5', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 5, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's7', + fahrtNr: null, + name: 'S7', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 7, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's9', + fahrtNr: null, + name: 'S9', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 9, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's75', + fahrtNr: null, + name: 'S75', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 75, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'u8', + fahrtNr: null, + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '248', + fahrtNr: null, + name: '248', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 248, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '300', + fahrtNr: null, + name: '300', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 300, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'n8', + fahrtNr: null, + name: 'N8', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 8, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n40', + fahrtNr: null, + name: 'N40', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 40, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n65', + fahrtNr: null, + name: 'N65', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 65, + metro: false, + express: false, + night: true + } + ] + }, + when: '2019-08-19T20:30:00+02:00', + direction: 'S+U Hermannstr.', + line: { + type: 'line', + id: 'u8', + fahrtNr: '19869', + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + operator: { + type: 'operator', + id: 'berliner-verkehrsbetriebe', + name: 'Berliner Verkehrsbetriebe' + }, + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + remarks: [ + { + type: 'hint', + code: 'bf', + text: 'barrier-free' + }, + { + type: 'hint', + code: 'FB', + text: 'Bicycle conveyance' + } + ], + delay: 0, + platform: null, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + }, + lines: [ + { + type: 'line', + id: 's3', + fahrtNr: null, + name: 'S3', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 3, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's5', + fahrtNr: null, + name: 'S5', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 5, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's7', + fahrtNr: null, + name: 'S7', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 7, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's9', + fahrtNr: null, + name: 'S9', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 9, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's75', + fahrtNr: null, + name: 'S75', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 75, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'u8', + fahrtNr: null, + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '248', + fahrtNr: null, + name: '248', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 248, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '300', + fahrtNr: null, + name: '300', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 300, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'n8', + fahrtNr: null, + name: 'N8', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 8, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n40', + fahrtNr: null, + name: 'N40', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 40, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n65', + fahrtNr: null, + name: 'N65', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 65, + metro: false, + express: false, + night: true + } + ] + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T20:30:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100008', + + name: 'U Heinrich-Heine-Str.', + location: { + type: 'location', + id: '900100008', + latitude: 52.510856, + longitude: 13.416167 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:31:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000013101', + name: 'U Moritzplatz', + location: { + type: 'location', + id: '900013101', + latitude: 52.503737, + longitude: 13.410944 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:33:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000013102', + name: 'U Kottbusser Tor', + location: { + type: 'location', + id: '900013102', + latitude: 52.499044, + longitude: 13.417749 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:35:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000016201', + name: 'U Schönleinstr.', + location: { + type: 'location', + id: '900016201', + latitude: 52.493183, + longitude: 13.422243 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:36:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000078101', + name: 'U Hermannplatz', + location: { + type: 'location', + id: '900078101', + latitude: 52.486954, + longitude: 13.424724 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:38:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000079202', + name: 'U Boddinstr.', + location: { + type: 'location', + id: '900079202', + latitude: 52.479744, + longitude: 13.425785 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:40:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000079201', + name: 'U Leinestr.', + location: { + type: 'location', + id: '900079201', + latitude: 52.472877, + longitude: 13.428401 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:41:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000079221', + name: 'S+U Hermannstr.', + location: { + type: 'location', + id: '900079221', + latitude: 52.467177, + longitude: 13.4317 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:42:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ] + }, + { + tripId: '1|31067|4|86|19082019', + stop: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + }, + lines: [ + { + type: 'line', + id: 's3', + fahrtNr: null, + name: 'S3', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 3, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's5', + fahrtNr: null, + name: 'S5', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 5, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's7', + fahrtNr: null, + name: 'S7', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 7, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's9', + fahrtNr: null, + name: 'S9', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 9, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's75', + fahrtNr: null, + name: 'S75', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 75, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'u8', + fahrtNr: null, + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '248', + fahrtNr: null, + name: '248', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 248, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '300', + fahrtNr: null, + name: '300', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 300, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'n8', + fahrtNr: null, + name: 'N8', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 8, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n40', + fahrtNr: null, + name: 'N40', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 40, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n65', + fahrtNr: null, + name: 'N65', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 65, + metro: false, + express: false, + night: true + } + ] + }, + when: '2019-08-19T20:30:00+02:00', + direction: 'U Paracelsus-Bad', + line: { + type: 'line', + id: 'u8', + fahrtNr: '19453', + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + operator: { + type: 'operator', + id: 'berliner-verkehrsbetriebe', + name: 'Berliner Verkehrsbetriebe' + }, + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + remarks: [ + { + type: 'hint', + code: 'bf', + text: 'barrier-free' + }, + { + type: 'hint', + code: 'FB', + text: 'Bicycle conveyance' + } + ], + delay: 0, + platform: null, + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + }, + lines: [ + { + type: 'line', + id: 's3', + fahrtNr: null, + name: 'S3', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 3, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's5', + fahrtNr: null, + name: 'S5', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 5, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's7', + fahrtNr: null, + name: 'S7', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 7, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's9', + fahrtNr: null, + name: 'S9', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 9, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's75', + fahrtNr: null, + name: 'S75', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 75, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'u8', + fahrtNr: null, + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '248', + fahrtNr: null, + name: '248', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 248, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '300', + fahrtNr: null, + name: '300', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 300, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'n8', + fahrtNr: null, + name: 'N8', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 8, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n40', + fahrtNr: null, + name: 'N40', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 40, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n65', + fahrtNr: null, + name: 'N65', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 65, + metro: false, + express: false, + night: true + } + ] + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T20:30:00+02:00', + departureDelay: 0, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100705', + name: 'S+U Alexanderplatz [U8]', + location: { + type: 'location', + id: '900100705', + latitude: 52.521616, + longitude: 13.412121 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:32:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100051', + name: 'U Weinmeisterstr.', + location: { + type: 'location', + id: '900100051', + latitude: 52.525374, + longitude: 13.405308 + }, + products: { + suburban: false, + subway: true, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:34:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100023', + name: 'U Rosenthaler Platz', + location: { + type: 'location', + id: '900100023', + latitude: 52.529778, + longitude: 13.401397 + }, + products: { + suburban: false, + subway: true, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:35:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000007110', + name: 'U Bernauer Str.', + location: { + type: 'location', + id: '900007110', + latitude: 52.537994, + longitude: 13.396229 + }, + products: { + suburban: false, + subway: true, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:37:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000007103', + name: 'U Voltastr.', + location: { + type: 'location', + id: '900007103', + latitude: 52.541932, + longitude: 13.393154 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:38:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000007102', + name: 'S+U Gesundbrunnen', + location: { + type: 'location', + id: '900007102', + latitude: 52.548638, + longitude: 13.388372 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: true, + regional: true + } + }, + arrival: '2019-08-19T20:40:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000009203', + name: 'U Pankstr.', + location: { + type: 'location', + id: '900009203', + latitude: 52.552251, + longitude: 13.381837 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:41:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000009202', + name: 'U Osloer Str.', + location: { + type: 'location', + id: '900009202', + latitude: 52.557105, + longitude: 13.373279 + }, + products: { + suburban: false, + subway: true, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:43:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000085202', + name: 'U Franz-Neumann-Platz (Am Schäfersee)', + location: { + type: 'location', + id: '900085202', + latitude: 52.563856, + longitude: 13.364281 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:45:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000085203', + name: 'U Residenzstr.', + location: { + type: 'location', + id: '900085203', + latitude: 52.570841, + longitude: 13.360631 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:46:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000085104', + name: 'U Paracelsus-Bad', + location: { + type: 'location', + id: '900085104', + latitude: 52.574536, + longitude: 13.347534 + }, + products: { + suburban: false, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:47:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ] + }, + { + tripId: '1|35835|39|86|19082019', + stop: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + }, + lines: [ + { + type: 'line', + id: 's3', + fahrtNr: null, + name: 'S3', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 3, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's5', + fahrtNr: null, + name: 'S5', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 5, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's7', + fahrtNr: null, + name: 'S7', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 7, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's9', + fahrtNr: null, + name: 'S9', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 9, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's75', + fahrtNr: null, + name: 'S75', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 75, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'u8', + fahrtNr: null, + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '248', + fahrtNr: null, + name: '248', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 248, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '300', + fahrtNr: null, + name: '300', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 300, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'n8', + fahrtNr: null, + name: 'N8', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 8, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n40', + fahrtNr: null, + name: 'N40', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 40, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n65', + fahrtNr: null, + name: 'N65', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 65, + metro: false, + express: false, + night: true + } + ] + }, + when: '2019-08-19T20:31:00+02:00', + direction: 'S Spandau', + line: { + type: 'line', + id: 's9', + fahrtNr: '27739', + name: 'S9', + public: true, + mode: 'train', + product: 'suburban', + operator: { + type: 'operator', + id: 's-bahn-berlin-gmbh', + name: 'S-Bahn Berlin GmbH' + }, + symbol: 'S', + nr: 9, + metro: false, + express: false, + night: false + }, + remarks: [ + { + type: 'hint', + code: 'bf', + text: 'barrier-free' + }, + { + type: 'hint', + code: 'FB', + text: 'Bicycle conveyance' + } + ], + delay: 0, + platform: '4', + nextStopovers: [ + { + stop: { + type: 'stop', + id: '900000100004', + name: 'S+U Jannowitzbrücke', + location: { + type: 'location', + id: '900100004', + latitude: 52.515503, + longitude: 13.418027 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + }, + lines: [ + { + type: 'line', + id: 's3', + fahrtNr: null, + name: 'S3', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 3, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's5', + fahrtNr: null, + name: 'S5', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 5, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's7', + fahrtNr: null, + name: 'S7', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 7, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's9', + fahrtNr: null, + name: 'S9', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 9, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 's75', + fahrtNr: null, + name: 'S75', + public: true, + mode: 'train', + product: 'suburban', + symbol: 'S', + nr: 75, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'u8', + fahrtNr: null, + name: 'U8', + public: true, + mode: 'train', + product: 'subway', + symbol: 'U', + nr: 8, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '248', + fahrtNr: null, + name: '248', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 248, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: '300', + fahrtNr: null, + name: '300', + public: true, + mode: 'bus', + product: 'bus', + symbol: null, + nr: 300, + metro: false, + express: false, + night: false + }, + { + type: 'line', + id: 'n8', + fahrtNr: null, + name: 'N8', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 8, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n40', + fahrtNr: null, + name: 'N40', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 40, + metro: false, + express: false, + night: true + }, + { + type: 'line', + id: 'n65', + fahrtNr: null, + name: 'N65', + public: true, + mode: 'bus', + product: 'bus', + symbol: 'N', + nr: 65, + metro: false, + express: false, + night: true + } + ] + }, + arrival: null, + arrivalDelay: null, + arrivalPlatform: null, + departure: '2019-08-19T20:31:00+02:00', + departureDelay: 0, + departurePlatform: '4' + }, + { + stop: { + type: 'stop', + id: '900000100003', + name: 'S+U Alexanderplatz', + location: { + type: 'location', + id: '900100003', + latitude: 52.521508, + longitude: 13.411267 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + arrival: '2019-08-19T20:32:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100002', + name: 'S Hackescher Markt', + location: { + type: 'location', + id: '900100002', + latitude: 52.522605, + longitude: 13.402359 + }, + products: { + suburban: true, + subway: false, + tram: true, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:34:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000100001', + name: 'S+U Friedrichstr.', + location: { + type: 'location', + id: '900100001', + latitude: 52.520268, + longitude: 13.387149 + }, + products: { + suburban: true, + subway: true, + tram: true, + bus: true, + ferry: false, + express: false, + regional: true + } + }, + arrival: '2019-08-19T20:36:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000003201', + name: 'S+U Berlin Hauptbahnhof', + location: { + type: 'location', + id: '900003201', + latitude: 52.52585, + longitude: 13.368928 + }, + products: { + suburban: true, + subway: true, + tram: true, + bus: true, + ferry: false, + express: true, + regional: true + } + }, + arrival: '2019-08-19T20:39:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000003102', + name: 'S Bellevue', + location: { + type: 'location', + id: '900003102', + latitude: 52.520016, + longitude: 13.348073 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:42:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000003103', + name: 'S Tiergarten', + location: { + type: 'location', + id: '900003103', + latitude: 52.513957, + longitude: 13.336244 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:44:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000023201', + name: 'S+U Zoologischer Garten', + location: { + type: 'location', + id: '900023201', + latitude: 52.506919, + longitude: 13.332711 + }, + products: { + suburban: true, + subway: true, + tram: false, + bus: true, + ferry: false, + express: true, + regional: true + } + }, + arrival: '2019-08-19T20:46:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000024203', + name: 'S Savignyplatz', + location: { + type: 'location', + id: '900024203', + latitude: 52.50522, + longitude: 13.319002 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:48:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000024101', + name: 'S Charlottenburg', + location: { + type: 'location', + id: '900024101', + latitude: 52.504806, + longitude: 13.303846 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: true, + regional: true + } + }, + arrival: '2019-08-19T20:50:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000024102', + name: 'S Westkreuz', + location: { + type: 'location', + id: '900024102', + latitude: 52.501148, + longitude: 13.283036 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:52:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000025423', + name: 'S Messe Süd', + location: { + type: 'location', + id: '900025423', + latitude: 52.498774, + longitude: 13.270451 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:54:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000026105', + name: 'S Heerstr.', + location: { + type: 'location', + id: '900026105', + latitude: 52.508276, + longitude: 13.258514 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:57:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000025321', + name: 'S Olympiastadion', + location: { + type: 'location', + id: '900025321', + latitude: 52.511296, + longitude: 13.24281 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T20:59:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000025424', + name: 'S Pichelsberg', + location: { + type: 'location', + id: '900025424', + latitude: 52.510263, + longitude: 13.227195 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: false, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T21:01:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000030202', + name: 'S Stresow', + location: { + type: 'location', + id: '900030202', + latitude: 52.532502, + longitude: 13.209127 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: true, + ferry: false, + express: false, + regional: false + } + }, + arrival: '2019-08-19T21:05:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + }, + { + stop: { + type: 'stop', + id: '900000029101', + name: 'S Spandau', + location: { + type: 'location', + id: '900029101', + latitude: 52.534794, + longitude: 13.197477 + }, + products: { + suburban: true, + subway: false, + tram: false, + bus: false, + ferry: false, + express: true, + regional: true + } + }, + arrival: '2019-08-19T21:07:00+02:00', + arrivalDelay: null, + arrivalPlatform: null, + departure: null, + departureDelay: null, + departurePlatform: null + } + ] + } +] diff --git a/test/fixtures/vbb-departures.json b/test/fixtures/vbb-departures.json new file mode 100644 index 00000000..e6a161ec --- /dev/null +++ b/test/fixtures/vbb-departures.json @@ -0,0 +1,1344 @@ +{ + "common": { + "locL": [ + { + "lid": "A=1@O=S+U Jannowitzbrücke (Berlin)@X=13418027@Y=52515503@U=86@L=900100004@", + "type": "S", + "name": "S+U Jannowitzbrücke (Berlin)", + "icoX": 2, + "extId": "900100004", + "state": "F", + "crd": { + "x": 13418027, + "y": 52515503, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 11, + "pRefL": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ] + }, + { + "lid": "A=1@O=S+U Hermannstr. (Berlin)@X=13431700@Y=52467177@U=86@L=900079221@", + "type": "S", + "name": "S+U Hermannstr. (Berlin)", + "icoX": 2, + "extId": "900079221", + "state": "F", + "crd": { + "x": 13431700, + "y": 52467177, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 11 + }, + { + "lid": "A=1@O=U Heinrich-Heine-Str. (Berlin)@X=13416167@Y=52510856@U=86@L=900100008@", + "type": "S", + "name": "U Heinrich-Heine-Str. (Berlin)", + "icoX": 0, + "extId": "900100008", + "state": "F", + "crd": { + "x": 13416167, + "y": 52510856, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Moritzplatz (Berlin)@X=13410944@Y=52503737@U=86@L=900013101@", + "type": "S", + "name": "U Moritzplatz (Berlin)", + "icoX": 0, + "extId": "900013101", + "state": "F", + "crd": { + "x": 13410944, + "y": 52503737, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Kottbusser Tor (Berlin)@X=13417749@Y=52499044@U=86@L=900013102@", + "type": "S", + "name": "U Kottbusser Tor (Berlin)", + "icoX": 0, + "extId": "900013102", + "state": "F", + "crd": { + "x": 13417749, + "y": 52499044, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Schönleinstr. (Berlin)@X=13422243@Y=52493183@U=86@L=900016201@", + "type": "S", + "name": "U Schönleinstr. (Berlin)", + "icoX": 0, + "extId": "900016201", + "state": "F", + "crd": { + "x": 13422243, + "y": 52493183, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Hermannplatz (Berlin)@X=13424724@Y=52486954@U=86@L=900078101@", + "type": "S", + "name": "U Hermannplatz (Berlin)", + "icoX": 0, + "extId": "900078101", + "state": "F", + "crd": { + "x": 13424724, + "y": 52486954, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 2 + }, + { + "lid": "A=1@O=U Boddinstr. (Berlin)@X=13425785@Y=52479744@U=86@L=900079202@", + "type": "S", + "name": "U Boddinstr. (Berlin)", + "icoX": 0, + "extId": "900079202", + "state": "F", + "crd": { + "x": 13425785, + "y": 52479744, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Leinestr. (Berlin)@X=13428401@Y=52472877@U=86@L=900079201@", + "type": "S", + "name": "U Leinestr. (Berlin)", + "icoX": 0, + "extId": "900079201", + "state": "F", + "crd": { + "x": 13428401, + "y": 52472877, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Paracelsus-Bad (Berlin)@X=13347534@Y=52574536@U=86@L=900085104@", + "type": "S", + "name": "U Paracelsus-Bad (Berlin)", + "icoX": 0, + "extId": "900085104", + "state": "F", + "crd": { + "x": 13347534, + "y": 52574536, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=S+U Alexanderplatz (Berlin) [U8]@X=13412121@Y=52521616@U=86@L=900100705@", + "type": "S", + "name": "S+U Alexanderplatz (Berlin) [U8]", + "icoX": 0, + "extId": "900100705", + "state": "F", + "crd": { + "x": 13412121, + "y": 52521616, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 2 + }, + { + "lid": "A=1@O=U Weinmeisterstr. (Berlin)@X=13405308@Y=52525374@U=86@L=900100051@", + "type": "S", + "name": "U Weinmeisterstr. (Berlin)", + "icoX": 0, + "extId": "900100051", + "state": "F", + "crd": { + "x": 13405308, + "y": 52525374, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 14 + }, + { + "lid": "A=1@O=U Rosenthaler Platz (Berlin)@X=13401397@Y=52529778@U=86@L=900100023@", + "type": "S", + "name": "U Rosenthaler Platz (Berlin)", + "icoX": 0, + "extId": "900100023", + "state": "F", + "crd": { + "x": 13401397, + "y": 52529778, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 14 + }, + { + "lid": "A=1@O=U Bernauer Str. (Berlin)@X=13396229@Y=52537994@U=86@L=900007110@", + "type": "S", + "name": "U Bernauer Str. (Berlin)", + "icoX": 0, + "extId": "900007110", + "state": "F", + "crd": { + "x": 13396229, + "y": 52537994, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 14 + }, + { + "lid": "A=1@O=U Voltastr. (Berlin)@X=13393154@Y=52541932@U=86@L=900007103@", + "type": "S", + "name": "U Voltastr. (Berlin)", + "icoX": 0, + "extId": "900007103", + "state": "F", + "crd": { + "x": 13393154, + "y": 52541932, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=S+U Gesundbrunnen Bhf (Berlin)@X=13388372@Y=52548638@U=86@L=900007102@", + "type": "S", + "name": "S+U Gesundbrunnen Bhf (Berlin)", + "icoX": 6, + "extId": "900007102", + "state": "F", + "crd": { + "x": 13388372, + "y": 52548638, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 107 + }, + { + "lid": "A=1@O=U Pankstr. (Berlin)@X=13381837@Y=52552251@U=86@L=900009203@", + "type": "S", + "name": "U Pankstr. (Berlin)", + "icoX": 0, + "extId": "900009203", + "state": "F", + "crd": { + "x": 13381837, + "y": 52552251, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Osloer Str. (Berlin)@X=13373279@Y=52557105@U=86@L=900009202@", + "type": "S", + "name": "U Osloer Str. (Berlin)", + "icoX": 0, + "extId": "900009202", + "state": "F", + "crd": { + "x": 13373279, + "y": 52557105, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 14 + }, + { + "lid": "A=1@O=U Franz-Neumann-Platz (Am Schäfersee) (Berlin)@X=13364281@Y=52563856@U=86@L=900085202@", + "type": "S", + "name": "U Franz-Neumann-Platz (Am Schäfersee) (Berlin)", + "icoX": 0, + "extId": "900085202", + "state": "F", + "crd": { + "x": 13364281, + "y": 52563856, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=U Residenzstr. (Berlin)@X=13360631@Y=52570841@U=86@L=900085203@", + "type": "S", + "name": "U Residenzstr. (Berlin)", + "icoX": 0, + "extId": "900085203", + "state": "F", + "crd": { + "x": 13360631, + "y": 52570841, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 10 + }, + { + "lid": "A=1@O=S Spandau Bhf (Berlin)@X=13197477@Y=52534794@U=86@L=900029101@", + "type": "S", + "name": "S Spandau Bhf (Berlin)", + "icoX": 6, + "extId": "900029101", + "state": "F", + "crd": { + "x": 13197477, + "y": 52534794, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 97 + }, + { + "lid": "A=1@O=S+U Alexanderplatz Bhf (Berlin)@X=13411267@Y=52521508@U=86@L=900100003@", + "type": "S", + "name": "S+U Alexanderplatz Bhf (Berlin)", + "icoX": 8, + "extId": "900100003", + "state": "F", + "crd": { + "x": 13411267, + "y": 52521508, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 73 + }, + { + "lid": "A=1@O=S Hackescher Markt (Berlin)@X=13402359@Y=52522605@U=86@L=900100002@", + "type": "S", + "name": "S Hackescher Markt (Berlin)", + "icoX": 2, + "extId": "900100002", + "state": "F", + "crd": { + "x": 13402359, + "y": 52522605, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 13 + }, + { + "lid": "A=1@O=S+U Friedrichstr. Bhf (Berlin)@X=13387149@Y=52520268@U=86@L=900100001@", + "type": "S", + "name": "S+U Friedrichstr. Bhf (Berlin)", + "icoX": 8, + "extId": "900100001", + "state": "F", + "crd": { + "x": 13387149, + "y": 52520268, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 79 + }, + { + "lid": "A=1@O=S+U Berlin Hauptbahnhof@X=13368928@Y=52525850@U=86@L=900003201@", + "type": "S", + "name": "S+U Berlin Hauptbahnhof", + "icoX": 6, + "extId": "900003201", + "state": "F", + "crd": { + "x": 13368928, + "y": 52525850, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 111 + }, + { + "lid": "A=1@O=S Bellevue (Berlin)@X=13347102@Y=52519953@U=86@L=900003102@", + "type": "S", + "name": "S Bellevue (Berlin)", + "icoX": 2, + "extId": "900003102", + "state": "F", + "crd": { + "x": 13348073, + "y": 52520016, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 1 + }, + { + "lid": "A=1@O=S Tiergarten (Berlin)@X=13336244@Y=52513957@U=86@L=900003103@", + "type": "S", + "name": "S Tiergarten (Berlin)", + "icoX": 2, + "extId": "900003103", + "state": "F", + "crd": { + "x": 13336244, + "y": 52513957, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 9 + }, + { + "lid": "A=1@O=S+U Zoologischer Garten Bhf (Berlin)@X=13332711@Y=52506919@U=86@L=900023201@", + "type": "S", + "name": "S+U Zoologischer Garten Bhf (Berlin)", + "icoX": 6, + "extId": "900023201", + "state": "F", + "crd": { + "x": 13332711, + "y": 52506919, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 107 + }, + { + "lid": "A=1@O=S Savignyplatz (Berlin)@X=13319002@Y=52505220@U=86@L=900024203@", + "type": "S", + "name": "S Savignyplatz (Berlin)", + "icoX": 2, + "extId": "900024203", + "state": "F", + "crd": { + "x": 13319002, + "y": 52505220, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 1 + }, + { + "lid": "A=1@O=S Charlottenburg Bhf (Berlin)@X=13303846@Y=52504806@U=86@L=900024101@", + "type": "S", + "name": "S Charlottenburg Bhf (Berlin)", + "icoX": 6, + "extId": "900024101", + "state": "F", + "crd": { + "x": 13303846, + "y": 52504806, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 105 + }, + { + "lid": "A=1@O=S Westkreuz (Berlin)@X=13283036@Y=52501148@U=86@L=900024102@", + "type": "S", + "name": "S Westkreuz (Berlin)", + "icoX": 2, + "extId": "900024102", + "state": "F", + "crd": { + "x": 13283036, + "y": 52501148, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 9 + }, + { + "lid": "A=1@O=S Messe Süd (Berlin)@X=13270451@Y=52498774@U=86@L=900025423@", + "type": "S", + "name": "S Messe Süd (Berlin)", + "icoX": 2, + "extId": "900025423", + "state": "F", + "crd": { + "x": 13270451, + "y": 52498774, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 9 + }, + { + "lid": "A=1@O=S Heerstr. (Berlin)@X=13258514@Y=52508276@U=86@L=900026105@", + "type": "S", + "name": "S Heerstr. (Berlin)", + "icoX": 2, + "extId": "900026105", + "state": "F", + "crd": { + "x": 13258514, + "y": 52508276, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 9 + }, + { + "lid": "A=1@O=S Olympiastadion (Berlin)@X=13241111@Y=52511135@U=86@L=900025321@", + "type": "S", + "name": "S Olympiastadion (Berlin)", + "icoX": 2, + "extId": "900025321", + "state": "F", + "crd": { + "x": 13242810, + "y": 52511296, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 1 + }, + { + "lid": "A=1@O=S Pichelsberg (Berlin)@X=13227195@Y=52510263@U=86@L=900025424@", + "type": "S", + "name": "S Pichelsberg (Berlin)", + "icoX": 2, + "extId": "900025424", + "state": "F", + "crd": { + "x": 13227195, + "y": 52510263, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 1 + }, + { + "lid": "A=1@O=S Stresow (Berlin)@X=13209127@Y=52532502@U=86@L=900030202@", + "type": "S", + "name": "S Stresow (Berlin)", + "icoX": 2, + "extId": "900030202", + "state": "F", + "crd": { + "x": 13209127, + "y": 52532502, + "type": "WGS84", + "layerX": 0, + "crdSysX": 0 + }, + "pCls": 9 + } + ], + "prodL": [ + { + "pid": "L::1::U::B3041857784::U_3041857784_U8::*", + "name": "U8", + "nameS": "U8", + "number": "U8", + "icoX": 0, + "cls": 2, + "oprX": 0, + "prodCtx": { + "name": " U8", + "num": "19869", + "line": "U8", + "matchId": "U8", + "catOut": "U ", + "catOutS": "U", + "catOutL": "U ", + "catIn": "U", + "catCode": "1", + "admin": "BVU---" + }, + "himIdL": [ + "HIM_FREETEXT_16107" + ] + }, + { + "name": "S3", + "nameS": "S3", + "icoX": 2, + "cls": 1, + "prodCtx": { + "lineId": "S3" + } + }, + { + "name": "S5", + "nameS": "S5", + "icoX": 2, + "cls": 1, + "prodCtx": { + "lineId": "S5" + } + }, + { + "name": "S7", + "nameS": "S7", + "icoX": 2, + "cls": 1, + "prodCtx": { + "lineId": "S7" + } + }, + { + "name": "S9", + "nameS": "S9", + "icoX": 2, + "cls": 1, + "prodCtx": { + "lineId": "S9" + } + }, + { + "name": "S75", + "nameS": "S75", + "icoX": 2, + "cls": 1, + "prodCtx": { + "lineId": "S75" + } + }, + { + "name": "U8", + "nameS": "U8", + "icoX": 0, + "cls": 2, + "prodCtx": { + "lineId": "U8" + } + }, + { + "name": "248", + "nameS": "248", + "icoX": 3, + "cls": 8, + "prodCtx": { + "lineId": "248" + } + }, + { + "name": "300", + "nameS": "300", + "icoX": 3, + "cls": 8, + "prodCtx": { + "lineId": "300" + } + }, + { + "name": "N8", + "nameS": "N8", + "icoX": 3, + "cls": 8, + "prodCtx": { + "lineId": "N8" + } + }, + { + "name": "N40", + "nameS": "N40", + "icoX": 3, + "cls": 8, + "prodCtx": { + "lineId": "N40" + } + }, + { + "name": "N65", + "nameS": "N65", + "icoX": 3, + "cls": 8, + "prodCtx": { + "lineId": "N65" + } + }, + { + "pid": "L::1::U::B3041857784::U_3041857784_U8::*", + "name": "U8", + "nameS": "U8", + "number": "U8", + "icoX": 0, + "cls": 2, + "oprX": 0, + "prodCtx": { + "name": " U8", + "num": "19453", + "line": "U8", + "matchId": "U8", + "catOut": "U ", + "catOutS": "U", + "catOutL": "U ", + "catIn": "U", + "catCode": "1", + "admin": "BVU---" + }, + "himIdL": [ + "HIM_FREETEXT_16107" + ] + }, + { + "pid": "L::0::S::B1090519025::S_1090519025_S9::*", + "name": "S9", + "nameS": "S9", + "number": "S9", + "icoX": 2, + "cls": 1, + "oprX": 1, + "prodCtx": { + "name": " S9", + "num": "27739", + "line": "S9", + "matchId": "9126", + "catOut": "S ", + "catOutS": "S-7", + "catOutL": "S ", + "catIn": "S-7", + "catCode": "0", + "admin": "DBS---" + }, + "himIdL": [ + "HIM_FREETEXT_61404", + "HIM_FREETEXT_61407", + "HIM_FREETEXT_61693", + "HIM_FREETEXT_61291", + "HIM_FREETEXT_59423", + "HIM_FREETEXT_59430", + "HIM_FREETEXT_59776", + "HIM_FREETEXT_61537", + "HIM_FREETEXT_61346", + "HIM_FREETEXT_61344", + "HIM_FREETEXT_59778", + "HIM_FREETEXT_60039", + "HIM_FREETEXT_59429", + "HIM_FREETEXT_62265" + ] + } + ], + "polyL": [], + "layerL": [ + { + "id": "standard", + "name": "standard", + "index": 0, + "annoCnt": 0 + } + ], + "crdSysL": [ + { + "id": "standard", + "index": 0, + "type": "WGS84", + "dim": 2 + } + ], + "opL": [ + { + "name": "Berliner Verkehrsbetriebe", + "icoX": 1, + "id": "Berliner Verkehrsbetriebe" + }, + { + "name": "S-Bahn Berlin GmbH", + "icoX": 7, + "id": "S-Bahn Berlin GmbH" + } + ], + "remL": [ + { + "type": "A", + "code": "bf", + "prio": 2, + "icoX": 4, + "txtN": "barrier-free" + }, + { + "type": "A", + "code": "FB", + "prio": 350, + "icoX": 5, + "txtN": "Bicycle conveyance" + } + ], + "icoL": [ + { + "res": "prod_sub_t", + "fg": { + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "bg": { + "r": 0, + "g": 51, + "b": 153, + "a": 255 + } + }, + { + "res": "BVG", + "txt": "Berliner Verkehrsbetriebe" + }, + { + "res": "prod_comm_t", + "fg": { + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "bg": { + "r": 55, + "g": 135, + "b": 74, + "a": 255 + } + }, + { + "res": "prod_bus_t", + "fg": { + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "bg": { + "r": 153, + "g": 51, + "b": 153, + "a": 255 + } + }, + { + "res": "INFO" + }, + { + "res": "attr_bike" + }, + { + "res": "prod_ic", + "fg": { + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "bg": { + "r": 125, + "g": 129, + "b": 133, + "a": 255 + } + }, + { + "res": "DBS", + "txt": "S-Bahn Berlin GmbH" + }, + { + "res": "prod_reg", + "fg": { + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "bg": { + "r": 226, + "g": 0, + "b": 25, + "a": 255 + } + } + ] + }, + "type": "DEP", + "jnyL": [ + { + "jid": "1|31015|8|86|19082019", + "date": "20190819", + "prodX": 0, + "dirTxt": "S+U Hermannstr. (Berlin)", + "status": "P", + "isRchbl": true, + "stbStop": { + "locX": 0, + "idx": 15, + "dProdX": 0, + "dInR": true, + "dTimeS": "203000", + "dTimeR": "203000", + "dProgType": "PROGNOSED", + "type": "N" + }, + "stopL": [ + { + "locX": 0, + "idx": 15, + "dInR": true, + "dTimeS": "203000", + "dTimeR": "203000", + "dProgType": "PROGNOSED", + "type": "N" + }, + { + "locX": 2, + "idx": 16, + "aOutR": true, + "aTimeS": "203100", + "type": "N" + }, + { + "locX": 3, + "idx": 17, + "aOutR": true, + "aTimeS": "203300", + "type": "N" + }, + { + "locX": 4, + "idx": 18, + "aOutR": true, + "aTimeS": "203500", + "type": "N" + }, + { + "locX": 5, + "idx": 19, + "aOutR": true, + "aTimeS": "203600", + "type": "N" + }, + { + "locX": 6, + "idx": 20, + "aOutR": true, + "aTimeS": "203800", + "type": "N" + }, + { + "locX": 7, + "idx": 21, + "aOutR": true, + "aTimeS": "204000", + "type": "N" + }, + { + "locX": 8, + "idx": 22, + "aOutR": true, + "aTimeS": "204100", + "type": "N" + }, + { + "locX": 1, + "idx": 23, + "aOutR": true, + "aTimeS": "204200", + "type": "N" + } + ], + "msgL": [ + { + "type": "REM", + "remX": 0, + "fLocX": 0, + "tLocX": 1, + "tagL": [ + "RES_JNY_DTL_H3" + ] + }, + { + "type": "REM", + "remX": 1, + "fLocX": 0, + "tLocX": 1, + "tagL": [ + "RES_JNY_DTL" + ] + } + ], + "subscr": "F" + }, + { + "jid": "1|31067|4|86|19082019", + "date": "20190819", + "prodX": 12, + "dirTxt": "U Paracelsus-Bad (Berlin)", + "status": "P", + "isRchbl": true, + "stbStop": { + "locX": 0, + "idx": 8, + "dProdX": 12, + "dInR": true, + "dTimeS": "203000", + "dTimeR": "203000", + "dProgType": "PROGNOSED", + "type": "N" + }, + "stopL": [ + { + "locX": 0, + "idx": 8, + "dInR": true, + "dTimeS": "203000", + "dTimeR": "203000", + "dProgType": "PROGNOSED", + "isImp": true, + "type": "N" + }, + { + "locX": 10, + "idx": 9, + "aOutR": true, + "aTimeS": "203200", + "isImp": true, + "type": "N" + }, + { + "locX": 11, + "idx": 10, + "aOutR": true, + "aTimeS": "203400", + "isImp": true, + "type": "N" + }, + { + "locX": 12, + "idx": 11, + "aOutR": true, + "aTimeS": "203500", + "isImp": true, + "type": "N" + }, + { + "locX": 13, + "idx": 12, + "aOutR": true, + "aTimeS": "203700", + "isImp": true, + "type": "N" + }, + { + "locX": 14, + "idx": 13, + "aOutR": true, + "aTimeS": "203800", + "type": "N" + }, + { + "locX": 15, + "idx": 14, + "aOutR": true, + "aTimeS": "204000", + "isImp": true, + "type": "N" + }, + { + "locX": 16, + "idx": 15, + "aOutR": true, + "aTimeS": "204100", + "isImp": true, + "type": "N" + }, + { + "locX": 17, + "idx": 16, + "aOutR": true, + "aTimeS": "204300", + "isImp": true, + "type": "N" + }, + { + "locX": 18, + "idx": 17, + "aOutR": true, + "aTimeS": "204500", + "type": "N" + }, + { + "locX": 19, + "idx": 18, + "aOutR": true, + "aTimeS": "204600", + "isImp": true, + "type": "N" + }, + { + "locX": 9, + "idx": 19, + "aOutR": true, + "aTimeS": "204700", + "isImp": true, + "type": "N" + } + ], + "msgL": [ + { + "type": "REM", + "remX": 0, + "fLocX": 0, + "tLocX": 9, + "tagL": [ + "RES_JNY_DTL_H3" + ] + }, + { + "type": "REM", + "remX": 1, + "fLocX": 0, + "tLocX": 9, + "tagL": [ + "RES_JNY_DTL" + ] + } + ], + "subscr": "F" + }, + { + "jid": "1|35835|39|86|19082019", + "date": "20190819", + "prodX": 13, + "dirTxt": "S Spandau Bhf (Berlin)", + "status": "P", + "isRchbl": true, + "stbStop": { + "locX": 0, + "idx": 11, + "dProdX": 13, + "dPlatfS": "4", + "dPlatfR": "4", + "dInR": true, + "dTimeS": "203100", + "dTimeR": "203100", + "dProgType": "PROGNOSED", + "type": "N" + }, + "stopL": [ + { + "locX": 0, + "idx": 11, + "dPlatfS": "4", + "dPlatfR": "4", + "dInR": true, + "dTimeS": "203100", + "dTimeR": "203100", + "dProgType": "PROGNOSED", + "isImp": true, + "type": "N" + }, + { + "locX": 21, + "idx": 12, + "aOutR": true, + "aTimeS": "203200", + "isImp": true, + "type": "N" + }, + { + "locX": 22, + "idx": 13, + "aOutR": true, + "aTimeS": "203400", + "isImp": true, + "type": "N" + }, + { + "locX": 23, + "idx": 14, + "aOutR": true, + "aTimeS": "203600", + "isImp": true, + "type": "N" + }, + { + "locX": 24, + "idx": 15, + "aOutR": true, + "aTimeS": "203900", + "isImp": true, + "type": "N" + }, + { + "locX": 25, + "idx": 16, + "aOutR": true, + "aTimeS": "204200", + "type": "N" + }, + { + "locX": 26, + "idx": 17, + "aOutR": true, + "aTimeS": "204400", + "type": "N" + }, + { + "locX": 27, + "idx": 18, + "aOutR": true, + "aTimeS": "204600", + "isImp": true, + "type": "N" + }, + { + "locX": 28, + "idx": 19, + "aOutR": true, + "aTimeS": "204800", + "type": "N" + }, + { + "locX": 29, + "idx": 20, + "aOutR": true, + "aTimeS": "205000", + "isImp": true, + "type": "N" + }, + { + "locX": 30, + "idx": 21, + "aOutR": true, + "aTimeS": "205200", + "isImp": true, + "type": "N" + }, + { + "locX": 31, + "idx": 22, + "aOutR": true, + "aTimeS": "205400", + "type": "N" + }, + { + "locX": 32, + "idx": 23, + "aOutR": true, + "aTimeS": "205700", + "isImp": true, + "type": "N" + }, + { + "locX": 33, + "idx": 24, + "aOutR": true, + "aTimeS": "205900", + "type": "N" + }, + { + "locX": 34, + "idx": 25, + "aOutR": true, + "aTimeS": "210100", + "type": "N" + }, + { + "locX": 35, + "idx": 26, + "aOutR": true, + "aTimeS": "210500", + "type": "N" + }, + { + "locX": 20, + "idx": 27, + "aOutR": true, + "aTimeS": "210700", + "isImp": true, + "type": "N" + } + ], + "msgL": [ + { + "type": "REM", + "remX": 0, + "fLocX": 0, + "tLocX": 20, + "tagL": [ + "RES_JNY_DTL_H3" + ] + }, + { + "type": "REM", + "remX": 1, + "fLocX": 0, + "tLocX": 20, + "tagL": [ + "RES_JNY_DTL" + ] + } + ], + "subscr": "F" + } + ], + "fpB": "20190811", + "fpE": "20191214", + "planrtTS": "1566237984", + "sD": "20190819", + "sT": "200650" +} diff --git a/test/index.js b/test/index.js index 7cfe23c4..4cc86847 100644 --- a/test/index.js +++ b/test/index.js @@ -1,5 +1,9 @@ 'use strict' +require('./bvg-journey') +require('./vbb-departures') +require('./bvg-radar') + require('./common') require('./db') require('./vbb') @@ -14,5 +18,6 @@ require('./saarfahrplan') require('./cfl') require('./hvv') require('./db-busradar-nrw') + require('./throttle') require('./retry') diff --git a/test/vbb-departures.js b/test/vbb-departures.js new file mode 100644 index 00000000..3938a945 --- /dev/null +++ b/test/vbb-departures.js @@ -0,0 +1,33 @@ +'use strict' + +const tapePromise = require('tape-promise').default +const tape = require('tape') + +const createClient = require('..') +const rawProfile = require('../p/vbb') +const raw = require('./fixtures/vbb-departures.json') +const expected = require('./fixtures/vbb-departures.js') + +const test = tapePromise(tape) +const client = createClient(rawProfile, 'public-transport/hafas-client:test') +const {profile} = client + +const opt = { + direction: null, + duration: 10, + linesOfStops: true, + remarks: true, + stopovers: true, + includeRelatedStations: true, + when: '2019-08-19T20:30:00+02:00', + products: {} +} + +test('parses a departure correctly (VBB)', (t) => { + const common = profile.parseCommon(profile, opt, raw) + const parseDeparture = profile.parseDeparture(profile, opt, common) + const departures = raw.jnyL.map(parseDeparture) + + t.deepEqual(departures, expected) + t.end() +})