juan reyero ←

Phototag, geo- and time-tag your photos in OS-X

Phototag is a program for adding geographic coordinates and date to your photos. I wrote it to make it easy to tag images coming from scans of analog photos, which lack a time tag. However, it is also convenient for digital photos, especially if you don't have a GPS track (if you do, ExifTool can use it to do the tagging for you).

Phototag is a pre-alpha program, meaning that it has only been used by me, and only in a couple of computers. So you should expect problems when you use it. Let me know if they happen, and I'll try to help. In particular, support for GPS tracks is rather sketchy. It works with the NMEA files produced by my AMOD AGL 3080, but I haven't tried it with anything else.

Phototag is an open source Python program. You can find it at github.

If things don't work, a simpler but more mature solution is geotagger.

Usage — tagging workflow

Let me describe how I use it, and you can figure out how it can apply to your workflow. Let's say I just got 36 scanned photos from my last roll. I open them all with Preview. If I have a GPS track from that day I will drop it on tracker, which will in turn send it to trackServer and make it appear on Google Earth. If I don't have a track I will just open Earth.

I position Earth at the approximate location where the photo showing at Preview was taken, and run Phototag; if I had a track, the point of the track closest to the center of Earth's display will supply both the geographical coordinates and the time the photo was taken, and no further interaction is required. If I didn't have a track Earth will supply the coordinates (the center of its display) and phototag will ask me the date and time. When done I move to the next photo in Preview, rinse and repeat.

I also find it convenient to delete the obviously bad photos from within Preview with Cmd-Delete. When I am done I import them into Lightroom.

Prerequisites

Software

You need ExifTool and Google Earth. If you want to use your NMEA GPS tracks you also need GPSBabel. All of them are free and easy to install in OS-X.

Configuring Preview

For some reason Preview does not come with Applescript enabled by default. You will need to enable it if you want to use Preview to let Phototag know which photo you want to tag (and you probably will, as it is a very convenient way to do it).

Open a terminal window (in Applications -> Utilities) and type:

sudo defaults write /Applications/Preview.app/Contents/Info NSAppleScriptEnabled -bool YES

Enter your password when you get the prompt, and you are all set.

Crosshairs for Earth

The crosshairs by Stephan Geens make it easy to know where the center of Earth's display is.

Installation

Download, open the disk and copy the three applications to your Applications folder. I find it convenient to add phototag and tracker to my sidebar.

Components

It has three components:

  1. Phototag does the tagging. If you drop photos on it they will all be tagged with the same coordinates, but time will be asked for each of them if not already present. If you run without arguments it will tag the photo showing at Preview. If the photo to tag has an xmp:dateTimeOriginal date in the header, as will happen if it comes from a digital camera, the date is not touched. If it does not, the user is asked to supply a date-time value, which defaults to the last one entered (and remembered between sessions). The geolocation comes either from trackServer (see below), or from the point at the center of Google Earth's display.
  2. Tracker loads NMEA GPS tracks, and sends them to trackServer. Drop your GPS track on it; it will open trackServer if not already running. Run it without any arguments to close trackServer (below).
  3. TrackServer loads the track, displays it in Google Earth, and listens for geolocation and time requests. When one arrives it asks Google Earth for the point at the center of its display, and returns the latitude, longitude and date-time of the nearest point in the GPS track.

Acknowledgments

I have used icons from the icon archive. The idea on how to ask Earth for its coordinates comes from geotagger. My attempt at explaining how to use Applescript from Python broght in several thoughful comments that made my code better.

Juan Reyero Barcelona, 2009-12-23
 

blog comments powered by Disqus