Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file linked_datasets.txt containing the Trip Updates, Vehicle Positions and Service Alerts URLs #93

Closed
wants to merge 9 commits into from
19 changes: 19 additions & 0 deletions gtfs/spec/en/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This document explains the types of files that comprise a GTFS transit feed and
- [shapes.txt](#shapestxt)
- [frequencies.txt](#frequenciestxt)
- [transfers.txt](#transferstxt)
- [linked_datasets.txt](#linkeddatasetstxt)
- [feed\_info.txt](#feed_infotxt)

## Term Definitions
Expand Down Expand Up @@ -50,6 +51,7 @@ This specification defines the following files along with their associated conte
| [shapes.txt](#shapestxt) | Optional | Rules for drawing lines on a map to represent a transit organization's routes. |
| [frequencies.txt](#frequenciestxt) | Optional | Headway (time between trips) for routes with variable frequency of service. |
| [transfers.txt](#transferstxt) | Optional | Rules for making connections at transfer points between routes. |
| [linked_datasets.txt](#linkeddatasetstxt) | Optional | URLs to linked datasets: Trip Updates, Vehicle Positions and Service Alerts. |
| [feed_info.txt](#feed_infotxt) | Optional | Additional information about the feed itself, including publisher, version, and expiration information. |

## File Requirements
Expand Down Expand Up @@ -414,6 +416,23 @@ Trip planners normally calculate transfer points based on the relative proximity
| min_transfer_time | Optional | When a connection between routes requires an amount of time between arrival and departure (transfer_type=2), the **min_transfer_time** field defines the amount of time that must be available in an itinerary to permit a transfer between routes at these stops. The min_transfer_time must be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. |
| | | The min_transfer_time value must be entered in seconds, and must be a non-negative integer. |

### linked_datasets.txt

File: **Optional**

| Field Name | Required | Details |
| ------ | ------ | ------ |
| url | **Required** | The **url** fields contains the URL to the linked dataset. The value must be a fully qualified URL that includes **http**:// or **https**://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to fully qualified URL values. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably shouldn't limit to http and https - so it should read The value must be a fully qualified URL that includes a scheme such as **http**:// or **https**://,....

I would also add `The value must be the exact URL a client could use to make a request that returns GTFS-realtime data in the protocol buffer format.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include websocket as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

@barbeau & @skinkie: Do we want to defined exhaustively the protocols which are allowed (e.g. HTTP GET and WebSockets), or do we just want to just say "Should be a fully qualified URL" without specifying a protocol?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should exhaustively list protocols here - the purpose of this sentence and including "http/https" is just to give an example that we expect a fully qualified URL.

To my knowledge all websocket implementations of GTFS-realtime are currently for DIFFERENTIAL feeds, which aren't currently officially supported in GTFS-realtime (see #84), so I'd suggest omitting ws:// examples to avoid confusion. When DIFFERENTIAL feeds are officially supported we can add more text here that says something like "such as http for FULL_DATASET and ws for DIFFERENTIAL feeds".

| trip_updates | **Required** | The **trip_updates** field indicates whether the dataset at this URL may contain [a `TripUpdate` entity](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-tripupdate). Valid values for this field are: |
| | | * **0** - The dataset at this URL doesn't contain TripUpdate entities. |
| | | * **1** - The dataset at this URL may contain TripUpdate entities. |
| vehicle_positions | **Required** | The **vehicle_positions** field indicates whether the dataset at this URL may contain [a `VehiclePosition` entity](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-vehicleposition). Valid values for this field are: |
| | | * **0** - The dataset at this URL doesn't contain TripUpdate entities. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be doesn't contain VehiclePosition entities

| | | * **1** - The dataset at this URL may contain TripUpdate entities. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be doesn't contain VehiclePosition entities

| service_alerts | **Required** | The **service_alerts** field indicates whether the dataset at this URL may contain [an `Alert` entity](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-alert). Valid values for this field are: |
| | | * **0** - The dataset at this URL doesn't contain TripUpdate entities. |
Copy link
Collaborator

@barbeau barbeau Aug 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be doesn't contain Alert entities

| | | * **1** - The dataset at this URL may contain TripUpdate entities. |
Copy link
Collaborator

@barbeau barbeau Aug 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be doesn't contain Alert entities


### feed_info.txt

File: **Optional**
Expand Down