Thursday 7 August 2008

While investigating geotagging and GPS loggers for my above water photographs I stumbled on a novel idea for my underwater photographs. While GPS doesn't really work underwater, I can use the GPS altitude field to store the depth of each photograph and set the latitude and longitude to a specific location for all the photographs.

As previously discussed (Determining the depth of my dive photographs), I am able to determine the approximate depth of each of my photographs by synchronising my camera with dive watch in a similar way to synchronising a camera with a GPS logger. Additionally, I have been storing the latitude and longitude of the dive sites (usually the entry point) in my dive logs for some time. All I needed to do to geotag my dive photographs was generate a GPX file with the latitude and longitude of the dive site and the depth and time stamp data from the watch and then use geotagging software to add the appropriate tags to the dive photographs.

Generating a CSV file from my Lotus Notes dive log was quite simple. GPSBabel supports a format they call Universal CSV (unicsv) which uses the first line to indicate the fields in the following lines. I wrote some new code in my Lotus Notes dive log application to export the depth data from my dive watch into a file containing one line to indicate the fields, one line for the start of the dive (altitude 0) and then one line for each depth reading taken by my dive watch. As the dive watch takes a reading every 5 seconds, the time in the export file is incremented by 5 seconds for each reading. Figure 1 shows a sample of one of my files.

2008/07/26,11:24:27 AM,-34.07055556,151.15722222, 0
2008/07/26,11:24:32 AM,-34.07055556,151.15722222,-1.3
2008/07/26,11:24:37 AM,-34.07055556,151.15722222,-1.7
2008/07/26,11:24:42 AM,-34.07055556,151.15722222,-1.1
2008/07/26,11:24:47 AM,-34.07055556,151.15722222,-.4
2008/07/26,11:24:52 AM,-34.07055556,151.15722222,-.7
2008/07/26,11:24:57 AM,-34.07055556,151.15722222,-.7
2008/07/26,11:25:02 AM,-34.07055556,151.15722222,-.6
2008/07/26,11:25:07 AM,-34.07055556,151.15722222,-.4
2008/07/26,11:25:12 AM,-34.07055556,151.15722222,-.3
2008/07/26,11:25:17 AM,-34.07055556,151.15722222,-.5
2008/07/26,11:25:22 AM,-34.07055556,151.15722222,-.6
Figure 1: A sample of a CSV file exported from my Lotus Notes dive log application containing the simulated GPS data.

After creating the CSV file, my code calls GPSBabel to convert the data to GPX XML. GPX XML can be read my many geotagging programs.

I am using GeoSetter to add the GPS information to the photographs. This is as simple as opening the directory which holds the images, selecting the thumbnails of those images and pointing the software to the directory that holds the GPX files to be synchronised. GeoSetter determines the appropriate files and matches the photograph capture times to the waypoint or track times in the GPX file. The assignment of the found positions can be exact or interpolated. I choose interpolated, but I don't think it interpolates the altitude data. Once synchronised, the data can be saved with the images. I choose to overwrite the JPEG images and create XMP sidecars for the raw (NEF) images. Lightroom is able to read both.

Once the photographs are imported into Lightroom, the latitude, longitude and altitude are displayed in the metadata. While Lightroom correctly stores the altitude as a negative number it unfortunately displays it as a positive number.

Figure 2: EXIF data of a dive photograph as displayed by Lightroom.

Photographs exported from Lightroom show the GPS data in Exif, including the altitude/depth, for example by Opanda IEXIF 2

Figure 3: EXIF data of a dive photograph as displayed by Opanda IEXIF 2.

Having the dive depth available as metadata simplifies my workflow as I no longer have to look up the depth for each photograph.

My work flow for dive photographs is now as follows (new steps in cyan, removed steps in red):

Please leave Feedback if you have any comments or questions about this blog entry.