Fetch the most up-to-date release of the german central public transport stop registry (Zentrales Haltestellenverzeichnis, ZHV). Sadly, there is no static endpoint from which you could obtain this data (yet), you can use this small tool until they provide one.
npm install zhv-de
The module exposes a single method which takes
password (you can obtain those credentials for free at the ZHV website) as arguments and returns a
Promise that will resolve in an object-mode stream of stops.
const zhv =const username = '<your-zhv-username>'const password = '<your-zhv-password>'const ndjson = // we use this to transform objects to JSON to pipe to stdout
The objects emitted by the stream will look as follows (note that the keys start with a lowercase character instead of the uppercase variant used on the ZHV website):
seqNo: '0'type: 'S'dHID: 'de:07334:1714'parent: 'de:07334:1714'name: 'Wörth Alte Bahnmeisterei'latitude: 49048672longitude: 8266324municipalityCode: '07334501'municipality: 'Wörth am Rhein'districtCode: nulldistrict: nullcondition: 'Served'state: undefineddescription: undefinedauthority: 'NVBW'
If you found a bug or want to propose a feature, feel free to visit the issues page.