Categories
Arduino CircuitPython Microcontroller Photography Raspberry Pi Pico RTOS

Geotagging Photos

I found a good Instructable, GeoTagging With a Standalone GPS Unit & GeoSetter : 6 Steps – Instructables, to walk through geotagging photos with a standalone GPS device and the GeoSetter application. As a result of reading through the 14 year old Instructable, I landed on a somewhat standard CSV format that GPSBabel understands. As a result, the C++ code was updated in the GitHub repository, richteel/gps_tracker: GPS Tracker and data logger (github.com) to use the ‘Universal csv with field structure in the first line’ format. The first line of the CSV file contains the following headers: utc_d,utc_t,lat,lon,alt,head,speed.

  • utc_d: UTC date
  • utc_t: UTC time
  • lat: Latitude
  • lon: Longitude
  • alt: Elevation in meters
  • head: Heading in degrees
  • speed: Speed in meters per second

See: GPSBabel 1.9.0:Universal csv with field structure in first line (unicsv)

GPSBabel Screenshot
GPSBabel screen showing the ‘Universal csv with field structure in the first line’ format selected

GPS Logger

The GPS Logger that I’m discussing, was one I designed and built. The GPS Logger is Open Source, with the case, PCB, schematic, and code are included in the GitHub repository. The code, which is currently being used is the C++ code in the folder, Arduino/gps_tracker. (The CircuitPython code may be updated shortly as well, but for now, it is best to use the C++ code.) GPSBabel is used to translate the CSV file from the GPS Logger into a GPX file, that GeoSetter may be used to geotag photos.

Software Used

First a note on the time setting on the camera. Previously, I would set the date and time to the local date time, however I frequently would forget to update when using the camera, which was problematic when switching between daylight saving time and standard time. I decided this time to simply set to UTC. I’m not certain if this will be a good solution, but we shall see.

The first step is to translate the GPS Logger CSV file into a GPX file, using GPSBabel.

The next steps are done using GeoSetter. My camera produces JPG files, so I have only set the values for JPEG.

GeoSetter File Settings – JPEG
GeoSetter Data Preferences Settings
GeoSetter Map Settings
GeoSetter Misc Settings

Once the settings have been edited, then it is possible to load the GPX file with GPS data and geotag files in a folder. Start by selecting all the photos in the photos panel to the left.

GeoSetter Application with all photos in the photos panel selected

To geotag the selected photos, go to the menu and select, Edit > Synchronize with GPS Data Files…

GeoSetter Menu – Edit > Synchronize with GPS Data Files…

A dialog will open, with options for synchonizing the photos and GPS information. I have selected the “Synchronize with a Directory containing Data Files:” option. Not sure why, but I needed to uncheck the “Request Time Zone by using Webservice” option for the geotagging to work.

GeoSetter – Synchronize with GPS Data Files dialog window

A dialog showing the number of matched files is displayed. If no matches are found, then you will be prompted to try again or cancel. In this example, all 20 images were matched with GPS data, so the “Yes” option is selected.

GeoSetter – Synchronize with GPS Data Files confirmation dialog

An additional confirmation dialog will be displayed asking if you wish to save the assigned track(s) to the current directory. Select the desired option.

The photos will be geotagged and the positions will now be displayed on the map.

GeoSetter showing a map with the locations of the photos

The photos are not saved at this point. You will need to select Edit > Save Changes, from the menu to write the EXIF information to the photos.

Once the photos have been saved, you may view the photos in Windows Photo Viewer to show that the location information is saved with the photos.

Windows default photo viewer showing that the location infromation is saved in the EXIF information of the photo

Alternatively, you may look at the file properties to see the EXIF information.

File Properties – Details, showing GPS data

By richteel

Software and hardware developer who likes learning new things with a passion of sharing knowledge with others.

Leave a Reply

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

Discover more from TeelSys

Subscribe now to keep reading and get access to the full archive.

Continue reading