Discussion:
decode tripUpdates protocol buffer files using protoc.exe and the gtfs-realtime.proto
Daniel
2014-03-24 23:46:02 UTC
Permalink
Hi,

I'm trying to decode some tripUpdates protocol buffer files into a text
file.
I downloaded the gtfs-realtime.proto and the tripUpdates.pb files from
http://gtfs.ovapi.nl/new/ as well as the protoc.exe into the directory
"C:\test".

After executing the command

C:\test>protoc --proto_path=C:\test C:\test\gtfs-realtime-OVapi.proto
--decode=transit_realtime.OVapiTripUpdate C:\test\tripUpdates.pb

I always get the error:

com/google/transit/realtime/gtfs-realtime.proto: File not found.
gtfs-realtime-OVapi.proto: Import
"com/google/transit/realtime/gtfs-realtime.proto" was not found or had
errors.
gtfs-realtime-OVapi.proto:20:8: "TripDescriptor" is not defined.
gtfs-realtime-OVapi.proto:31:8: "VehiclePosition" is not defined.
gtfs-realtime-OVapi.proto:42:8: "TripUpdate" is not defined.
gtfs-realtime-OVapi.proto:52:8:
"transit_realtime.TripUpdate.StopTimeUpdate" is not defined.
gtfs-realtime-OVapi.proto:62:8: "VehicleDescriptor" is not defined.

What am I doing wrong?

Thanks,
Daniel
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Feng Xiao
2014-03-26 18:26:14 UTC
Permalink
Post by Daniel
Hi,
I'm trying to decode some tripUpdates protocol buffer files into a text
file.
I downloaded the gtfs-realtime.proto and the tripUpdates.pb files from
http://gtfs.ovapi.nl/new/ as well as the protoc.exe into the directory
"C:\test".
After executing the command
C:\test>protoc --proto_path=C:\test C:\test\gtfs-realtime-OVapi.proto
--decode=transit_realtime.OVapiTripUpdate C:\test\tripUpdates.pb
com/google/transit/realtime/gtfs-realtime.proto: File not found.
gtfs-realtime-OVapi.proto: Import
"com/google/transit/realtime/gtfs-realtime.proto" was not found or had
errors.
gtfs-realtime-OVapi.proto:20:8: "TripDescriptor" is not defined.
gtfs-realtime-OVapi.proto:31:8: "VehiclePosition" is not defined.
gtfs-realtime-OVapi.proto:42:8: "TripUpdate" is not defined.
"transit_realtime.TripUpdate.StopTimeUpdate" is not defined.
gtfs-realtime-OVapi.proto:62:8: "VehicleDescriptor" is not defined.
What am I doing wrong?
Clearly you need to download a file named "gtfs-realtime.proto" as well and
put it in C:\test\com\google\transit\realtime
Post by Daniel
Thanks,
Daniel
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
René Harmsen
2014-05-06 21:09:13 UTC
Permalink
Hey Daniel,

I'm trying to use the ovapi realtime feeds as well. I get the exact same
error is you and including gtfs-realtime.proto in the folder doesn't help.

Did you manage to solve this?
Post by Daniel
Hi,
I'm trying to decode some tripUpdates protocol buffer files into a text
file.
I downloaded the gtfs-realtime.proto and the tripUpdates.pb files from
http://gtfs.ovapi.nl/new/ as well as the protoc.exe into the directory
"C:\test".
After executing the command
C:\test>protoc --proto_path=C:\test C:\test\gtfs-realtime-OVapi.proto
--decode=transit_realtime.OVapiTripUpdate C:\test\tripUpdates.pb
com/google/transit/realtime/gtfs-realtime.proto: File not found.
gtfs-realtime-OVapi.proto: Import
"com/google/transit/realtime/gtfs-realtime.proto" was not found or had
errors.
gtfs-realtime-OVapi.proto:20:8: "TripDescriptor" is not defined.
gtfs-realtime-OVapi.proto:31:8: "VehiclePosition" is not defined.
gtfs-realtime-OVapi.proto:42:8: "TripUpdate" is not defined.
"transit_realtime.TripUpdate.StopTimeUpdate" is not defined.
gtfs-realtime-OVapi.proto:62:8: "VehicleDescriptor" is not defined.
What am I doing wrong?
Thanks,
Daniel
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Loading...