What Exiftags does Digikam use for its geolocation and timeline sorting? [solved]

I sometimes shoot on film cameras. When I do, I have an android phone app that I use to record camera settings and geolocation data. When I finish a roll of film, I can export a text file with all of the settings.

I store scans of the negatives on my computer. Obviously, the negative scans don’t have the metadata from the Android app.

My friend wrote me a script that will read the text file and then use exiftool to inject the metadata into the scanned TIF or JPG images.

My problem is that after running the script, Digikam will still not show the pinpoint on the map even though there is now GPS data in the Exif metadata.

Similarly, Digikam ignores the Exif date and uses the “last modification time” in its Dates View, even though the exif metadata has dates.

From the Digikam Handbook:

The Dates View organizes your photographs based on their dates. digiKam uses either the EXIF date or, if no EXIF date is available, the last modification time of the file.

I am guessing that maybe we are saving the data to the wrong Exif tags? While the Exif spec may have a few places to store Geo-Coordinates, maybe Digikam only looks in one of them? Can anyone see a problem with this metadata that explains why Digikam neither recognizes the date that it was shot, nor the geotag?

Update: I fixed the date/timeline issue. I had to manually tell Digikam to rescan the metadata info. Once I did that, then the below metadata samples work fine with digikam to put the files in the timeline. I’m still trying to figure out the GPS tagging issue though - the photos are not showing up on the map, even though they are GPS tagged in the Exif data (below).

Example 1: Output of $ exiftool mypicture.tif

ExifTool Version Number         : 11.88
File Name                       : Houston 1_001.tif
Directory                       : .
File Size                       : 29 MB
File Modification Date/Time     : 2022:03:09 16:50:42-05:00
File Access Date/Time           : 2022:03:09 16:51:08-05:00
File Inode Change Date/Time     : 2022:03:09 16:50:49-05:00
File Permissions                : rw-rw-r--
File Type                       : TIFF
File Type Extension             : tif
MIME Type                       : image/tiff
Exif Byte Order                 : Little-endian (Intel, II)
Processing Software             : digiKam-7.3.0
Image Width                     : 2758
Image Height                    : 1834
Bits Per Sample                 : 16 16 16
Compression                     : Uncompressed
Photometric Interpretation      : RGB
Document Name                   : Houston 1_001.tif
Strip Offsets                   : (Binary data 15873 bytes, use -b option to extract)
Orientation                     : Horizontal (normal)
Samples Per Pixel               : 3
Rows Per Strip                  : 1
Strip Byte Counts               : (Binary data 11003 bytes, use -b option to extract)
Planar Configuration            : Chunky
Resolution Unit                 : None
Software                        : digiKam-7.3.0
XMP Toolkit                     : Image::ExifTool 11.88
Image History                   : <?xml version="1.0"?>.<history version="1">.    <file type="original">.        <fileParams fileName="Houston 1_001.tif" filePath="/mnt/Data/Photos/Main Pic Directory/homegrown/2022/01_January/Big Road Trip/Film/Roll 1/" fileHash="1bc6da3c1360ee358fff106c9091b5bc" fileSize="40509702" creationDate="2022-03-03T00:43:19"/>.    </file>.    <filter filterName="transform:resize" filterDisplayName="Resize" filterVersion="1" filterCategory="reproducible" branch="true">.        <params>.            <param name="height" value="2758"/>.            <param name="width" value="1834"/>.        </params>.    </filter>.    <file uuid="dac3af0fbd92dc2210d994c1b139f5561bc6da3c1360ee358fff106c9091b5bc">.        <fileParams fileName="Houston 1_001.tif" filePath="/mnt/Data/Photos/Main Pic Directory/homegrown/2022/01_January/Big Road Trip/Film/Roll 1/Smaller/" fileHash="86bda853a695170cb5d209ed1c461ecd" fileSize="30636644"/>.    </file>.    <filter filterName="transform:rotate" filterDisplayName="Rotate Right" filterVersion="1" filterCategory="reproducible" branch="true">.        <params>.            <param name="angle" value="90"/>.        </params>.    </filter>.</history>.
Image Unique ID                 : 8575ab1503b739d7d93e30b5e8d09b1a86bda853a695170cb5d209ed1c461ecd
Preview                         : (Binary data 149280 bytes, use -b option to extract)
Latitude                        : 42 deg 35' 15.62" N
Longitude                       : 78 deg 58' 59.30" W
Date/Time Digitized             : 2022:01:02 00:00:00
Date/Time Modified              : 2022:01:02 00:00:00
Creator Tool                    : digiKam-7.3.0
Current IPTC Digest             : 703baf167a34981c75b4e4e5f24e1084
Originating Program             : digiKam
Program Version                 : 7.3.0
Object Preview Data             : (Binary data 111959 bytes, use -b option to extract)
Object Preview File Format      : JPEG File Interchange (JFIF)
Object Preview File Version     : 1
Exposure Time                   : 1/60
F Number                        : 4.8
ISO Speed                       : 400
Date/Time Original              : 2022:01:02 00:00:00
User Comment                    : "decrepit barn in grape field"
Exif Image Width                : 2758
Exif Image Height               : 1834
GPS Version ID                  : 2.3.0.0
GPS Latitude                    : 42 deg 35' 15.62"
GPS Longitude                   : 78 deg 58' 59.30"
Aperture                        : 4.8
Image Size                      : 2758x1834
Megapixels                      : 5.1
Shutter Speed                   : 1/60
GPS Position                    : 42 deg 35' 15.62", 78 deg 58' 59.30"

