jamespfennell / transiter

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

[GTFS Full Support] Resolve stops/transfers situation #60

Closed jamespfennell closed 4 years ago

jamespfennell commented 4 years ago

We want to support:

jamespfennell commented 4 years ago
feeds:

  gtfsstatic:
    http:
      url: 'http://web.mta.info/developers/data/nyct/subway/google_transit.zip'
    parser:
      built_in: GTFS_STATIC
      options:
        transfers:
          strategy: DEFAULT  # or GROUP_STATIONS
          exceptions: 
            - [L26, 254] 
    required_for_install: true
    auto_update:
      enabled: false
jamespfennell commented 4 years ago

We can create a new Transiter-only stop type "STATION_GROUP".

jamespfennell commented 4 years ago

One detail is that we should view transfers not as between stops but as between stop trees. This is because we assume that if you're in one stop in the tree, you can easily move physically to another stop in the tree.

In the HTTP API, perhaps it would be something like:

{
    "name": "Union Sq",
    ...
    "parent_stop": ...
    "child_stops": ...
    "transfers": [
        {
            name: "Root station in the transfer stop graph."
        },
    ]

I think there's not need to expose transfer times in the API.

jamespfennell commented 4 years ago

Tasks:

jamespfennell commented 4 years ago

Stop trees have a base, which is not necessarily the root of the tree. We can return certain nodes and/or traverse a subset of it in different ways.

When returning a stop tree, we want two different things:

Based on this, these are examples of endpoints and what we should return by default:

For transfers, we probably want to just return the root of any stop tree that can be transferred to.