2.1.0 • Published 4 years ago

hafas-find-stations v2.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

hafas-find-stations

Given a hafas-client@5 client, find all stations in a bounding box.

npm version build status ISC-licensed minimum Node.js version chat with me on Gitter support me on Patreon

Installation

npm install hafas-find-stations

Usage

const createHafas = require('hafas-client')
const vbbProfile = require('hafas-client/p/vbb')
const findStations = require('hafas-find-stations')

const bbox = {
	north: 52.53,
	west: 13.36,
	south: 52.51,
	east: 13.41
}

const hafas = createHafas(vbbProfile, 'hafas-find-stations example')

findStations(hafas, bbox, {concurrency: 1}, (err, station) => {
	if (err) console.error(err)
	if (station) console.log(station.id + '\t' + station.name)
})
.catch(console.error)

Contributing

If you have a question or need support using hafas-find-stations, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.