Geotagging Photos from your Location History

In a recent post, I described a solution to constantly track your location and privately store a history of it. Besides the possibility to find out, where you have been, this can also be used to add GPS coordinates your photos, so that your will never have to wonder again, where a photo has been taken – but without having to buy a special camera with a GPS receiver.

Using the GPX files of your location history and some software like DigiKam (also available for Windows), Darktable or Geotag, it is very easy to store GPS coordinates in photos you have taken with your normal, non GPS-enabled camera. In my opinion, if you simply want to add GPS tags to your photos, Geotag is the fastest and simplest to use.

Geotag

Geotag is a cross-platform Java application, that has two main purposes. The first one is to embed GPS coordinates into the EXIF Data of images. For this, first select the folder with your images (File –> Add Folder …) and let Geotag import the images. This will give you a list of all images in the folder along with the date and time the photo was taken. After that, open the GPS track using File –> Load track from file… or alternatively directly from a GPS logger device. Geotag will always import the GPS track with a timezone of UTC-0 which means you have to set a correct timezone for the images; simply right-click on an image and select Time difference for image … . This feature is especially handy, if you have a lot of images that have been taken in different timezones, e.g. if you are on holidays in several states or countries. In contrast to DigiKam (see below) you can set the timezone individually for every image.

 

After you have correctly set the timezone, Geotag will calculate the GPS coordinates for your images when selecting Search Location … from the right-click menu of the image list. Optionally you can let Geotag search for a place or town name for every image; for this, GeoTag will query geonames.org .

I have used Geotag to put GPS coordinates in about 4.100 images at once. The import of the images and writing of the new EXIF data to the images took some time, but besides that, Geotag is pretty fast. If you simply want to get the GPS coordinates to your images, I would recommend Geotag over DigiKam.

Geotag comes with another feature, that I want to mention here briefly: If you select Show on Map … in the right-click menu of the images, Geotag will show you all your images on an interactive map, so you can browse your images by location.

 

DigiKam

DigiKam is not only a program to add GPS tags to your photos but is a full-blown photo managing software with lots of features, so if you simply want to add GPS tags to your photos, DigiKam will possibly give you more features than you want to have. To add GPS tags to your photos, open the Geotagging dialog using Image -> Geolocation and choose a GPX file from your location history on the Correlator tab. DigiKam will then automatically find the best coordinates from the GPX file by comparing the timestamps of the coordinates in the file and the timestamps of your photos. For more information, see KDE’s userbase article.

Additionally, DigiKam offers a map view of all your photos containing GPS coordinates, so that you can browse them by location instead of date.

Some additional notes…

If you want to use this feature on holiday abroad, don’t forget that your mobile may get the local time over-the-air – but your camera will not. This may result in a significant time-delta which will give you wrong GPS coordinates in your photos. Fortunately, DigiKam (propably Darktable, too) gives you the possibility to compensate such a delta, if you forgot to adjust the clocks of your camera and your smartphone. For Geotag, you have to find the correct timezone adjustment, which will give you correct GPS coordinates.

[Edit 2015-06-14] A better possibility to compensate the differences in the camera- and the smartphone-clock is of course to correct the timestamps of the images, instead of simply compensate the difference when geotagging the images. From my personal experience, I recommend Jhead, which is simple to use and pretty fast. For example, the following command will move all timestamps in the images one hour in the past:

jhead -ta-1:00:00 *.jpg

Jhead can not only correct the timestamps in the EXIF data of the files but also corrects the “last modified” timestamp of files in the file system. A good overview of the features of the tool can be found at the developer’s homepage. [/Edit]

In contrast to using a built-in GPS receiver in your camera, this solution has some major advantages: First of all, you have two devices with two batteries and therefore recording a GPS track for your photos will not shorten the battery lifetime of your camera. If you are low on battery, this will potentially enable you to take some more photos but simply without a geotag. The second advantage is the fact, that the GPS receiver in your camera will normally only be active, if your camera is turned on. If you turn it off, the camera will loose the GPS fix and will need some time after turning it back on, until the new location was aquired; during this time, your photos won’t have saved GPS coordinates.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.