alicant
alicant

Reputation: 63

Converting gtfs rt feed (service alerts) to .pb file

Is there any way to convert from gtfs real time feed (service alerts) to .pb (protocol bufers) file.

Sample service alerts file : https://developers.google.com/transit/gtfs-realtime/examples/alerts

Upvotes: 0

Views: 1129

Answers (2)

Tony Laidig
Tony Laidig

Reputation: 1078

I think you might be confused.

GTFS-Realtime is typically encoded in Protocol Buffers format-- which is designed for efficient machine to machine communication. This is not human readable, so many servers include a human readable version.

Since you didn't give enough detail for the source, I can't give a specific answer, but you may need to specify a format in the GET parameters or in the request headers to receive protobuf.

Upvotes: 2

Evan Siroky
Evan Siroky

Reputation: 9438

There are a bunch of code examples linked on that same page. Here's one for Python: https://developers.google.com/transit/gtfs-realtime/examples/python-sample

Upvotes: 0

Related Questions