If you have any questions related to query types, their fields and parameters, please use the Docs functionality of GraphiQL.
For example, open GraphiQL for the Timisoara region and click < Docs in the upper right corner. This will open the documentation explorer on the right side of the screen.
To display actual route geometries, GTFS shapes are needed. These are not necessarily available for all cities and routes, but are generally added to the source material of OpenTransport as they become available. Availability of route geometries depends on the local public transport authorities. In Finland, route geometries for towns part of the Waltti-system are managed by LMJ Oy. For more information and contacts regarding Waltti-areas, see http://www.lmj.fi/ and http://waltti.fi/.
If the query type takes only one argument, GraphQL batching can be used to fetch multiple items.
If the query type takes a list as a argument, create a list of ids to request data for and use it as the argument. For example, the query below can be used to query data for two stops.
{
stops(ids: ["HSL:1173429","HSL:1291501"]) {
name
code
lat
lon
}
}
In order to build your query you first need to know which endpoint to query. If your city is part of Waltti, for example, you should use the Waltti endpoint. You'll find the endpoint URL's here. Then, you need to find out the ID of the stop you are interested in. If you don't know it yet, you can start by querying all stops according to the first example on the Routing API stop page. After this, you can use the last example provided on that page to query for stoptimes for the particular stop.
By querying the stoptimes for a pattern (of a route or stop), you can investigate the
timepoint
field of thestoptime
. This field indicates if the stop serves as a time equalization stop for the pattern.
This depends on if you want to know the final stop of a route, or if you want to know if a specific stop is the final stop for any of the routes that serve it. If you want to find out the final stop of a route/pattern, you can simply query for the stops of the pattern you are interested in and the final stop will be the last in the list. If you want to know if a specific stop is the final stop for any of the trips passing through it, query for the list of stops of the trip and check if the stop is last in the list.
Check field
pickupType
of thestoptime
.pickupType
will beNONE
for trips that cannot be boarded from the specific stop. UsuallypickupType: NONE
indicates that the stop is the final stop of a pattern, but in some cases there are stops in the middle of a pattern that are only used for dropoffs. With the query below, you can list trips that use the stop and whether the vehicle can be boarded from that stop.
{
stop(id:"HSL:1040289") {
stoptimesWithoutPatterns{
trip {
route {
shortName
}
}
pickupType
}
}
}
The estimated time of departure, in other words the time of departure according to the schedule, can be queried using
stoptime
. Stoptimes contain the fieldscheduledDeparture
which gives you the scheduled time of departure from that particular stop.
/hfp/journey/bus//4611,4611B//////+/#A
No, you need to make multiple subscriptions, e.g.
mqtt sub -v -h 213.138.147.225 -p 1883 -t '/hfp/journey/bus//2550/#' -t '/hfp/journey/bus//4615/#'
It's simply an (opaque) id number that lets you connect multiple location messages into movement. Depending on the data source, it can also be the license plate number of a car or similar.