GPS and Your Photos
Volume Number: 25 (2009)
Issue Number: 01
Column Tag: Photography
GPS and Your Photos
How location-based data in your photos
can help you organize them
by Norbert M. Doerner
GPS inside photos?
You surely know that GPS (Global Positioning System) can be used to navigate your car through the maze of streets, but it might be surprising to hear of GPS in connection to your growing digital photo collection. But if you travel a lot, and take photos at any locations around the world, it is very helpful to actually know precisely where that photo was taken. Take a look at figure 1 and tell me what location it shows! I still remember that now, because it is a spectacular view in western Ireland, but other photos might not be so obvious to place, and in a few years, I might have also forgotten the details about this place as well. This article explains all the steps in the workflow of adding and managing GPS data in your photos, and shows you what tools are available on the Mac to help you with that task.
Figure 1. Where on Earth was this photo taken?
EXIF, IPTC, and GPS
Any picture you take with your digital camera automatically receives a whole set of useful metadata, such as the F-Stop, aperture, exposure time, the focal length used to take the photo, the name of your camera, and the exact date and time, among others. This information is stored in the EXIF section of the file, and that is also the place for the GPS data, consisting of the longitude, the latitude, and even altitude values.
Another useful section of metadata in a photo file is the optional IPTC part, which contains textual information, such as a caption, headline, keywords, and copyright. The IPTC record also includes the city, state, and country, but all these fields usually have to be entered manually. You can do that in Adobe Bridge or Photoshop, and is certainly helps finding your files already.
Figure 2 shows both EXIF and IPTC fields of a typical photo, seen here in the CDFinder Inspector. The sample file contains GPS tags in the EXIF section, as well as several fields of textual information in the IPTC part, such as the caption.
Figure 2. EXIF and IPTC metadata of a photo
Is it tagged already?
The Finder doesn't indicate whether a file contains embedded GPS tag data or not. But Preview.app at least shows the geographic coordinates in its Inspector window; in Leopard that window even has a small map for better visualization, though you first have to open the file in Preview to see all that.
A much quicker way uses GPS-Info CMM, a free contextual menu extension for the Finder. If a photo has embedded GPS tags, this plug-in displays the geographic coordinates directly in the context menu, as shown in figure 3. But the numerical values are just a first indication; most people won't really know where on Earth this place actually is.
The de-facto standard in geographic visualization is surely Google Earth, a free application that displays a world globe, and allows you to zoom down to the street level, using photos taken from satellites or airplanes to display the entire planet.
The GPS-Info plug-in is able to talk to Google Earth, by using a mighty submenu with plenty of tools to work with the coordinates. It can reveal the location where the photo was taken in Google Earth, even launching the application, if necessary. But it can also show photos that were taken at this spot in the photo portals Panoramio, Flickr, and SmugMug. Also, it offers direct access to Google Maps, MapQuest, and the WikiMapia service. And if that is not enough, you can even extend that submenu with your own URLs by adding them to the GPS.strings file inside the GPS-Info bundle.
Figure 3. GPS-Info shows a geolocation directly in the Finder
And since this is MacTech, you can whet your fingers now and add a nice new web service to GPS-Info CMM yourself! Open the bundle of GPS-Info CMM, located in ~/Library/Contextual Menu Items/, and then open the file GPS.strings with your favorite text editor, TextEdit will do fine.
Geocaching is the modern day treasure hunt for adults, where a cache of funny or silly items has to be found with a GPS unit and hints left on websites. We want to add the ability to find any geocaches located near our selected photo. To do that, simply add the following two lines at the bottom of the file:
Listing 1: GPS.strings
"a7" = "geocaching.com";
"b7" = "http://www.geocaching.com/map/default.aspx?lat=%f&lng=%f";
It is possible that you need to use a different number instead of 7 as the index in both lines, depending on how many other entries are already contained in that file. The first line is the string that will appear in the menu, the second line the URL that will be loaded. The %f will be replaced with the actual coordinate values, just like in a printf statement. Now save the file and log out, as contextual menu plug-ins will only load into the Finder when it is launched. Then select the context menu of a geotagged photo, and in the GPS-Info submenu, you will see a new entry named geocaching.com. Selecting it will open the website and shows you the geocaches available next to the GPS position embedded in the photo file.
Getting GPS data into a photo
There are three ways to add GPS information to an image file. The first is to manually add it, with the help of a map and some software. The second way uses a GPS logger to get a list of locations or tracks, and combines that with the actual photos. And the third is a new camera that automatically does all the work for you, or a small device attached to an existing camera.
For all your existing digital photographs, manually adding GPS tags is the only choice you have. Fortunately, that is not as hard as it sounds, thanks to some nifty tools, such as the free Geotagger, written by Craig Stainton. It won't get any simpler: Launch Google Earth, select the position you want, and drag your photos into Geotagger. That is all! Geotagger will read the current location out of Google Earth, and write it into all photos.
One little problem here is that the main window of Google Earth can be quite large, and the current geographic location is at the exact center of the displayed map. A useful tool named crosshairs.kmz will place crosshairs at the exact center, making the tagging much easier and more precise.
Somewhat more elegant is the donationware PhotoInfoEditor. Its clean interface offers a built-in Google Map, and can tag a long list of photos quickly, even with different locations. PhotoInfoEditor gives you extra text fields where you can enter the IPTC description and comment into your pictures, and will also set the city, state, and country for you as well. One flaw in the workflow is the insistence of PhotoInfoEditor to write the modified images to all new files, rather than adding the tags to your existing files.
Probably the best workflow uses the new Graphic Converter 6.2: The browser can read the current location out of Google Earth and quickly place it in all selected photos. Graphic Converter is also the only tool that writes the view direction, tilt, and distance into the photo as well. Since the browser of Graphic Converter badges all geotagged photos with the red Geotag Icon, you can quickly see which pictures you still need to process. That is a very smooth way to geotag your photos quickly.
Figure 4. Graphic Converter has a powerful browser with geotagging support
Use Tracks
Better than manually tagging your photos is a semi automatic process that uses a tracks file. This is essentially a list of geographic locations with an exact date and time, simply recorded along your way at either fixed time intervals or after a certain distance traveled. If you have set the clock in your camera to the correct time, this makes it possible to find out when you took which picture where.
You can get a tracks file from many GPS devices, including Garmin and TomTom navigation units. It is a good idea to check your existing navigation device to see if it can already record tracks along the way. To get that list of tracks out of the unit, you need either the software that comes with the unit, or a generic tool, such as LoadMyTracks, which supports a very large number of GPS devices.
With LoadMyTracks, you first transfer the tracks file to your Mac. Then you need software to find the coordinate for every photo and write it into the file. If your tracks file uses the common GPX format, you can use Graphic Converter for this. One potential problem here is a time offset. If the time in your camera wasn't set correctly, Graphic Converter won't be able to match the proper coordinate value to your photos. In that case, PhotoGPSEditor is a solution. Similar to PhotoInfoEditor of the same developer, this clean application has a map, and offers to set a time offset to compensate for a misaligned camera clock when matching GPX data. Unfortunately, PhotoGPSEditor also won't simply write the GPS data into your existing photo files, but forces you to save the modified photos into new files.
Figure 5. Match photos to a GPX tacks file, using PhotoGPSEditor
A second useful free tool, GPSPhotoLinker, offers similar functionality, but lacks a map. Instead, it directly changes the GPS and IPTC values in all selected photos, making the workflow easier and quicker.
While the GPX file format is widely supported now, you may have tracks files in any number of other, older formats, such as NMEA, TRK, or GPI. The Swiss army knife for converting geodata into any format is GPSBabel, a cross-platform command line tool that has a Mac GUI named GPSBabel+. This also supports the more modern KML file format that Google Earth has introduced.
If you don't already own a navigation unit, several small battery powered devices, called GPS logger or tracker, are available to track coordinates. They are no larger than an ancient analog film cartridge, and include a battery, the entire GPS receiver, and a memory chip that stores the tracks.
No Mac software at all comes with the affordable Holux m-241 logger, which is otherwise a very nice unit, as it offers a small display that makes it possible to show speed and distance even during the tracking. It also uses Bluetooth, so it can transfer GPS positions without a cable. But to get the tracks to the Mac, you need a very ugly Java open source application called bt747, which is quite hard to set up, though a very helpful guide is available online. Once I had configured the software properly, I could quickly transfer the tracks to my Mac, and even convert the coordinate list into several formats, such as GPX, KML, and NMEA.Much better Mac support is available from GiSTEQ for their PhotoTrackr units. The small PhotoTrackr Lite is a bit larger than the Holux, and offers neither display nor Bluetooth, but the recently introduced Mac software is really useful. It quickly loads the track data from the device, and writes the coordinates into your photos. It even has basic album features, exports photo slide shows in Flash, and presents your images on a nice map. One huge problem, though, is the complete lack of support for RAW photos. Since most people initially using GPS tracking will be professional users, this missing feature is a real deal breaker for the software. But once you have the GPX tracks file on your Mac, you can always use Graphic Converter or PhotoGPSEditor to attach the coordinates to your RAW photos as well.
Cameras with GPS
As you saw, even the semi-automatic geotagging with a GPS tracker involves quite some work and planning. Wouldn't it be cool if your camera could do all that for you totally automatically? Indeed, that would be very nice and the first cameras with that option are actually available while you read this.
The most popular one certainly is the iPhone 3G, which has GPS on board and automatically tags your photos while you take them. But the iPhone has only 2 Megapixels, and is hardly a serious camera. Nikon jumps into the game with the new Coolpix P6000, a compact digital camera with 13.5 Megapixels and a GPS receiver built-in. Certainly, the next generations of SLR cameras will include GPS chips already.
If you already own a SLR camera, you might be able to extend it with a GPS device. Nikon was aware of the value of GPS for some years already, and had added a serial port to a wide range of professional SLR cameras, such as the D3, D700, D300, D2XS, D2X, D2HS, and the D200. You can get full GPS features on these cameras with a small extra unit, such as the Dawntech di-GPS Pro, or the Solmeta DP-GPS N2, which will also work on a Fuji S5 Pro camera. These units are attached by a small cable, and can be mounted in the flash shoe or the camera belt. Whenever you take a photo, the current GPS position will be written into the image file inside the camera immediately. It really won't get any easier.
For two Canon cameras (EOS 40D and EOS-1D/Ds Mark III), Dawntech also offers a GPS device, but that requires the rather expensive Canon WFT-E2 or E3 (Wireless File Transmitter) to be attached to the camera first.
Figure 6. The Holux m-241 is a nice logger, but lacks Mac software
Find more photos
Adding GPS data to photos can be a lot of work, especially for your existing photos, but it definitely is worth the effort. Once you can see your photo collection on a world globe, or find photos taken near a certain spot, this work really pays off. And that is not all.
Several digital asset management tools already display the embedded picture coordinates. Aperture shows the longitude and latitude values in the Metadata section, but only after you explicitly enable these EXIF fields. A brand new plug-in for Aperture is called Maperture. This freeware displays the embedded geotags in a Google Map view, and offers you to write the coordinate into photos. It installs itself in the Edit with... context menu of Aperture, and is even able to handle multiple images at once.
Adobe Lightroom just displays the geographic values, but has a simple button to show the location in a new Google Map browser page. Microsoft Expression Media can show a map window with a marker placed at the location of one selected photo.
Even iPhoto displays the GPS coordinates in its latest version, but offers no more than that. The free plug-in iPhotoToGoogleEarth expands iPhoto, and allows you to export multiple images into a KMZ file for Google Earth. This is a compressed version of the KML file, and contains photo thumbnails and optionally even the original photo files. After opening that KMZ file in Google Earth, you have a new layer with your photos placed on their proper geographic locations. As the KMZ file also includes the description you have entered in iPhoto, this is a nice and quick way to create a travel album for Google Earth.
With all your photos geotagged, it would make a lot of sense to project them onto a world globe, so you can see quickly where on earth the pictures originate. Ovolab Geophoto is a commercial application that does exactly that. Having your library presented in that way is an interesting experience, and a fun way to browse through your photos. While Geophoto also offers the ability to create and upload Flickr albums, and to add photos from Flickr queries to your library, the demo version is a bit annoying by trying to make you buy the software.
The digital asset manager CDFinder goes a step further with a unique new Find option: Not only does the Inspector in CDFinder display the longitude, latitude, and even altitude values, but it also finds other photos taken near the spot. Simply select a photo containing GPS data, and open the context menu. You will see a whole list of Find options; one of them is to find all photos taken near that location. If you choose this, a new window will appear, Figure 7, showing you where the coordinates are located on a small world map, and asking you for a distance. All you have to do is enter an appropriate value and hit OK, and CDFinder will display all photos that you ever took near that place, regardless of when they were taken, and where they are stored in your disk library. That is a powerful addition to the already extensive Find features in CDFinder, and also offers a new way of browsing through your data.
Figure 7. CDFinder finds all photos taken near a place
Additionally, CDFinder offers the same functions in its GPS submenu you know from GPS-Info, such as to reveal photo location in Google Earth, Google Maps, WikiMapia, and many more. You can also extend CDFinder to support more GPS web services, the same way we did with the GPS-Info CMM. And if you select more than one file at once, the export to a KML file makes that a nifty way to get a whole bunch of coordinates quickly into Google Earth.
More GPS tools and web pages
In the previous sections, we have relied mostly on Google Earth or Google Maps to provide the actual map data. While these are free for personal use, any commercial application may need a suitable license to operate on them. One alternative is OpenStreetMap, a completely free map of the entire world that is being built by countless volunteers. While some world areas might not be covered completely yet, the work is ongoing and includes more roads and places every day. And if you are interested in it, you can even supply your own tracks and new street information to improve the map.
Another valuable source of geographical information is the Wikipedia. Every single entry in this encyclopedia that describes a place or location has its exact coordinates displayed in the top right corner of the page. If you click on that, you will get an extensive list of web services for this particular coordinate, including links to TerraServer or most map services in the web.
The connection from a set of numerical coordinate values to a place name or vice versa might also be very helpful, and the free web service geonames.org provides exactly that. CDFinder uses that service to match a place name, such as Golden Gate with the real coordinates, to enable the proper search for that place in your photo library. Geonames even supplies a list of Wikipedia articles connected to places near the specified location.
The Undiscovered Country
With the introduction of the first Nikon compact camera with a built-in GPS chip, and the major improvements of GPS related software on the Mac recently, it is clear that geotagged photos will be an everyday use in the near future. The software tools still have a way to go, but this article has given you a full tool belt for all steps of the workflow, to successfully work with geotagged photos, and to give you new ways of dealing with the ever-increasing photo libraries.
Related Links
Geotagger: http://craig.stanton.net.nz/software/Geotagger.html
Crosshairs for Google Earth: http://craig.stanton.net.nz/software/files/crosshairs.kmz
GPS-Info CMM: http://www.cdfinder.de/en/en/en/gpsinfo.html
Google Earth: http://earth.google.com/download-earth.html
PhotoInfoEditor: http://www.mmisoftware.co.uk/pages/photoinfoeditor.php
PhotoGPSEditor: http://www.mmisoftware.co.uk/pages/photogpseditor.php
GPSPhotoLinker: http://www.earlyinnovations.com/gpsphotolinker/
OpenStreetMap: http://www.openstreetmap.org/
Graphic Converter: http://www.lemkesoft.com/
GPSBabel: http://www.gpsbabel.org/
GiSTEQ PhotoTrackr: http://www.gisteq.com/MACsoftwaretour.php
LoadMyTracks: http://www.cluetrust.com/LoadMyTracks.html
Bt747 How-To: http://www.trick77.com/2008/07/12/how-to-holux-m-241-with-bt747-v148-gps-logger-software/
Solmeta DP-GPS N2: http://www.solmeta.com/en/products_detail.asp?id=10
Dawntech di-GPS Pro: http://www.dawntech.hk/di-GPS/products.htm
iPhotoToGoogleEarth: http://craig.stanton.net.nz/software/iPhotoToGoogleEarth.html
Maperture: http://www.ubermind.com/products/maperture.php
Geotag Icon Project: http://www.geotagicons.com/
Geophoto: http://www.ovolab.com/geophoto/
CDFinder: http://www.cdfinder.de