Skip to content

imutec/tl2gpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—ΊοΈ tl2gpx

Convert your Android-exported Google Timeline JSON into daily GPX tracks.

Convert a Google Timeline JSON file (exported from Android) into daily GPX track files. Each .gpx file represents a day of location history with standard GPS <trk> data, compatible with tools like Kashmir 3D, Garmin BaseCamp, or QGIS.


✨ Features

  • βœ… Supports semanticSegments format used in Android timeline exports
  • πŸ“† Automatically splits data into daily tracks
  • πŸ—‚οΈ Outputs one .gpx file per day
  • 🧭 GPX 1.1-compliant output
  • 🐍 Lightweight, no external dependencies

πŸ“₯ Input Format

This tool accepts a JSON file exported from the Android "Timeline" export feature (not from Google Takeout). Example top-level keys expected:

{
  "semanticSegments": [...],
  "rawSignals": [...],
  "userLocationProfile": {...}
}

πŸ”§ Usage

1. Install Python (3.7 or higher recommended)

2. Run from command line:

python tl2gpx.py <Timeline.json> <output_directory>

Example:

python tl2gpx.py Timeline.json gpx_output
  • Timeline.json: Your exported timeline JSON file
  • gpx_output: Directory where GPX files will be saved

πŸ“ Output Example

After running the script, you’ll get:

gpx_output/
β”œβ”€β”€ 2023-08-01.gpx
β”œβ”€β”€ 2023-08-02.gpx
β”œβ”€β”€ ...

Each file contains a <trk> element with GPS <trkpt> entries and timestamps.


πŸ§ͺ Sample Use Cases

  • Load tracks into Garmin devices or BaseCamp
  • Analyze or overlay paths in QGIS

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.

About

Convert your Android-exported Google Timeline JSON into daily GPX tracks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages