Ero sivun ”GTFS-RT” versioiden välillä

1 292 merkkiä lisätty ,  6. tammikuuta 2016 kello 23.20
ei muokkausyhteenvetoa
Ei muokkausyhteenvetoa
Rivi 46: Rivi 46:
* position information: the vehicle's latitude and longitude as well as the bearing (in degrees, rotated clockwise, 0 equals north)
* position information: the vehicle's latitude and longitude as well as the bearing (in degrees, rotated clockwise, 0 equals north)
* vehicle id, which identifies the actual vehicle (bus) in question
* vehicle id, which identifies the actual vehicle (bus) in question
The timestamp field in the header section identifies the time when the response was generated on the server.
===Service alerts===
* Service alerts feed (JSON) is accessible at http://data.itsfactory.fi/journeys/api/1/gtfs-rt/service-alerts/json
* Service alerts feed (Protobuf) is accessible at http://data.itsfactory.fi/journeys/api/1/gtfs-rt/service-alerts
Please note that Protobuf is binary protocol, so your browser probably will trigger download dialog if you use the protobuf URL. Below is a sample of service alerts (JSON) feed:
<pre>
{
  "header": {
    "gtfs_realtime_version": "1.0",
    "incrementality": "FULL_DATASET",
    "timestamp": 1452107062
  },
  "entity": [
    {
      "id": "0",
      "alert": {
        "active_period": [
          {
            "start": 1316466000000,
            "end": 1316552340000
          }
        ],
        "description_text": {
          "translation": [
            {
              "text": "Hämeensilta poikki"
            }
          ]
        }
      }
    }
    ...
  ]
}
</pre>
The feed provides a JSON "entity" list, where each entity represents a service alert. For each service alert, following information is provided:
* active_period: the time during which the alert is valid
* description_text: a description of the alert


The timestamp field in the header section identifies the time when the response was generated on the server.
The timestamp field in the header section identifies the time when the response was generated on the server.
0

muokkausta