BVG: remove vbb-stations 💥

This commit is contained in:
Jannis R 2022-04-28 11:51:56 +02:00
parent 1f6115955d
commit 5797105939
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -1,7 +1,6 @@
'use strict'
const shorten = require('vbb-short-station-name')
const getStations = require('vbb-stations')
const {parseHook} = require('../../lib/profile-hooks')
const parseAndAddLocationDHID = require('../vbb/parse-loc-dhid')
@ -44,10 +43,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)
if (!parsed.location.latitude || !parsed.location.longitude) {
const [s] = getStations(parsed.id)
if (s) Object.assign(parsed.location, s.location)
}
}
parseAndAddLocationDHID(parsed, l)