Example 2: Doesn’t Work Either

ExifTool Version Number         : 11.88
File Name                       : Houston 1_001.tif
Directory                       : .
File Size                       : 29 MB
File Modification Date/Time     : 2022:03:09 11:52:08-05:00
File Access Date/Time           : 2022:03:09 11:52:52-05:00
File Inode Change Date/Time     : 2022:03:09 11:52:08-05:00
File Permissions                : rw-rw-r--
File Type                       : TIFF
File Type Extension             : tif
MIME Type                       : image/tiff
Exif Byte Order                 : Little-endian (Intel, II)
Processing Software             : digiKam-7.3.0
Image Width                     : 2758
Image Height                    : 1834
Bits Per Sample                 : 16 16 16
Compression                     : Uncompressed
Photometric Interpretation      : RGB
Document Name                   : Houston 1_001.tif
Strip Offsets                   : (Binary data 15873 bytes, use -b option to extract)
Orientation                     : Horizontal (normal)
Samples Per Pixel               : 3
Rows Per Strip                  : 1
Strip Byte Counts               : (Binary data 11003 bytes, use -b option to extract)
Planar Configuration            : Chunky
Resolution Unit                 : None
Software                        : digiKam-7.3.0
XMP Toolkit                     : Image::ExifTool 11.88
Image History                   : <?xml version="1.0"?>.<history version="1">.    <file type="original">.        <fileParams fileName="Houston 1_001.tif" filePath="/mnt/Data/Photos/Main Pic Directory/homegrown/2022/01_January/Big Road Trip/Film/Roll 1/" fileHash="1bc6da3c1360ee358fff106c9091b5bc" fileSize="40509702" creationDate="2022-03-03T00:43:19"/>.    </file>.    <filter filterName="transform:resize" filterDisplayName="Resize" filterVersion="1" filterCategory="reproducible" branch="true">.        <params>.            <param name="height" value="2758"/>.            <param name="width" value="1834"/>.        </params>.    </filter>.    <file uuid="dac3af0fbd92dc2210d994c1b139f5561bc6da3c1360ee358fff106c9091b5bc">.        <fileParams fileName="Houston 1_001.tif" filePath="/mnt/Data/Photos/Main Pic Directory/homegrown/2022/01_January/Big Road Trip/Film/Roll 1/Smaller/" fileHash="86bda853a695170cb5d209ed1c461ecd" fileSize="30636644"/>.    </file>.    <filter filterName="transform:rotate" filterDisplayName="Rotate Right" filterVersion="1" filterCategory="reproducible" branch="true">.        <params>.            <param name="angle" value="90"/>.        </params>.    </filter>.</history>.
Image Unique ID                 : 8575ab1503b739d7d93e30b5e8d09b1a86bda853a695170cb5d209ed1c461ecd
Preview                         : (Binary data 149280 bytes, use -b option to extract)
Latitude                        : 42 deg 35' 15.62" N
Longitude                       : 78 deg 58' 59.30" W
Date/Time Digitized             : 2022:01:02 00:00:00
Date/Time Modified              : 2022:01:02 00:00:00
Creator Tool                    : digiKam-7.3.0
Current IPTC Digest             : 703baf167a34981c75b4e4e5f24e1084
Originating Program             : digiKam
Program Version                 : 7.3.0
Object Preview Data             : (Binary data 111959 bytes, use -b option to extract)
Object Preview File Format      : JPEG File Interchange (JFIF)
Object Preview File Version     : 1
Exposure Time                   : 1/60
F Number                        : 4.8
ISO Speed                       : 400
Date/Time Original              : 2022:01:02 00:00:00
User Comment                    : "decrepit barn in grape field"
Exif Image Width                : 2758
Exif Image Height               : 1834
Aperture                        : 4.8
Image Size                      : 2758x1834
Megapixels                      : 5.1
Shutter Speed                   : 1/60

We figured this out. If this post ever comes up in a future search for someone, the problem was that we needed to set the gpslatituderef and gpslongituderef tags.

This was done with exiftool:

$ exiftool -exif:gpslatituderef=N -exif:gpslongituderef=W <filename>

Reminder to tell digikam to re-scan the files for metadata after you update them.

Go to either the “Album” or “Item” menu, and choose: “Reread metadata from files.”