A Program to download GPX Data from your Traccar Server.
All details like code or Installation instruction can be found on Github
https://github.com/4tegs/traccar2gpx
Download
Nevertheless, you can download the program here as well:
Why traccar2gpx?
I’m doing lots of bicycle or motorbike trips that I’m tracking. The Traccar portal gives me the option to download a range of days and returns them as one track.
See the export options:
Legacy | Modern | API | Traccar2gpx | |
---|---|---|---|---|
Excel | x | x | ||
KML | x | |||
Json | x | |||
GPX | x | |||
GPX Garmin Format | x |
While Traccars export option is pretty good, I have different needs. Let’s compare some options:
Option | Traccar | traccar2gpx |
---|---|---|
Several selections of days, weeks, month, range | x | – |
Selection of Start and End date | x | x |
Track format | KML(GPX) | GPX |
Garmin GPX format | – | x |
Track has a sounding name | – | x |
One track for timespan selected | x | x |
One track for each day | – | x |
Defined color of track | – | x |
Track can be cleaned from trackpoints not in motion or in motion with <2,5km/h | – | x |
Track includes timestamp data of each tracks waypoint | – | x |
Track can be used for geotagging | – | x |
Compatibility
This version has been tested with Traccar 5.4, 5.5.
Configuration file
traccar2gpx is configured by a sidecar configuration file. Here is an example:
1 2 3 4 5 | { "root_url": "your_url:port", "email": "your_email_2_access_traccar_server", "password": "your_password" } |
More about the config file
- The config file must be named: traccar2gpx.json
- The file must be in valid json format.
- There is an example of traccar2gpx.json on Github.
- The file must be in the same directory as traccar2gpx.exe
- The file must include:
- the URL to access the traccar server & the port to access it. Typically this is http://your_url:8082
Remark: http not https!
If you self-host your traccar server, make sure to have the right port forward setup in your router. - your user-id and password that has the proper rights to access your traccar admin API.
- If you feel uncertain of how to write such a JSON file, start traccar2gpx.exe once. It will end with a failure message telling that a new configuration file has been created. Now edit this file by updating with your credentials to access your traccar server!
- the URL to access the traccar server & the port to access it. Typically this is http://your_url:8082
- Viewing the config file after successfully running traccar2gpx you will find additional keys. They are updated automatically and you should not touch them.
Use of traccar2gpx
Option | Explanation |
---|---|
Start Day | Select the first day you want to pull tracks from Traccar. If you just want today, set todays date. |
End Day | Select the last day. If you just want today, set todays date. |
Tracker: | Select the tracker you want to pull the tracks from. |
Color of the GPX Track: | Select the color the GPX tracks should get. |
Clean track: | This removes all trackpoints that have a speed of less than 0.5 km/h or a distance from point to point less than 1m. Don’t use this option if you use the track for e.g. geotagging your pictures, as no motion trackpoints can be of value. |
Get ONE GPX Track: | All trackdata from „Start Day“ to „End Day“ will be pulled into one single track. Usage example: Use the track for geotagging all pictures from a vacation. The tracks name shows the start and end date + tracker name. If there is no file, there wasn’t enough trackdata! |
Get DAILY GPX Track: | One GPX track per day range selected. Each track has the days and tracker name as file- and trackname. If there is no file, there wasn’t enough trackdata! |
REMARK: If Windows Defender claims this program to have a virus: That is an known issue that comes with compiling Python code. Either add an exeption to Windows Defender or run the source code provided on Github instead.
History
Version | changes |
---|---|
1.0 | Initial release |
1.1 | Reworked configuration file with initial setup. |
Menue selection of Tracker, Track Color and Clean Track are now saved in configuration as preselect. | |
Menue window location is now saved in configuration for next start. | |
1.2 | Reworked most of the code. Pulling data from Traccar now in „Standard GPX Format“ and reworking it for use with Garmin Software. |
Added smoothening of elevation data. | |
1.2.b | Removed smoothening of elevation data as algorythms used had no impact. |
You can pull data now back to one year. | |
EXE file didn’t work standalone. Should be fixed now. | |
2.0 | Moved from dayrange to date selection. Added option to pull either a single track or one track per day of selected range. |