gtfs-php-sdk
gtfs-php-sdk copied to clipboard
Gtfs plus directions
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
-
[x] Create a new Entity containing the fields required for directions.txt.
-
[x] Create a new "File" to allow retrieval of the Directions Entities.
-
[x] Write Integration tests for the new Directions Entity.
-
[x] Custom method to return Abbreviations of Cardinal directions as strings for different use-cases. Ex: North = N.
- [x] Added a custom flag
$adjectivewhich defaults tofalse, when true, it will add the adjective which would be North = NB, South = SB (Northbound/Southbound).
- [x] Added a custom flag
-
[x] Added a method to return the string of "Inbound" or "Outbound" depending on the direction_id (1 or 0).
Just curious if this is something you would be interested in implementing to this library or if I should continue with GTFS-Plus integrations on my own branch? @Bertware
Hi @bijanmmarkes, sorry for the late response.
Right now it might be good to keep this in a separate branch/fork, we do however encourage PRs for the main logic such as file reading and official GTFS tables.
I'll leave this open so it can be merged in the future, should this become a part of the GTFS standard.
Regards, Bert