Gtfs plus directions #9
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Directions.txt is a GTFS+ Experimental dataset, GTFS+ is an extension to GTFS in use by the San Francisco (MTC) 511.org, Trillium, etc.
Many transit agencies in the SF Bay Area publish GTFS+ as well as worldwide, including a large majority of customers that have GTFS feeds created by Trillium for example.
The directions.txt file can become useful when the need to use certain verbiage or translating gtfs-rt data into something a customer can understand, as well as other use-cases related to consuming and using gtfs-rt data.
References:
https://www.transitwiki.org/TransitWiki/index.php/GTFS+
https://trilliumtransit.com/gtfs/reference/#directions
Create a new Entity containing the fields required for directions.txt.
Create a new "File" to allow retrieval of the Directions Entities.
Write Integration tests for the new Directions Entity.
Custom method to return Abbreviations of Cardinal directions as strings for different use-cases. Ex: North = N.
$adjective
which defaults tofalse
, when true, it will add the adjective which would be North = NB, South = SB (Northbound/Southbound).Added a method to return the string of "Inbound" or "Outbound" depending on the direction_id (1 or 0).