On Thursday, May 18, 2023 12:15:35 AM CEST, dms-x wrote:
> Even after generating a protobuf file, I don't know what I am supposed to
> do next to put information on the website.
First, if you are not an operator or a transit agency which operates
vehicles, you are not producing a protobuf file, but instead should consume
It starts with finding the GTFS-RT tripUpdates.pb file, if it exists you
are lucky :) For a single bus stop your code should do the following:
1. download a GTFS zip file (the planning)
2. find the stop of interest in stops.txt
3. download the tripUpdates.pb file about once per minute,
do something smart, implement expires headers and everything that
you to cache the result so the server only sends you a new update
4. if you are lucky the tripUpdates.pb file contains a prognosis for all
future stops, you can find them by the 'trip_update' having
'stop_time_updates'. A binding in your programming language of choice
5. dependent on the variant of tripUpdates.pb you may filter for
stop_time_update having a stop_id, if it contains an stop_sequence
you have to implement more
6. from the planning stop_times.txt find all instances matching the
for this instance store trip_id and stop_sequence.
7. now refer back to tripUpdates.pb and try to match all trip_id's you
have in your just filtered set.