Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balazsbohonyi/d0abae0b0e8fa1f81e0e39ea515b802b to your computer and use it in GitHub Desktop.
Save balazsbohonyi/d0abae0b0e8fa1f81e0e39ea515b802b to your computer and use it in GitHub Desktop.

I need to geotag every photo from trip to .gpx track, but GPX Logger accidentaly stopped. Luckly, i has turned on Google location history.

  1. Takeout location history from google.
  2. Extract .json file
  3. trigger the following commands
git clone https://github.com/Scarygami/location-history-json-converter.git

py location-history-json-converter-master/location_history_json_converter.py -f gpx -s 2017-05-06 -e 2017-05-07 "Takeout/Location History/Records.json" "Takeout/Location History/Records.gpx"

"c:\Program Files\GPSBabel\gpsbabel.exe"  -i gpx -f "Takeout/Location History/Records.gpx" -x transform,trk=wpt -o gpx -F track.gpx
  1. the resulting tracks.gpx file can be analyzed with the following tools for speed data for example:
@balazsbohonyi
Copy link
Author

balazsbohonyi commented Apr 11, 2022

More details about how I used this for single day:

  1. install https://www.gpsbabel.org/
  2. install Python and pip
  3. get the Google Location History data using Google's Takeout service
  4. use the Records.json from Google Location History in the commands below to create the tracks.gpx file
  5. use the ShowGPX or MyGPSFiles online tools to analyze elevation / speed data
git clone https://github.com/Scarygami/location-history-json-converter.git

py location-history-json-converter/location_history_json_converter.py -f gpx -s 2022-04-08 -e 2022-04-08 "c:/temp/_gps/Takeout/Location History/Records.json" "c:/temp/_gps/Takeout/Location History/Records.gpx"

"C:\Program Files\GPSBabel\gpsbabel.exe"  -i gpx -f "Takeout/Location History/Records.gpx" -x transform,trk=wpt -o gpx -F track.gpx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment