derhuerst / db-hafas-stations

A list of DB stations, taken from HAFAS.
https://github.com/derhuerst/db-hafas-stations#db-hafas-stations
ISC License
5 stars 2 forks source link

Package doesn't include all stations... #2

Open lemnis opened 2 years ago

lemnis commented 2 years ago

It's a great package, countries "far" away from Germany are missing, but they do exist in hafas. E.g.

Is there an easy fix to include those far away stations?

derhuerst commented 2 years ago

Thanks for reporting!

db-hafas-stations builds the list of stations by doing a graph walk, slowly discovering more stations by querying intermediate & destination stations of vehicles departing at the current station.

Three possible solutions to get Malaga & Co. included, with increasing levels of effort and benefit:

  1. You could modify the build script to start walking the graph with a different station (e.g. Malaga), run the build script and abort it as soon as it has made its way through Spain, and then concatenate the discovered stations with the ones from the db-hafas-stations npm package. This has the disadvantage that it doesn't fix the problem permanently, repeatably.
  2. Medium-term, it would be very worthwhile to extend hafas-discover-stations to start with multiple stations: Frankfurt Hbf, Malaga, Attymon, etc. I would be happy to review a PR for this!
  3. Long-term, it should be interesting to find out why it didn't "reach" Malaga, starting from Berlin with filter criteria (next Monday 10:00 am, departures within 60min. We could try increasing the time span to e.g. 3 hours, or picking another time frame, e.g. on the weekend. Again, PR welcome!
traines-source commented 5 days ago

I have obtained a station list with ~27k additional stations, both inside and outside Germany (Malaga is in there, too ;): https://mirror.traines.eu/hafas-ibnr-zhv-gtfs-osm-matching/hafas-stations.ndjson

Some notes:

IFOPT-IDs and corrected geopositions are based on D_Bahnhof_2020_alle.CSV, DB InfraGO, CC-BY-4.0.

derhuerst commented 5 days ago

@PaulSut wants to work on publishing a new version of db-hafas-stations! 🎉