API Access to Track Database

Started by hikingforfun, November 05, 2017, 12:30:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hikingforfun

Hi,



I would like to export all of my tracks as GPX and KML files for further processing in GPSies and Google Earth. As I am a long term (and very glad) oruxmaps user, I already have a huge amount of tracks. It would be a tedious effort to export all these tracks.



The track database is stored in sqlite format. It should be straight forward to write a Java program, python script or similar code doing this job.



Has anyone already  written such a program and is willing to share her/his code? I would greatly appreciate any feedback - even if it is only a program fragment.



@orux: I know you don't want to make oruxmaps open source, but maybe you will make an exception for the GPX/KML exporting functions... ;-)

matt

#1
Quote from: "hikingforfun"Hi,

I would like to export all of my tracks as GPX and KML files ......It would be a tedious effort to export all these tracks.

Go to "Manage Tracks/Routes", select ALL tracks of your database with one click on icon on top right (toggle selection). Then press the "floppy disk" button at the bottom.  All marked & exported tracks appear in oruxmaps/tracklogs/



Matt

hikingforfun

#2
Hi Matt,



thanks for your reply. I have organized all of my tracks in huge number of folders. Following your advice I would have to repeat your procedure for every single folder. Or do you know how to select ALL folders for the export?

matt

#3
Oh, sorry. Hmm, if you have a huge number of folders, yes then it may be tedious to export all, using the built-in function.

hikingforfun

#4
Because I did not find any solution, I have written my own python program.

If somebody wants to use it, here is the link: https://github.com/optiprime/omexport">//https://github.com/optiprime/omexport

hikingforfun

#5
Another cool feature is the "--combine" option (see https://github.com/optiprime/omexport">//https://github.com/optiprime/omexport):

python omexport.py --combine

This call will export all tracks into one tracks.gpx file. If you drag and drop or open the file in Google Earth you can browse your hiking/biking/... tracks easily and conveniently.

Google Earth has become a very impressive tool, it has very good maps and nice 3D effects giving you a good visualization about the height profiles of your tracks.

njupalo

Hi,

I was trying to export my tracks but nothing happened.  :'(
Script just create folder tacks and thats it!

What I'm diong wrong?

Regards