Monday, September 3, 2007

Geo-coding your photos efficiently

I love to take photos and digital cameras have certainly become the norm since the turn of the century. A new gadget from Sony recently caught my attention, because it promises to provide geo-coded Lat and Lon information for digital photos through GPS logging.

It is called the GPS-CS1KA and works on a surprisingly straight-forward principle: you turn the device on as you are taking pictures and it simply records your GPS position every minute or so. It is powered by just one AA battery and can record up to 10 hours of position data on one charge. The device comes with a USB-cable and associated software that lets you transfer the GPS logs to your computer. Then, when you have downloaded your photos from your digital camera into your computer, the software will automatically match the GPS log to the digital photos based on the timestamp information in will add Lat and Lon data to the JPEG files. This is appended to the file as regular EXIF information in the same way that your camera uses to store its metadata (shutter speed, aperture, etc.).

And why does this XML aficionado care about EXIF data? Well, that is really quite simple: the well-known jhead utility allow you to extract EXIF data from JPEG images to automate the process of building and manipulating image collections, and a very popular patch for jhead does, of course, support XML output, which makes this ideal for creating galleries/archives/directories or doing any other kind of post-processing for Web 2.0 apps.

I recently tested the Sony GPS-CS1KA device during an afternoon sail in Nahant Bay on a friend's boat, and the operation was indeed very simple. Once I had merged the photos with the GPS information, I uploaded the photos to my photo sharing website, which provides direct linking with Google Maps to utilize the included position data. You can see the result by going to this photo gallery and then clicking on “show” underneath the word timeline and zooming out a bit – this will show our approximate track that day and each green marker represents one photo, which you can view by clicking on the marker.

1 comment:

Norman said...

I rolled my own with my current GPS (an old Garmin Geko 201). I download the data from the gps (gpsbabel), run the track and the photos through a little Perl script that accounts for the time difference between my gps and my camera (about 2:30 these days) and interpolates the position (rejecting photos taken too far away from a tracked point), and finally write the GPS data back to the EXIF with Exiftool.

Works great!