- GeoTagging plug-in
The geotagging plug-in is part of the lighttable view and is used to add geographical coordinates to the EXIF data of selected photos from a gpx file.
This page is correct for the following stable versions of darktable
- introduced with version 1.1 (1.1.2 used for this description)
Reasons for use¶
You are recording your movements during outdoor photo activities with a GPS device and like to add the geo coordinates of the location to the EXIF information of your photos. You don't need this plug-in if your camera has a build in GPS receiver. The GPS device records all your movements in a track file with precise time tags added to each location.
The geotagging plug-in is used to add geographical coordinates to the EXIF data of selected photos from a gpx file. My Garmin devices (Forerunner 305, Forerunner 310XT and GPSmaps 60csx) stores for each track point following data:
|Position in latitude/longitude||<trkpt lat="47.7150476" lon="11.7259344">|
|Elevation in meters||<ele>731.4000000</ele>|
|Time in UTC ( Zulu time)||<time>2013-01-27T08:56:37Z</time>|
Every few seconds a new track point is added to the track file (gpx file). A gpx file of an one hour photo tour contains some hundreds to even more than thousands track points.
What this plug-in actually does¶
This plug-in adds the position information recorded in the gpx file to the EXIF data of your photo. Accurate geotagging requires that the time setting of your camera is fully synchronized with the GPS time. The GPS time is extracted from the satellite signal with a high precision. The time of your camera is far less precise and will deviate from the GPS time in the magnitude of seconds or even minutes.
The geotagging plug-in support you in following tasks:
- calculate the time offset of your camera clock (the “spyglass” button)
- apply the time offset to selected photos (the “tick” button)
- apply the position from the gpx file to the photos (the “apply gpx track file” function)
Calculate time offset¶
Check the time setting of your camera before starting your outdoor photo tour. If you like, set camera time to UTC (Universal Time Coordinated). Not all cameras record the time zone or darktable (exiv2) may not be able to read the time zone correctly from your pictures. Setting the camera time to UTC will avoid this pitfall.
Set the camera time with a precision of a few minutes.
Before or after your outdoor photo tour take a calibration picture of a precise clock showing the time in seconds. If your GPS receiver shows the time take a picture of the display. I used a radio controlled clock (DCF 77).
Import the calibration photo into darktable. The precise time is visible on the photo (usually in local time; in my case UTC +1h). The time recorded by your camera is shown by darktable in the lighttable view in the image information plug-in (“datetime”). In this example the camera time was set to local time. As expected there is a difference.
- Mark the calibration photo in lighttable view
- Click the “spyglass” within the geotagging plug-in
- A small pop-up window opens. Enter the precise time in “hh:mm:ss” from the calibration picture and press the “ok” button
- the time offset is shown in the geotagging plug-in
- The time zone used in the gpx file is UTC. Camera time and calibration picture use local time (UTC +1h). We have to subtract 1h from the calculated time offset to match the time information of the gpx file with the pictures taken.
+00:01:31 – 01:00:00 = -00:58:29
Enter the corrected time offset manually to the time offset field
Apply the time offset to selected photos¶
- Select the photos in lighttable view for which you want to apply the time correction. It is recommended to apply the correction to all photos of the filmroll to keep all photos in the time sequence as pictures were taken during your tour.
- Click the “tick” button to apply the time offset to the selected photos
- Check the correction in the image information plug-in (“datetime”)
Apply the position from the gpx file to the photos¶
- Select the photos in lighttable view which you want to geotag
- Click the “apply gpx track file” button to apply the position information to the selected photos
- Check the latitude and longitude information in the image information plug-in (“latitude” and “longitude”). As usual in darktable the position information is stored in the database and the xmp file of the picture. The RAW file is not touched.
- Check in the map view that the position where you take your pictures are correctly shown. If the picture are not geotagged at all check that the local time to UTC conversion was correctly done. Consider the summer time if applicable (another pitfall). If the pictures are shown in map view but the locations are not correct by some tenth or hundred meters reconsider if you have to add or subtract the offset.
- Exported pictures contains the position as part of the EXIF data
Parameters that can be changed¶
Generally recommended settings¶
Set camera time to UTC to simplify offset calculation
See section “what this plug-in actually does" above
Ups -where to find?