jamespfennell / transiter

Web service for transit data
https://demo.transiter.dev
MIT License
61 stars 7 forks source link

Add a feature to automatically create cross-system stations based on location #17

Closed jamespfennell closed 4 years ago

jamespfennell commented 5 years ago

In the GTFS static parser, Transiter uses the transfers.txt field to bundle stations like 6th Av and 14th St into one station. (This behavior is not universally desired and should be optional.)

Right now there's no way to create cross-system stations. However using the GPS data for every stop it should be able to do this in a somewhat automatic way.

Will need new endpoints to (a) search for linked stations based on geolocation and (b) add arbitrary sets of stations to one bigger stations.

jamespfennell commented 4 years ago

One idea is to have a system stop linking configuration. This would define conditions (system + GPS proximity) under which ~stops would be linked together OR have~ transfers would be created between them. For v1 should just do transfers.

systems:
- us-ny-subway
- us-ny-path

strategy: GROUP_STATIONS

distance: 300

additions:

exceptions:
- - system: us-ny-subway
     stop_id: L03
  - system: us-ny-path
    stop_id: 34
jamespfennell commented 4 years ago

Need to support:

jamespfennell commented 4 years ago

For simplicity for v1, we can omit the YAML file and just provide the settings using 2 URL parameters: system_id and distance. If exceptions/additions are needed later, we can iterate (and consuming code can always factor these in.)

Endpoints: