Geotagging Photos from the Field
Sep 25th, 2009 by Steve Block
Introduction
One of the things we often deal with in our field work is taking photographs and recording the positions of those photographs. In the past, one of the common ways to do this was to carry a handheld GPS and write down the locations of photos, or to take waypoints and mark which photographs belong to which waypoint. This has generally worked but is labor intensive and prone to error. It is easy to write down the wrong coordinate, or get back to the office and go “OK, where did I take this again?” I have found myself staring at aerial photographs in Google Earth trying to figure out where I was standing based on the location of trees and buildings because what I wrote down didn’t make any sense.
More recently, we have rented a GPS-enabled camera which is able to store photo locations in the files right in the camera, which is great. We used this in South Africa and the ease of use and overall reliability has been good. The camera tells you where you were standing and what direction you were facing (based on a magnetic compass). For combination with aerials for making land assessments or for developing visual simulations this is incredibly useful. Unfortunately, we don’t always have the ability or time to get a rental put together.
We do, however, have access to several handheld GPS models and our own cameras, and we can use these two items together with a clever software program to link where we were to what pictures we have taken. Think of it as a poor man’s (slightly more annoying) GPS camera. It won’t be able to tell us which direction we were facing, but otherwise will do most of what the dedicated GPS camera can.
Equipment Needed
In the Field
For your in-field work, you will only need two things:
- A handheld or similar GPS device capable of recording track logs which include date and time information.
- A digital camera with a clock that records the time that the photos were taken (this is essentially all digital cameras).
In the Office
For the office work, you will need a few things:
- Software to transfer GPS track logs to your computer.
- Software to transfer digital photographs to your computer (generally this can be done by Windows).
- Geotagging software that can combine the track logs with the photo dates to determine where a photograph was taken.
Taking Photographs
At this point, you have a handheld GPS and your digital camera, and you’re in the field taking photographs of all the interesting things around you, such as the hill you might put a wind farm on, a view of a project from a potentially sensitive area, or the most likely access route that equipment may use to get to the site. But before you start snapping photos you need to get your equipment prepared so that when you come back to the office you can add location data without issue.
GPS
Before you start to take pictures, turn on your GPS and allow it to get a good fix. The Garmin eTrex Legend I use can take a while to find satellites, and needs a clear view of the sky to do so (some newer models can “see” through car roofs and the like, but this older device cannot). You also need to make sure that your GPS is set to record a track log. On the Garmin eTrex, this setting can be found in the Main Menu, under Tracks.
Caution: Be careful about trying to use saved tracks. On some devices, including many Garmin handhelds, saved tracks simplify the track log to save space and strip time data as well. If this is the case then you will not be able to use saved tracks to tag your photographs. The active track log does not have this limitation. If you are using an older device on a multi-day trip, carry the equipment you need to transfer the active track log to your computer before it fills up (generally nightly would be sufficient).
Once you are sure your GPS is recording a track log and has a good satellite fix, you can set up your camera.
Camera
Setting up your camera is fairly simple. The most important thing is to get the camera’s clock set to match the time shown by the GPS, which is set automatically by the satellite constellation. Go to a screen on your GPS that shows the current time, and then go into your camera settings and change the clock to match what is shown on the GPS. I have never been certain how seconds are set in cameras, but my typical workflow is to go to the camera clock setting and set it to the next minute, pressing enter when the GPS hits 0 seconds. Although the GPS records data using UTC (GMT) time, I set the camera to the local time zone and make that adjustment later.
Take Pictures
At this point your GPS is recording track data and your camera time is synced to match the GPS time. From here you can take pictures all day, keeping the GPS with you as you do. I usually carry my camera in one hand and the GPS in the other, and bring both up together when I take a photo (I use the GPS hand to steady my SLR camera; obviously just carrying the GPS with you is probably enough). The only important piece of advice here is to make sure the GPS keeps a good satellite fix.
Transferring Data to your Computer
After taking pictures all day, you’re back in the hotel or office and need to transfer your GPS track logs and photographs so you can sync the two up.
GPS Data
Depending on your GPS and how it connects to the computer, this may be as simple as plugging in a USB cable and copying a file. In my case, I need to use a program to download the track log data to work from. This could be software from the GPS manufacturer, but I use a fairly straightforward piece of open-source GPS data translation software called GPSBabel to talk to my Garmin GPS. It can translate between almost any GPS format, and can talk to most GPS devices. The windows version comes in a zip file that can be run from anywhere on your computer.
To use GPSBabel to download track logs, run the GPSBabelGUI.exe program. The default window is shown in Figure 1. To import data from a GPS device, click the checkbox on the left under the Input section, select the port the device is attached to (USB or one of the serial ports such as COM1), and the format of the data the GPS records in, Garmin in my case. Then click the small button on the far right of the output section to choose a file location to save your GPS track log to. Under the output format dropdown, choose GPS XML (.gpx). GPX is a standard XML based GPS data format supported by most software. Figure 2 shows GPSBabel ready to download data from my Garmin eTrex Legend. The button marked “let’s go” starts the download process, which can take a while so be patient.
Photographs
Transferring photographs from your camera to your computer can be done several ways, one of the most common of which is probably to connect the camera via USB and let Windows transfer the files with the Scanner and Camera Wizard. Otherwise, you can usually use Windows Explorer to copy the photos like any other files. Figures 3, 4 and 5 show copying the files with the Wizard. Using Explorer may be simpler.
Geotagging your Photographs
GeoSetter
At this point you have your GPS track log saved on your computer. You also have the photographs you took in the field while you were carrying the GPS. The data needed to combine your location with your pictures is ready. The rest could be done by hand, but I have found a very nice free program to do the hard work for me. This program, GeoSetter, can easily combine the GPS data with the photographs, show the location of those photographs on a map, write GPS tags into your photo files, and generate Google Earth kmz files that can show your photos as thumbnails in Google Earth.
GeoSetter can be downloaded as a zip file or installer (I had trouble installing it because of insufficient rights so I used the zip file). By default it shows a window with three panes: thumbnails, an image preview, and a map window. The thumbnails view can be browsed much like a regular Explorer window using the toolbar on top. Figure 6 shows an example of the default view. Selecting a photograph in the browsing pane will show a preview in the Image Preview pane, and if the photograph has been geotagged will update the Map view on the right.
Before we get too much farther though you may want to adjust program settings to suit the way you work, including setting the default time zone and Daylight Saving Time preferences under the Data Preferences Tab.
Loading a Track Log
At this point you have GeoSetter open and have browsed to the location where you saved your photographs. You have already saved your GPS track log to your computer as well. Now we can use GeoSetter to add location data to the pictures. First, select the pictures you want to add location data to using the thumbnail browser (Ctrl+A will work if you are tagging all the pictures in a directory). Then, under the Images menu select the Synchronize with GPS Data Files option as shown in Figure 7. This option is also available from the toolbar.
From here you can load the GPX file you saved earlier, and make any Time Zone or other time adjustments you might need to correctly synchronize the tracks and the photos. I generally take photographs in the local time zone (including Daylight Saving Time) where I am, and make the necessary adjustments here. This may be the hardest part of getting the correct locations, and it is important to be careful. Figure 8 continues our example.
If everything went well, GeoSetter will tell you that it has found GPS data for your images, and asks for confirmation to continue. You can also view a report to gage the accuracy of the match between track logs and photographs. The results are not perfect but are usually very close. If you are having trouble with bad matches, it might help to adjust the camera clock more frequently to keep it synchronized with the GPS.
Saving Photo Locations
Now your photos have GPS locations assigned and are shown on the map window. Clicking on any photograph will show a preview of the photo and its location on the map, as shown in Figure 9. At this point you can edit any locations manually if they do not appear correct as well as make other adjustments. I have had good luck so far and generally do not make adjustments. If things appear really off, it would pay to double check your clock offset for time zone adjustment. No changes have been made to the photographs yet.
If everything appears correct, you will probably want to save the photograph locations back to the image files. The GPS data will be permanently embedded into the JPEG file header data in the same location where things such as focal length, photo date, exposure time, and other camera data are stored. To do this, select the modified photographs as before, and push the Save button on the toolbar. GeoSetter will probably ask you to add time zone values to the file dates, so set them to match the photo time zones and hit OK. GeoSetter will now back up your original files and save new copies with embedded GPS data.
After this, you are essentially done. Your photo locations have been added to the files, and you can open GeoSetter at any time to browse through your photos and see them on a number of map types (street map, aerial photographs, terrain). The program will report coordinates for the photos at the bottom, which can be copied and pasted into other programs, and other location-aware programs should be able to read the data from your files. A finished result is shown in Figure 10.
Saving a Google Earth KMZ
One last, very useful trick that you can do with GeoSetter is export a Google Earth KMZ file containing resized versions of your photographs that you can view as thumbnails in Google Earth (GE). This is handy when are working in GE on a project and want to view photos relative to the aerial and terrain data easily, and allows you to easily share this data with colleagues.
Exporting to Google Earth follows a similar process as geotagging files. First, select the photographs you want to save to the KMZ file. Then either select Export to Google Earth from the Images menu or use the Google Earth icon in the toolbar. This is shown in Figure 11. The settings dialog is shown in Figure 12. Setting the thumbnail size to 1024 strikes a good balance between image quality and file size; smaller sizes may be preferable for smaller computer screens.
After saving, you can open the resulting KMZ file in Google Earth. To view all of the photos you will need to adjust the time slider, or you can use the slider to limit the view to certain periods in the file. The final view is shown in Figure 13, and any of the thumbnail images can be clicked to view the larger version in the Google Earth window.












