Repository navigation
Closed
Labels
GTFS ScheduleIssues and Pull Requests that focus on GTFS ScheduleStatus: StaleIssues and Pull Requests that have remained inactive for 30 calendar days or more.
Description
For the last update (2020-11-20) on the issue, please go to this comment.
Hi everyone,
I’m opening an issue regarding “direction names” (also called “directions”, “route directions”, “direction destinations”, or “direction headsigns”) as some GTFS stakeholders already provide and consume these data. Before making any specification proposal, I would appreciate having your input on:
- If you would like these data to be officially adopted in the GTFS specification.
- On how these data should be modeled.
- On the name you would give to these "direction names".
The needs are:
- Providing riders with more detailed information on directions, especially for routes with complex trip patterns (e.g: routes with branches). The direction name would be a piece of information complementary to the trip_headsign and/or stop_headsign.
- Being defined per route at the trip level, at the direction level (trips.direction_id), and/or at the stop_time level. The use cases would be:
- trip and direction levels: defining a direction that is true for all trips going to the same direction at all their stop_times (e.g with the Red Line in Boston: direction “Southbound” for trips heading either to “Ashmont” or to “Braintree”)
- stop_time level: defining a direction that is true for all trips going to the same direction at that particular stop_time (e.g: direction “Inbound” until the first downtown stop is reached, then “Outbound”)
- Being compatible with all king of general directions (e.g: “South”, “Southbound”, “Inbound”, “Clockwise”, “Loop”, “Intérieur”, “Sud vers Paris”, “T-Centralen”, “Fruängen/Norsborg”).
The current implementations are (Gdoc with more details):
- 1 new file with 3 to 4 fields: MBTA, MTC (SF Bay Area), Trillium, TriMet
- 2 new fields in already-existing files: Transit
Thank you for all your feedback!
Reacted by Guillaume Campagna
Metadata
Metadata
Assignees
Labels
GTFS ScheduleIssues and Pull Requests that focus on GTFS ScheduleStatus: StaleIssues and Pull Requests that have remained inactive for 30 calendar days or more.
Activity
laurentg commentedon Jun 22, 2020
Added a small comment in the Gdoc for Mecatran implementation and support.
We would be generally in favor of specifying (even if non-formal) at least direction per route/direction level (two directions names per route), as many feeds do produce such information but many different standards co-exist at the moment.
gcamp commentedon Jun 25, 2020
Even if it's not our current implementation, I would suggest using the directions.txt file.
For places that would change direction name during their trip, I would suggest using
block_idto link together two splitted trips that each have their direction. Imagine for CTA's 'L' loop, the trip could be split in two in the middle of the loop to show the change of direction.stevenmwhite commentedon Jun 25, 2020
I don't think that splitting trips is something that would be acceptable to most agencies, even if it doesn't technically change the experience of the feed. I'd advise trying to approach this similarly to the way that headsign overrides are used.
In our experience, agencies that change direction name during a trip also change the headsign. This is common for routes that go through a downtown or center city area and the headsign and direction will be something like the following:
It's very clearly a single trip that starts on the Eastside and goes to the Westside, through Downtown on the way.
From a headsign standpoint, this is handled well in GTFS already with
trips.trip_headsignandstop_times.stop_headsignand I'd like to see us approach mid-trip direction changes in a similar way.@gcamp This seems fairly similar to the extended way you're already handling this, but to utilize a new directions.txt file we'd need to allow stop_times to indicate a new override for
direction_id.(Point of order... should comments be here, on the Google doc, or both?)
jamespfennell commentedon Jun 25, 2020
Just want to chime in with the New York City subway example. The NYC Subway doesn't have any additional route directions defined in the GTFS feed, but does provide an auxiliary CSV file that provides direction names on a per stop level. The CSV file is here.
For example, at the Port Authority station (stop ID
A27), northbound trains (direction ID = false) have direction name "Uptown - Queens" and southbound trains (direction ID = true) "Downtown & Brooklyn". I use these directions to create stop headsigns for additional trips, as the realtime feed doesn't provide these.Probably this case of "direction names" is a totally different problem to this ticket however if it is decided to add a new file to the GTFS Static spec, it might be good to call it
route_directions.txtrather thandirections.txt, in order to allow future non-route direction name features to be added.gcamp commentedon Jun 25, 2020
If we do this we would need to accept more than 0 and 1 as direction_id, because in the example mentioned it would be 4 direction names.
I don't think this is a different use case, and it's exactly the way we use stop_direction_headsign in our app. If there are important enough use cases to warrant a separate text value in stop_times then it maybe it is the best way to do it.
stevenmwhite commentedon Jun 25, 2020
Good point. I had originally written something saying that route_id + direction_id wouldn't be a reasonable unique key in this case, and then edited that out of my previous comment forgetting that direction_id is currently only 0 or 1.
timMillet commentedon Jul 27, 2020
Thank you everybody for your feedback!
I’m trying to synthesize what have been said so far (please tell me if I’m wrong or anything):
trips.direction_id.stop_timelevel.Based on this feedback, MobilityData drafted 4 options for a GTFS proposal.
You can view these options in section 4 of this Gdoc.
stop_timelevel.stop_times.stop_direction_iddirection_name_ids defined at the trip and/orstop_timelevelDo you have a favorite option? Which option would be best to suit your needs?
Would you have any other modeling solutions in mind?
You may comment on this issue or directly in the Gdoc. Thank you!
gcamp commentedon Jul 28, 2020
I think option C and D are both better than the existing ones.
Both would work with us but I'm curious of what other thinks of stop_direction_id. It's something we already have internal but might be a big hurdle to add for other consumers.
stevenmwhite commentedon Aug 7, 2020
I find Option D to be the most flexible, particularly because that it provides multiples names per direction_id per route. I also like the fact that the same name can be used multiple times, so only one line of data is required no matter how many trips and/or stop times that use "West" as the direction.
While
direction_idmakes sense as a binary value from a data perspective -- within a route there's generally only two opposite directions -- the ability to define multiple qualitative names for different trips is important.This is particularly true for partial trips (short lines) where the direction might be "West" even when the full trip's direction is "Southwest" because the route continues in a southern direction after going west.
timMillet commentedon Aug 10, 2020
@laurentg, @jamespfennell As you participated previously in the conversation, would you have any opinion concerning the 4 modelization options? Or anyone else?
skinkie commentedon Aug 10, 2020
In the spirit of GTFS option A would fit best, because all the other options introduce normalisation which is not found in GTFS.
Bertware commentedon Aug 11, 2020
I would lean towards option A or D, as they follow the same principle as the current headsigns or stop_times.shapes_id.
However, I'm wondering what the exact difference is between
trip_headsignandtrip_direction_headsign? How would a data consumers show this data? I see the Stockholm metro lines being named, but aren't these already covered by the normal headsigns, given that they use the final station as a headsign/direction? I'm in favour of direction headsigns since there definitely seems to be a need for in cases where there are nortbound/southbound lines, but i feel like we could improve the specification of what should go intrip_headsign,direction_headsign, and what one should do when these are identical (should one be left out, or should consumers handle this if they don't want to show the same data twice).gcamp commentedon Aug 11, 2020
@Bertware this is how we use the direction name at Transit. "Southbound" is a

trip_direction_headsign. "Ashmont" and "Braintree" aretrip_headsign. "Downtown Crossing" is the stop name.skinkie commentedon Aug 11, 2020
@gcamp you might just have proved this is an anti-feature. Because it is used at stop level rather than stop_time level.
29 remaining items
stevenmwhite commentedon Oct 16, 2020
@jewel1965 I understand that completely, and we'd be in the same position considering we produce feeds for a few agencies in the Bay Area as well as many outside that region.
In general from the GTFS spec standpoint I don't think we can really be adding new required fields or it immediately invalidates every existing feed that does currently comply and adequately describes a transit service.
gcamp commentedon Oct 16, 2020
Yes I don't think making it required is really a possibility. Making the direction name required without making the headsign required would not be logical.
antrim commentedon Oct 16, 2020
Local/regional organizations can still set their own guidelines and requirements, layered over the global specification, similar to how the proposed California Minimum GTFS Requirements. MTC's GTFS Extended is another example of this, though if these direction name fields were adopted in the global GTFS, there would be two different approaches. Local requirements or guidelines can specify that fields that are optional globally are required locally. This would be best for interoperability.
jewel1965 commentedon Oct 16, 2020
Does GTFS spec maintain version? If so, spec updates could be rolled out as new versions. That will allow data producers and consumers to declare their version compatibility. An 'optional' data element in one version could become 'required' in the next version. Not suggesting that this is needed for the direction name element, but thinking in general.
timMillet commentedon Oct 16, 2020
@jewel1965 GTFS is not versioned, and the current Specification Amendment Process mentions that "changes to the spec should be backward-compatible". IMHO, making required a new file like
route_directions.txtis not backward-compatible, unfortunately.However, as Aaron stated, producers can still set their own requirements, layered over the global specification that every consumer will be able to implement.
antrim commentedon Nov 5, 2020
I think the @Trillium-Solutions preferred option would be Option D with the addition of a recommendation (not requirement) that there is only 2 directions per route. (From this thread, it seems like there are cases where more than 2 directions are represented on a route.)
It would be useful to converge on one option (even if we don't immediately vote on it), so that data providers including Trillium can begin to plan for this addition.
Does anyone else have an update on their opinion after this discussion?
stevenmwhite commentedon Nov 11, 2020
Thanks @antrim. Our preference at GMV Syncromatics would be, in this order:
I'd be fine supporting any of those three. Ultimately I would be against a requirement that there only be two direction names per route, but ok with a recommendation as you suggest (though perhaps a recommendation is better in a best practice document and not in the spec itself).
timMillet commentedon Nov 20, 2020
Thank you @antrim and @stevenmwhite for your feedback!
Aaron - I added your recommendation to option D.
For general information, here is a synthesis of what was said by everyone since my last conversation update:
trip_direction_nameordirection_name_idfor every row for the sameroute_idanddirection_idin trips.txt), but it’s easy for a software to duplicate a field on many rows.timMillet commentedon Nov 20, 2020
Converging to one modelization option
Following Aaron’s question in his last comment 15 days ago, we could say now that nobody else has an update on their opinion. So I guess It’s now the time to converge and choose one modelization, which I’ll try to do in this comment by following 3 steps:
1. Community Opinions
Below is the compilation of everyone’s opinion for each modelization option. The goal is to highlight which option has the most stakeholder in favor and the less against. We can see that:
2. Supported Needs
Below is an array showing which needs (as defined at the beginning of the issue) are supported by the favorite options. I’ll do this exercise only with option D because it has the most GTFS stakeholders in favor, and option E because it has the most GTFS stakeholders in favor without anyone against. We can see that:
3. Best Option
Based on these 2 points, I’d suggest moving forward with option E, even though option D has received the most opinions in favor. Option E has indeed no opponents and is the one that best meets the needs.
If you agree or disagree with this Best Option, please react to this comment with a thumb up 👍 or down 👎 , or comment below. If you thumb down, please let me know why, also in a comment below.
antrim commentedon Nov 26, 2020
Option E looks good.
timMillet commentedon Jan 29, 2021
Hi everybody,
Thank you for your feedback! We are looking for data producers and data consumers to make the first implementations of this proposal. Please let us know if you are interested!
You can reach us in this issue or [email protected].
github-actions commentedon Jan 30, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
github-actions commentedon Feb 13, 2022
This issue has been closed due to inactivity. Issues can always be reopened after they have been closed.