Retrieve accessibility information for interchanges between specific platforms at Deutsche Bahn (DB) stations. This module is still an early prototype, feel free to test and play around, but you shouldn't let people rely on it. See also: Coverage and potential problems.
This module is also exposed as a REST API at
1.db-interchanges.juliustens.eu via db-interchanges-rest.
Installation and usage
npm install db-interchanges
Warning: This module is a very early prototype, so most methods are quite inefficient and slow. Note also that requesting interchange information will spawn a request to the Overpass API, which sometimes takes a couple of seconds to respond.
const fetchInterchangeInformation =// leipzig messe, platform 3const from =stationId: '8012478'platform: '3'// leipzig messe, platform 2const to =stationId: '8012478'platform: '2'const opt =fastaToken: '…' // token for the db fasta elevator api. the library provides a default token, but this is likely to be rate-limited if used by a lot of people. you can get your own one here:
fetchInterChangeInformation will return the following responses
||The module found a barrier-free route for the interchange that doesn't require using any elevators.|
||The module found a barrier-free route that requires using the elevators with given FaSta ids (see also db-elevators), which are all currently working correctly according to the FaSta API.|
||The module found a barrier-free route that requires using the elevators with given FaSta ids see also db-elevators, for which the FaSta API returned status working or unknown, but not broken.|
||There either is no barrier-free route at all or an elevator that would make this route barrier-free is currently broken according to the FaSta API.|
Coverage and potential problems
When looking up interchange information,
db-interchanges first tries to look up the specified platforms using db-platforms. Any interchange for which not both platforms are tagged with OSM data in
db-interchanges will be unable to determine any accessibility information. See this list for an overview of the current coverage level in
Note that - as OSM ids are not guaranteed to be stable forever -
db-platforms may contain entries that are not valid anymore. This will have the same effect as if a station hadn't been tagged in
db-platforms in the first place, so take the coverage list mentioned above with a grain of salt.
After looking up platforms,
db-interchanges fetches data from the Overpass API, which might take some seconds. The module will then try to calculate routes between the
to platforms specified by the user. It filters out any elevators which are tagged on OpenStreetMap but are not included in db-elevators. See this list for an overview of the current coverage level in
The algorithm also fetches the FaSta API for any matched elevators and filters out any broken ones and returns the corresponding
barrierFree information (see also Responses).
- db-interchanges-rest - REST API exposing this module.
- db-platforms - Deutsche Bahn platform information, enriched with OSM data.
- db-elevators - Deutsche Bahn elevator information, enriched with OSM data.
If you found a bug or want to propose a feature, feel free to visit the issues page.