approved, byrokraatit, ylläpitäjät
0
muokkausta
(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> |