So i did quite a big trip recently, and took lots of pictures with my DSLR and occasionally Android phone. Only after coming back did i read about the whole GPX file, tracklog options in Lightroom. meaning i don't have such a tracklog file.

The android phone did geotag most photos it took. (at least, when it got a gps fix i guess)

So my question is, is there some software or way that will automatically copy the geotag from the android's photos to photos taken on the same time with my DSLR?

Or alternatively, generate a tracklog from the geotagged data in the android pictures?


5 Answers 5

  1. It seems that there is no way to create a tracklog from within Lightroom. I just did a Google search on that and looked in Lightroom 4 for options.

  2. You can create a tracklog from your geotagged pictures using exiftools.

    Save the following print configuration to a file named gpx.fmt in your working directory.

    # File:         gpx.fmt
    # Description:  Example ExifTool print format file for generating GPX track log
    # Usage:        exiftool -p gpx.fmt FILE [...] > out.gpx
    # Requires:     ExifTool version 10.49 or later
    # Revisions:    2010/02/05 - P. Harvey created
    #               2018/01/03 - PH Added IF to be sure position exists
    #               2018/01/06 - PH Use DateFmt function instead of -d option
    # Notes:     1) Input files must contain GPSLatitude and GPSLongitude.
    #            2) Add the -ee option to extract the full track from video files.
    #            3) The -fileOrder option may be used to control the order of the
    #               generated track points when processing multiple files.
    #[HEAD]<?xml version="1.0" encoding="utf-8"?>
    #[HEAD]<gpx version="1.0"
    #[HEAD] creator="ExifTool $ExifToolVersion"
    #[HEAD] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    #[HEAD] xmlns="http://www.topografix.com/GPX/1/0"
    #[HEAD] xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
    #[IF]  $gpslatitude $gpslongitude
    #[BODY]<trkpt lat="$gpslatitude#" lon="$gpslongitude#">
    #[BODY]  <ele>$gpsaltitude#</ele>
    #[BODY]  <time>${gpsdatetime#;DateFmt("%Y-%m-%dT%H:%M:%SZ")}</time>

    Run the following command. It will read all the geo information out of the exif data from the android pictures and create a XML document formatted in the GPX way.

    exiftool -fileOrder gpsdatetime -p gpx.fmt -ext jpg . > out.gpx

You can use an Eyefi sd card in your camera so as the card sends the files to your android device, the Eyefi app will add the GPS info to the EXIF data. Totally automated.


While it isn't an automated solution, if you manually select the group of photos that you took at the same location as one from Android, you can Ctrl-click (or Command-click for Mac) on the location on the map that the Android photo is at and it will place them with it and update the Geotagging.

  • exiftool can be used to create a gpx file, as Unapiedra describes. In some Linux distributions, the gpx.fmt is already installed. After the gpx file has been created, exiftool can be called again to tag untagged files. Change filenames and time-zones as appropriate.

    exiftool -fileOrder gpsdatetime -p /usr/share/doc/libimage-exiftool-perl/fmt_files/gpx.fmt -ext jpg . > out.gpx
    exiftool -if 'not ($GPSLatitude or $GPSLongitude)' -geotag out.gpx '-geotime<${createdate}-00:00' -r -ext jpg  .
  • If you have Google Location History turned on, you can download KML files from Google Timeline or Takeout. Then use exiftool to tag your photos.

    exiftool -if 'not ($GPSLatitude or $GPSLongitude)' -geotag history.kml '-geotime<${createdate}-00:00' -r -ext jpg  .

Please check out this tool https://github.com/stxh/gpsMerge You can use your phone photos as GPS source to sync your camera photos The python tool easy runs on Mac and Linux. As windows user, you can donwload stand along package from its release section.

  • \$\begingroup\$ Hi and welcome to Photo.SE! Nice to see that you wrote a package to do this, it seems very useful. Could you please edit your answer to include that you wrote it? It's considered good practice to reveal any involvement when suggesting software. Also, there is a lack of information on how to use this tool. I found that after you download the release, there is a README with more info, but that's a bit cumbersome to find. Could you perhaps expand your answer with an example on how one would use the tool? \$\endgroup\$ Commented Apr 21, 2021 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.