Ero sivun ”GTFS-RT” versioiden välillä
Ulkoasu
Created page with "===Concept=== GTFS-RT is a lightweight API which allows developers to access public transport data via Google Protobuf protocol (over HTTP). Also JSON over HTTP interface is p..." |
Ei muokkausyhteenvetoa |
||
| Rivi 5: | Rivi 5: | ||
please see https://developers.google.com/transit/gtfs-realtime/ for more information on GTFS-RT. | please see https://developers.google.com/transit/gtfs-realtime/ for more information on GTFS-RT. | ||
===Vechile Positions=== | |||
Vehicle positions feed (JSON) is accessible at http://data.itsfactory.fi/journeys/api/1/gtfs-rt/vehicle-positions/json | |||
Vehicle positions feed (Protobuf) is accessible at http://data.itsfactory.fi/journeys/api/1/gtfs-rt/vehicle-positions | |||
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 vehicle positions (JSON) feed: | |||
<pre> | |||
{ | |||
"header": { | |||
"gtfs_realtime_version": "1.0", | |||
"incrementality": "FULL_DATASET", | |||
"timestamp": 1452109419 | |||
}, | |||
"entity": [ | |||
{ | |||
"id": "0", | |||
"vehicle": { | |||
"trip": { | |||
"start_time": "21:58:00", | |||
"start_date": "20160106", | |||
"route_id": "3" | |||
}, | |||
"position": { | |||
"latitude": 61.527477, | |||
"longitude": 23.706625, | |||
"bearing": 237 | |||
}, | |||
"vehicle": { | |||
"id": "TKL_41" | |||
} | |||
} | |||
} | |||
... | |||
] | |||
} | |||
</pre> | |||
Versio 6. tammikuuta 2016 kello 22.08
Concept
GTFS-RT is a lightweight API which allows developers to access public transport data via Google Protobuf protocol (over HTTP). Also JSON over HTTP interface is provided. Following GTFS-RT related feeds are implemented:
- Vechile Positions
- Service Alerts
please see https://developers.google.com/transit/gtfs-realtime/ for more information on GTFS-RT.
Vechile Positions
Vehicle positions feed (JSON) is accessible at http://data.itsfactory.fi/journeys/api/1/gtfs-rt/vehicle-positions/json Vehicle positions feed (Protobuf) is accessible at http://data.itsfactory.fi/journeys/api/1/gtfs-rt/vehicle-positions
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 vehicle positions (JSON) feed:
{
"header": {
"gtfs_realtime_version": "1.0",
"incrementality": "FULL_DATASET",
"timestamp": 1452109419
},
"entity": [
{
"id": "0",
"vehicle": {
"trip": {
"start_time": "21:58:00",
"start_date": "20160106",
"route_id": "3"
},
"position": {
"latitude": 61.527477,
"longitude": 23.706625,
"bearing": 237
},
"vehicle": {
"id": "TKL_41"
}
}
}
...
]
}