Skip to content

derhuerst/hafas-find-stations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published