From 1f6115955d464c4890e6454e0387e9f48f0717f9 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 28 Apr 2022 11:47:23 +0200 Subject: [PATCH] =?UTF-8?q?BVG:=20don't=20convert=20IDs=20=F0=9F=92=A5?= =?UTF-8?q?=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- p/bvg/index.js | 18 --- test/e2e/bvg.js | 20 +-- test/fixtures/bvg-arrivals.js | 2 +- test/fixtures/bvg-journey.js | 34 ++-- test/fixtures/bvg-radar.js | 192 +++++++++++------------ test/fixtures/bvg-trip-with-occupancy.js | 112 ++++++------- 6 files changed, 180 insertions(+), 198 deletions(-) diff --git a/p/bvg/index.js b/p/bvg/index.js index ca1cdc7f..87e7e90c 100644 --- a/p/bvg/index.js +++ b/p/bvg/index.js @@ -1,7 +1,6 @@ 'use strict' const shorten = require('vbb-short-station-name') -const {to12Digit, to9Digit} = require('vbb-translate-ids') const getStations = require('vbb-stations') const {parseHook} = require('../../lib/profile-hooks') @@ -13,7 +12,6 @@ const { parseDeparture: _parseDeparture, parseStopover: _parseStopover, parseJourneyLeg: _parseJourneyLeg, - formatStation: _formatStation, } = require('../../lib/default-profile') const baseProfile = require('./base.json') @@ -46,7 +44,6 @@ const journeyLegOccupancyCodes = new Map([ const parseLocation = ({parsed}, l) => { if ((parsed.type === 'stop' || parsed.type === 'station') && parsed.id[0] === '9') { parsed.name = shorten(parsed.name) - parsed.id = to12Digit(parsed.id) if (!parsed.location.latitude || !parsed.location.longitude) { const [s] = getStations(parsed.id) if (s) Object.assign(parsed.location, s.location) @@ -129,19 +126,6 @@ const parseJourneyLegWithOccupancy = ({parsed}, leg, date) => { return parsed } -const validIBNR = /^\d+$/ -const formatStation = (id) => { - if ('string' !== typeof id) throw new Error('station ID must be a string.') - const l = id.length - if ((l !== 7 && l !== 9 && l !== 12) || !validIBNR.test(id)) { - throw new Error('station ID must be a valid IBNR.') - } - // BVG has some 7-digit stations. We don't convert them to 12 digits, - // because it only recognizes in the 7-digit format. see derhuerst/vbb-hafas#22 - if (l !== 7) id = to9Digit(id) - return _formatStation(id) -} - // use the Berlkönig ride sharing service? // todo: https://github.com/alexander-albers/tripkit/issues/26#issuecomment-825437320 const requestJourneysWithBerlkoenig = ({opt}, query) => { @@ -182,8 +166,6 @@ const bvgProfile = { parseJourneyLegWithOccupancy, ), - formatStation, - refreshJourneyUseOutReconL: true, trip: true, radar: true, diff --git a/test/e2e/bvg.js b/test/e2e/bvg.js index c7460db7..5e9fe0ee 100644 --- a/test/e2e/bvg.js +++ b/test/e2e/bvg.js @@ -43,13 +43,13 @@ const validate = createValidate(cfg, { const client = createClient(bvgProfile, 'public-transport/hafas-client:test') -const amrumerStr = '900000009101' -const spichernstr = '900000042101' -const bismarckstr = '900000024201' -const westhafen = '900000001201' -const wedding = '900000009104' -const württembergallee = '900000026153' -const tiergarten = '900000003103' +const amrumerStr = '900009101' +const spichernstr = '900042101' +const bismarckstr = '900024201' +const westhafen = '900001201' +const wedding = '900009104' +const württembergallee = '900026153' +const tiergarten = '900003103' const jannowitzbrücke = '900000100004' const hour = 60 * 60 * 1000 @@ -163,7 +163,7 @@ tap.skip('journeys: walkingSpeed', async (t) => { latitude: 52.443576, longitude: 13.198973 } - const wannsee = '900000053301' + const wannsee = '900053301' await testJourneysWalkingSpeed({ test: t, @@ -357,8 +357,8 @@ tap.test('arrivals', async (t) => { }) tap.test('nearby', async (t) => { - const berlinerStr = '900000044201' - const landhausstr = '900000043252' + const berlinerStr = '900044201' + const landhausstr = '900043252' // Berliner Str./Bundesallee const nearby = await client.nearby({ diff --git a/test/fixtures/bvg-arrivals.js b/test/fixtures/bvg-arrivals.js index 2e5a3a02..02663bfb 100644 --- a/test/fixtures/bvg-arrivals.js +++ b/test/fixtures/bvg-arrivals.js @@ -2,7 +2,7 @@ const sLandsbergerAllee = { type: 'stop', - id: '900000110004', + id: '900110004', stationDHID: 'de:11000:900110004', name: 'S Landsberger Allee', location: { diff --git a/test/fixtures/bvg-journey.js b/test/fixtures/bvg-journey.js index f7ce6bf3..0b0dce0f 100644 --- a/test/fixtures/bvg-journey.js +++ b/test/fixtures/bvg-journey.js @@ -13,7 +13,7 @@ module.exports = { }, destination: { type: 'stop', - id: '900000100007', + id: '900100007', name: 'S Oranienburger Str.', location: { type: 'location', @@ -43,7 +43,7 @@ module.exports = { }, { origin: { type: 'stop', - id: '900000100007', + id: '900100007', name: 'S Oranienburger Str.', location: { type: 'location', @@ -63,7 +63,7 @@ module.exports = { }, destination: { type: 'stop', - id: '900000058101', + id: '900058101', name: 'S Südkreuz', location: { type: 'location', @@ -97,7 +97,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100007', + id: '900100007', name: 'S Oranienburger Str.', location: { type: 'location', @@ -193,7 +193,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100001', + id: '900100001', name: 'S+U Friedrichstr.', location: { type: 'location', @@ -300,7 +300,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100025', + id: '900100025', name: 'S+U Brandenburger Tor', location: { type: 'location', @@ -407,7 +407,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100020', + id: '900100020', name: 'S+U Potsdamer Platz', location: { type: 'location', @@ -448,7 +448,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000012101', + id: '900012101', name: 'S Anhalter Bahnhof', location: { type: 'location', @@ -577,7 +577,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000058103', + id: '900058103', name: 'S+U Yorckstr. S2 S25 S26 U7', location: { type: 'location', @@ -662,7 +662,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000058101', + id: '900058101', name: 'S Südkreuz', location: { type: 'location', @@ -715,7 +715,7 @@ module.exports = { stopovers: [{ stop: { type: 'stop', - id: '900000100007', + id: '900100007', name: 'S Oranienburger Str.', location: { type: 'location', @@ -749,7 +749,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100001', + id: '900100001', name: 'S+U Friedrichstr.', location: { type: 'location', @@ -783,7 +783,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100025', + id: '900100025', name: 'S+U Brandenburger Tor', location: { type: 'location', @@ -817,7 +817,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100020', + id: '900100020', name: 'S+U Potsdamer Platz', location: { type: 'location', @@ -851,7 +851,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000012101', + id: '900012101', name: 'S Anhalter Bahnhof', location: { type: 'location', @@ -885,7 +885,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000058103', + id: '900058103', name: 'S+U Yorckstr. S2 S25 S26 U7', location: { type: 'location', @@ -919,7 +919,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000058101', + id: '900058101', name: 'S Südkreuz', location: { type: 'location', diff --git a/test/fixtures/bvg-radar.js b/test/fixtures/bvg-radar.js index 9eaaf9e6..a681ca4d 100644 --- a/test/fixtures/bvg-radar.js +++ b/test/fixtures/bvg-radar.js @@ -22,7 +22,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100002', + id: '900100002', name: 'S Hackescher Markt', location: { type: 'location', @@ -56,7 +56,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -90,7 +90,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -124,7 +124,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000151003', + id: '900151003', name: 'Zingster Str.', location: { type: 'location', @@ -160,7 +160,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -180,7 +180,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -203,7 +203,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -223,7 +223,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -246,7 +246,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -266,7 +266,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -289,7 +289,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -309,7 +309,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -401,7 +401,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000260005', + id: '900260005', name: 'S Flughafen Berlin-Schönefeld', location: { type: 'location', @@ -435,7 +435,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100003', + id: '900100003', name: 'S+U Alexanderplatz', location: { type: 'location', @@ -469,7 +469,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100002', + id: '900100002', name: 'S Hackescher Markt', location: { type: 'location', @@ -503,7 +503,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000029101', + id: '900029101', name: 'S Spandau', location: { type: 'location', @@ -539,7 +539,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100003', + id: '900100003', name: 'S+U Alexanderplatz', location: { type: 'location', @@ -559,7 +559,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100002', + id: '900100002', name: 'S Hackescher Markt', location: { type: 'location', @@ -582,7 +582,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100003', + id: '900100003', name: 'S+U Alexanderplatz', location: { type: 'location', @@ -602,7 +602,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100002', + id: '900100002', name: 'S Hackescher Markt', location: { type: 'location', @@ -625,7 +625,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100003', + id: '900100003', name: 'S+U Alexanderplatz', location: { type: 'location', @@ -645,7 +645,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100002', + id: '900100002', name: 'S Hackescher Markt', location: { type: 'location', @@ -668,7 +668,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100003', + id: '900100003', name: 'S+U Alexanderplatz', location: { type: 'location', @@ -688,7 +688,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100002', + id: '900100002', name: 'S Hackescher Markt', location: { type: 'location', @@ -780,7 +780,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000085104', + id: '900085104', name: 'U Paracelsus-Bad', location: { type: 'location', @@ -814,7 +814,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100705', + id: '900100705', name: 'S+U Alexanderplatz [U8]', location: { type: 'location', @@ -848,7 +848,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100004', + id: '900100004', name: 'S+U Jannowitzbrücke', location: { type: 'location', @@ -882,7 +882,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000079221', + id: '900079221', name: 'S+U Hermannstr.', location: { type: 'location', @@ -918,7 +918,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100705', + id: '900100705', name: 'S+U Alexanderplatz [U8]', location: { type: 'location', @@ -938,7 +938,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100004', + id: '900100004', name: 'S+U Jannowitzbrücke', location: { type: 'location', @@ -961,7 +961,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100705', + id: '900100705', name: 'S+U Alexanderplatz [U8]', location: { type: 'location', @@ -981,7 +981,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100004', + id: '900100004', name: 'S+U Jannowitzbrücke', location: { type: 'location', @@ -1004,7 +1004,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100705', + id: '900100705', name: 'S+U Alexanderplatz [U8]', location: { type: 'location', @@ -1024,7 +1024,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100004', + id: '900100004', name: 'S+U Jannowitzbrücke', location: { type: 'location', @@ -1047,7 +1047,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100705', + id: '900100705', name: 'S+U Alexanderplatz [U8]', location: { type: 'location', @@ -1067,7 +1067,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100004', + id: '900100004', name: 'S+U Jannowitzbrücke', location: { type: 'location', @@ -1159,7 +1159,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000175004', + id: '900175004', name: 'U Kaulsdorf-Nord', location: { type: 'location', @@ -1193,7 +1193,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100017', + id: '900100017', name: 'U Schillingstr.', location: { type: 'location', @@ -1227,7 +1227,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100704', + id: '900100704', name: 'S+U Alexanderplatz [U5]', location: { type: 'location', @@ -1261,7 +1261,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100704', + id: '900100704', name: 'S+U Alexanderplatz [U5]', location: { type: 'location', @@ -1297,7 +1297,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100017', + id: '900100017', name: 'U Schillingstr.', location: { type: 'location', @@ -1317,7 +1317,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100704', + id: '900100704', name: 'S+U Alexanderplatz [U5]', location: { type: 'location', @@ -1340,7 +1340,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100017', + id: '900100017', name: 'U Schillingstr.', location: { type: 'location', @@ -1360,7 +1360,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100704', + id: '900100704', name: 'S+U Alexanderplatz [U5]', location: { type: 'location', @@ -1383,7 +1383,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100017', + id: '900100017', name: 'U Schillingstr.', location: { type: 'location', @@ -1403,7 +1403,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100704', + id: '900100704', name: 'S+U Alexanderplatz [U5]', location: { type: 'location', @@ -1426,7 +1426,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100017', + id: '900100017', name: 'U Schillingstr.', location: { type: 'location', @@ -1446,7 +1446,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100704', + id: '900100704', name: 'S+U Alexanderplatz [U5]', location: { type: 'location', @@ -1538,7 +1538,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000026201', + id: '900026201', name: 'U Theodor-Heuss-Platz', location: { type: 'location', @@ -1572,7 +1572,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100015', + id: '900100015', name: 'U Klosterstr.', location: { type: 'location', @@ -1606,7 +1606,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100703', + id: '900100703', name: 'S+U Alexanderplatz [U2]', location: { type: 'location', @@ -1640,7 +1640,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000130002', + id: '900130002', name: 'S+U Pankow', location: { type: 'location', @@ -1676,7 +1676,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100015', + id: '900100015', name: 'U Klosterstr.', location: { type: 'location', @@ -1696,7 +1696,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100703', + id: '900100703', name: 'S+U Alexanderplatz [U2]', location: { type: 'location', @@ -1719,7 +1719,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100015', + id: '900100015', name: 'U Klosterstr.', location: { type: 'location', @@ -1739,7 +1739,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100703', + id: '900100703', name: 'S+U Alexanderplatz [U2]', location: { type: 'location', @@ -1762,7 +1762,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100015', + id: '900100015', name: 'U Klosterstr.', location: { type: 'location', @@ -1782,7 +1782,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100703', + id: '900100703', name: 'S+U Alexanderplatz [U2]', location: { type: 'location', @@ -1805,7 +1805,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100015', + id: '900100015', name: 'U Klosterstr.', location: { type: 'location', @@ -1825,7 +1825,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100703', + id: '900100703', name: 'S+U Alexanderplatz [U2]', location: { type: 'location', @@ -1917,7 +1917,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100002', + id: '900100002', name: 'S Hackescher Markt', location: { type: 'location', @@ -1951,7 +1951,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -1985,7 +1985,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2019,7 +2019,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000175013', + id: '900175013', name: 'Riesaer Str.', location: { type: 'location', @@ -2055,7 +2055,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -2075,7 +2075,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2098,7 +2098,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -2118,7 +2118,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2141,7 +2141,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -2161,7 +2161,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2184,7 +2184,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -2204,7 +2204,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2296,7 +2296,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000175013', + id: '900175013', name: 'Riesaer Str.', location: { type: 'location', @@ -2330,7 +2330,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -2364,7 +2364,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100515', + id: '900100515', name: 'Spandauer Str./Marienkirche', location: { type: 'location', @@ -2398,7 +2398,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100002', + id: '900100002', name: 'S Hackescher Markt', location: { type: 'location', @@ -2434,7 +2434,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -2454,7 +2454,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100515', + id: '900100515', name: 'Spandauer Str./Marienkirche', location: { type: 'location', @@ -2477,7 +2477,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -2497,7 +2497,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100515', + id: '900100515', name: 'Spandauer Str./Marienkirche', location: { type: 'location', @@ -2520,7 +2520,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -2540,7 +2540,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100515', + id: '900100515', name: 'Spandauer Str./Marienkirche', location: { type: 'location', @@ -2563,7 +2563,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100026', + id: '900100026', name: 'S+U Alexanderplatz/Gontardstr.', location: { type: 'location', @@ -2583,7 +2583,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100515', + id: '900100515', name: 'Spandauer Str./Marienkirche', location: { type: 'location', @@ -2675,7 +2675,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000151003', + id: '900151003', name: 'Zingster Str.', location: { type: 'location', @@ -2709,7 +2709,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2743,7 +2743,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -2777,7 +2777,7 @@ module.exports = [ { stop: { type: 'stop', - id: '900000003259', + id: '900003259', name: 'Lüneburger Str.', location: { type: 'location', @@ -2813,7 +2813,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2833,7 +2833,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -2856,7 +2856,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2876,7 +2876,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -2899,7 +2899,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2919,7 +2919,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', @@ -2942,7 +2942,7 @@ module.exports = [ { origin: { type: 'stop', - id: '900000100040', + id: '900100040', name: 'Mollstr./Otto-Braun-Str.', location: { type: 'location', @@ -2962,7 +2962,7 @@ module.exports = [ }, destination: { type: 'stop', - id: '900000100005', + id: '900100005', name: 'U Alexanderplatz [Tram]', location: { type: 'location', diff --git a/test/fixtures/bvg-trip-with-occupancy.js b/test/fixtures/bvg-trip-with-occupancy.js index 48d62d9c..e6dcb18f 100644 --- a/test/fixtures/bvg-trip-with-occupancy.js +++ b/test/fixtures/bvg-trip-with-occupancy.js @@ -103,7 +103,7 @@ module.exports = { origin: { type: 'stop', - id: '900000009102', + id: '900009102', name: 'U Leopoldplatz', location: { type: 'location', @@ -130,7 +130,7 @@ module.exports = { destination: { type: 'stop', - id: '900000120005', + id: '900120005', name: 'S Ostbahnhof', location: { type: 'location', @@ -162,7 +162,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000009102', + id: '900009102', name: 'U Leopoldplatz', location: { type: 'location', @@ -186,7 +186,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000009151', + id: '900009151', name: 'Gerichtstr.', location: { type: 'location', @@ -210,7 +210,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000009104', + id: '900009104', name: 'S+U Wedding', location: { type: 'location', @@ -244,7 +244,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000008104', + id: '900008104', name: 'U Reinickendorfer Str./Fennstr.', location: { type: 'location', @@ -268,7 +268,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000001202', + id: '900001202', name: 'Am Nordhafen', location: { type: 'location', @@ -317,7 +317,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000001252', + id: '900001252', name: 'Friedrich-Krause-Ufer', location: { type: 'location', @@ -346,7 +346,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000001206', + id: '900001206', name: 'Heidestr.', location: { type: 'location', @@ -375,7 +375,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000001203', + id: '900001203', name: 'Döberitzer Str.', location: { type: 'location', @@ -444,7 +444,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000003201', + id: '900003201', name: 'S+U Berlin Hauptbahnhof', location: { type: 'location', @@ -478,7 +478,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100503', + id: '900100503', name: 'Invalidenpark', location: { type: 'location', @@ -512,7 +512,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100542', + id: '900100542', name: 'Charité - Campus Mitte', location: { type: 'location', @@ -536,7 +536,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100033', + id: '900100033', name: 'Schumannstr.', location: { type: 'location', @@ -565,7 +565,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100509', + id: '900100509', name: 'Deutsches Theater', location: { type: 'location', @@ -589,7 +589,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100047', + id: '900100047', name: 'Friedrichstr./Reinhardtstr.', location: { type: 'location', @@ -623,7 +623,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100001', + id: '900100001', name: 'S+U Friedrichstr.', location: { type: 'location', @@ -652,7 +652,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100513', + id: '900100513', name: 'U Unter den Linden', location: { type: 'location', @@ -686,7 +686,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100027', + id: '900100027', name: 'Französische Str.', location: { type: 'location', @@ -710,7 +710,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100530', + id: '900100530', name: 'Werderscher Markt', location: { type: 'location', @@ -744,7 +744,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100052', + id: '900100052', name: 'Berliner Schloss', location: { type: 'location', @@ -773,7 +773,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100531', + id: '900100531', name: 'Neumannsgasse', location: { type: 'location', @@ -797,7 +797,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100726', + id: '900100726', name: 'Fischerinsel.', location: { type: 'location', @@ -826,7 +826,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100014', + id: '900100014', name: 'U Märkisches Museum', location: { type: 'location', @@ -855,7 +855,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100032', + id: '900100032', name: 'Heinrich-Heine-Str./Annenstr.', location: { type: 'location', @@ -884,7 +884,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100544', + id: '900100544', name: 'Heinrich-Heine-Platz', location: { type: 'location', @@ -928,7 +928,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000100546', + id: '900100546', name: 'Adalbertstr.', location: { type: 'location', @@ -977,7 +977,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000014107', + id: '900014107', name: 'Bethaniendamm', location: { type: 'location', @@ -1026,7 +1026,7 @@ module.exports = { type: 'Feature', properties: { type: 'stop', - id: '900000120005', + id: '900120005', name: 'S Ostbahnhof', location: { type: 'location', @@ -1053,7 +1053,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000009102', + id: '900009102', name: 'U Leopoldplatz', location: { type: 'location', @@ -1095,7 +1095,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000009151', + id: '900009151', name: 'Gerichtstr.', location: { type: 'location', @@ -1131,7 +1131,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000009104', + id: '900009104', name: 'S+U Wedding', location: { type: 'location', @@ -1173,7 +1173,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000008104', + id: '900008104', name: 'U Reinickendorfer Str./Fennstr.', location: { type: 'location', @@ -1209,7 +1209,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000001202', + id: '900001202', name: 'Am Nordhafen', location: { type: 'location', @@ -1245,7 +1245,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000001252', + id: '900001252', name: 'Friedrich-Krause-Ufer', location: { type: 'location', @@ -1281,7 +1281,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000001206', + id: '900001206', name: 'Heidestr.', location: { type: 'location', @@ -1317,7 +1317,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000001203', + id: '900001203', name: 'Döberitzer Str.', location: { type: 'location', @@ -1353,7 +1353,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000003201', + id: '900003201', name: 'S+U Berlin Hauptbahnhof', location: { type: 'location', @@ -1395,7 +1395,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100503', + id: '900100503', name: 'Invalidenpark', location: { type: 'location', @@ -1431,7 +1431,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100542', + id: '900100542', name: 'Charité - Campus Mitte', location: { type: 'location', @@ -1467,7 +1467,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100033', + id: '900100033', name: 'Schumannstr.', location: { type: 'location', @@ -1503,7 +1503,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100509', + id: '900100509', name: 'Deutsches Theater', location: { type: 'location', @@ -1539,7 +1539,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100047', + id: '900100047', name: 'Friedrichstr./Reinhardtstr.', location: { type: 'location', @@ -1575,7 +1575,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100001', + id: '900100001', name: 'S+U Friedrichstr.', location: { type: 'location', @@ -1617,7 +1617,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100513', + id: '900100513', name: 'U Unter den Linden', location: { type: 'location', @@ -1653,7 +1653,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100027', + id: '900100027', name: 'Französische Str.', location: { type: 'location', @@ -1689,7 +1689,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100530', + id: '900100530', name: 'Werderscher Markt', location: { type: 'location', @@ -1725,7 +1725,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100052', + id: '900100052', name: 'Berliner Schloss', location: { type: 'location', @@ -1761,7 +1761,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100531', + id: '900100531', name: 'Neumannsgasse', location: { type: 'location', @@ -1797,7 +1797,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100726', + id: '900100726', name: 'Fischerinsel.', location: { type: 'location', @@ -1833,7 +1833,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100014', + id: '900100014', name: 'U Märkisches Museum', location: { type: 'location', @@ -1869,7 +1869,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100032', + id: '900100032', name: 'Heinrich-Heine-Str./Annenstr.', location: { type: 'location', @@ -1905,7 +1905,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100544', + id: '900100544', name: 'Heinrich-Heine-Platz', location: { type: 'location', @@ -1941,7 +1941,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000100546', + id: '900100546', name: 'Adalbertstr.', location: { type: 'location', @@ -1977,7 +1977,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000014107', + id: '900014107', name: 'Bethaniendamm', location: { type: 'location', @@ -2013,7 +2013,7 @@ module.exports = { { stop: { type: 'stop', - id: '900000120005', + id: '900120005', name: 'S Ostbahnhof', location: { type: 'location',