Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lemnis opened this issue Apr 25, 2022 · 3 comments
Open

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

lemnis opened this issue Apr 25, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lemnis
Copy link

lemnis commented Apr 25, 2022

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
Copy link
Owner

derhuerst commented Apr 26, 2022

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!

@derhuerst derhuerst added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 26, 2022
@traines-source
Copy link

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:

  • it's based on HAFAS traffic from the past year, i.e. no systematic collection and no guarantee for completeness (and, on the other hand, some stations may have ceased to exist)
  • merged with the existing list
  • weight set to 1 for all added stations, distance undefined
  • additionally corrects wrong geopositions of some train stations (list of wrong stations)
  • additionally contains field ifoptId for German train stations
  • can be used as a drop-in replacement for full.ndjson

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

@derhuerst
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants