Reply
Thread Tools
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#1
Does anyone know of a way I can use Google Protocol Buffers .proto files with C++ on Maemo Fremantle on the N900? Presumably it would involve getting the protocol buffer compiler and libraries to build in Scratchbox and then getting the runtime libraries to work on the device (and then packaging the result up in the repos somewhere)

Specifically I am planning to work with Google GTFS-realtime data.

EDIT: It looks like there might be some protobuf stuff in extras but it looks to be old and un-maintained with no-one working on it anymore.
 

The Following User Says Thank You to jonwil For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#2
Originally Posted by jonwil View Post
EDIT: It looks like there might be some protobuf stuff in extras but it looks to be old and un-maintained with no-one working on it anymore.
Yes it is in extras and not the latest version. It is also needed to compile the mosh shell. I tried to compile the latest mosh shell with the protobuf from extras and it was not complaining.
But anyway it would be nice to update protobuf.
 

The Following User Says Thank You to Halftux For This Useful Post:
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#3
Looks like whats in the repos is suitable for compiling the GTFS-realtime .proto file anyway (that .proto file needs protobuf 2.x). So that's all good. Now I just need to find something that can parse the GTFS text files and I am good
 

The Following User Says Thank You to jonwil For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#4
Have a look at stackoverflow. There is a python script which parsing GTFS-realtime.
 

The Following User Says Thank You to Halftux For This Useful Post:
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#5
Parsing GTFS-realtime I can do now that I have been able to compile the protobuf file properly. What I have to find (or write) is something for parsing regular GTFS data (which is comma separated text files in a special format). All the code I can find with Google seems to be either for scripting languages or with web backend languages like Java. Can't seem to find anyone who has written GTFS parsing code in C or C++.
 

The Following User Says Thank You to jonwil For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#6
Originally Posted by jonwil View Post
What I have to find (or write) is something for parsing regular GTFS data (which is comma separated text files in a special format).
Then it looks like you need to write a function on your own could not be so hard.

I don't know maybe that helps:

https://code.google.com/archive/p/gtfsengine/
https://developers.google.com/protoc...cs/cpptutorial

Or attach two files one with the initial data and one with the target format. I could write some function.
 

The Following User Says Thank You to Halftux For This Useful Post:
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#7
I think writing my own makes sense, will be a fun exercise anyway
Although I did see something to convert GTFS data into a sqlite db, that might be a good place to start (since being in an sqlite db means I can write SQL to get the info I need)
 

The Following User Says Thank You to jonwil For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 23:16.