offset \ˈȯf-ˌset\ noun

a force or influence that makes an opposing force ineffective or less effective

Geotagging Photos without GPS Enabled Camera

What happens when you have a camera that has no GPS, but you still want to attach spatial coordinates to the produced images? This post builds upon the last series of posts that dealt with displaying the spatial photo coordinates on Google Earth and people should be aware of the dangers of EXIF tags beforehand.

Some years ago I bought GoPro Hero 4 that doesn't have the GPS module. Newer models have it, but Hero 4, and a lot of other cameras don't. This puts me in a position of having the following use case: in possession of a number of photos that are not spatially tagged. For the solution to work, the timestamp function on the camera needs to be properly set up. I frequently forget to sync up the time on my camera when switching timezones, so this is a reminder that it needs to be checked. The prerequisite is that, at the very least, your camera needs to support tagging the images with timestamps. Well, that and a smartphone handy.

In case of Hero 4, I can sync up with Android and the date/time can be adjusted accordingly.

Assuming you have your camera ready and the timestamps work on it, you can take photos whenever and however you like, but, before you go wild with it, you need to somehow keep track of where you are. Nowadays, most of us own some sort of smartphone that has integrated GPS, and I'm guessing that the majority of the smartphones in question have a version of Android OS installed on it. You can always take the approach detailed in using Google Location history to enrich the photos with geotags; however, this cannot work for me since I turned off the location history in the first place some years ago, which is where the GPSLogger app comes in play for me.

Get the GPSLogger from the Play Store or wherever you get your apps from and start it up to periodically log the coordinates in a file. You keep your phone near you, so it will perfectly tag your location within the reach of your camera. Because it tracks GPS coordinates, it strains your battery, so keep that in mind. I was in Cork, Ireland: 51.897222; -8.47, last weekend so I got up in the morning before the trip and set the logging up with the default settings.


/media/images/cork.jpeg

My battery doesn't have a big capacity (2420 mAh), but I don't use the phone that much. Still, I had to have a powerbank near me just in case. In the end the phone managed to log for the whole day without me needing to recharge it. If you have battery drain issues, you can refer to the FAQ of the GPSLogger app for some tips and tricks, like lowering the frequency of logging, but also keep in mind that spatial locations will give out approximate data anyway.

After a day out in the open where you take your photos, and at the same time your phone happily tags your location, you end up back home with a number of images in your camera and a GPS GPX file on your phone. Now all you need is a PC that will combine what you have.

I use exiftool on Ubuntu or WSL for the purpose of combining them. The easiest way to get it is installing it via APT. The package name is libimage-exiftool-perl:

sudo apt install libimage-exiftool-perl

I make sure that I place all the images from the camera and the gpx file in the same folder and it's really easy from there:

cd image_folder
exiftool -geotag gps.gpx *.jpg

That's really all there is to it. The tool uses the gpx to tag your images with the locations provided from it. Because the locations are approximate at best, for the purposes of checking out the images, it's good enough.

Now with the set of images that are geotagged, you can reference the script from one of the previous posts and make a KML for you to check the things on Google Earth.

Happy tagging!