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 Helsinki region and click the documentation icon in the upper left corner. This will open the documentation explorer on the left 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 Digitransit 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 Waltti Solutions Oy. For more information and contacts regarding Waltti-areas, see http://waltti.fi/.
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
}
}
}
/hfp/journey/bus//4611,4611B//////+/#A
No, you need to make multiple subscriptions, e.g.
mqtt subscribe -h mqtt.hsl.fi -l mqtts -p 8883 -v -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.