Closed jamespfennell closed 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
Need to support:
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:
GET /admin/system-transfers
- list all inter-system transfer configs that have been added.POST /admin/system-transfers?system_id=A&system_id=B&distance=400
- add a new inter-system transfer config.POST /admin/system-transfers/preview?system_id=A&system_id=B&distance=400
- preview the transfers that would be created by a new inter-system transfer config.GET /admin/system-transfers/<numeric_id>
- get data on a specific config including all transfers it has created.PUT /admin/system-transfers/<numeric_id>
- optionally update and then re-run an inter-system transfer config.DELETE /admin/system-transfers/<numeric_id>
- delete a config and all transfers associated to it.GET /transfers
- list all inter-system transfers.
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.