Help with general GTFS-RT set up.

257 views
Skip to first unread message

dms-x

unread,
May 17, 2023, 6:15:35 PM5/17/23
to GTFS-realtime
Hello, 

I'm currently working(looking) on the GTFS-RT project. 

I live in Seattle, WA, and I am trying to develop arrival information for a single bus stop, displayed on a website using HTML, JS.

However, after looking at the docs for a while, I still couldn't have the grasp of the concept. 

Even after generating a protobuf file, I don't know what I am supposed to do next to put information on the website.

here is my GitHub which has the protobuf.js file I could make: https://github.com/dms-x/MetroBoomin

also here are the documents for the Seattle King County Metro system's data: https://kingcounty.gov/depts/transportation/metro/travel-options/bus/app-center/developer-resources.aspx

I tried many stuff and originally I wanted to figure it out by myself, but I think doing this while doing my school work is not working well... So I'm looking for a stronger push on my back from the experts.

Thank you so much :)



Stefan de Konink

unread,
May 17, 2023, 6:27:16 PM5/17/23
to gtfs-r...@googlegroups.com
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
one.

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
allows
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
helps.
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
instead
you have to implement more
6. from the planning stop_times.txt find all instances matching the
stop_id,
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.

--
Stefan

Marco Neves

unread,
Jun 18, 2023, 4:10:15 PM6/18/23
to GTFS-realtime
hey Stephan, 

I'm hijacking this thread since I'm having much of the same struggles--
I've got copies of the tripupdates.pb and vehiclepositions.pb which I was easily able to download from here: MARTA REALTIME GTFS FEEDS

I've tried the python bindings example which is super simple but all my request were timing out:
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gtfs-rt.itsmarta.com', port=443): Max retries exceeded with url: /TMGTFSRealTimeWebService/vehicle
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))

I also tried the Java/Android example as well as simply sending it through Postman but everything was to no avail. 

Am I missing something obvious here?

Walter Jenkins

unread,
Jun 18, 2023, 5:16:07 PM6/18/23
to gtfs-r...@googlegroups.com
Have you tried another agency’s rt urls?

--
You received this message because you are subscribed to the Google Groups "GTFS-realtime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gtfs-realtim...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gtfs-realtime/a962265f-b2d3-48cf-b237-3af0f38d4829n%40googlegroups.com.

Marco Neves

unread,
Jun 18, 2023, 6:14:37 PM6/18/23
to GTFS-realtime
I tried it with MBTA's realtime feeds on Postman and they all work instantly-- giving me the binary data. The issue seems to be specific to MARTA's feeds, but what I don't understand is why I'm able to download it manually (I'm not a networking guy at all)

Davide Baltieri

unread,
Jun 18, 2023, 6:57:04 PM6/18/23
to gtfs-r...@googlegroups.com
Have you tried install/reinstall SSL libraries in Python?
Manual download most probably works because the browser take care of SSL automatically

Inviato da Outlook per Android


Da: gtfs-r...@googlegroups.com <gtfs-r...@googlegroups.com> per conto di Marco Neves <marco...@gmail.com>
Inviato: Lunedì, Giugno 19, 2023 12:14:40 AM
A: GTFS-realtime <gtfs-r...@googlegroups.com>
Oggetto: Re: [GTFS-realtime] Help with general GTFS-RT set up.

Joachim Pfeiffer

unread,
Jun 19, 2023, 11:23:17 AM6/19/23
to gtfs-r...@googlegroups.com
As Davide points out, install the certificates locally. Alternatively, you might consider skipping over the certificates. There are a handful of threads on Stackoverflow discussing this:


--
Reply all
Reply to author
Forward
0 new messages