Monday, June 4, 2012

Google's Protocol Buffer Format - an Android app to convert GPX data to PBF...

i don’t want to give gyan on Google’s protocol buffer format. Please refer to https://developers.google.com/protocol-buffers/ for all the details. When i studied PBF, i developed an Android app which will convert a GPX file into a PBF file. The GPX file has been downloaded from the internet and it is called fells_loop.gpx. i have put it in the asset folder of my Android app. the generated fells_loop.pbf file has been stored in the SD card in the temp folder. with that i have also created a text file called debug.txt in the same folder. this file gives an human readable form of what has been stored in the PBF file.

for simplicity i have serialized just the latitude and longitude of the GPX file into the PBF file.


please find the source code here.

i have taken the help of a google-code project to build the Android app.

i hope this discussion will help all the programmers who are hooked to Google products and Android.

No comments: