ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: JerryRaack on March 03, 2019, 03:34:06 PM

Title: How to copy AmbientTemperature from .gpx track to jpeg file metadata
Post by: JerryRaack on March 03, 2019, 03:34:06 PM
I'm new to this forum, but have used  exiftool for a number of things.  I regularly go into South America looking for new species of plants.  I document my searches by recording my tracks with a Garmin 550t GPS device (.gpx files), and thousands of photographs (both RAW and JPEG format).  I know how to use geotag to copy the GPS Latitude, Longitude and Elevation from the track file into the JPEG data.  I recently added an Ambient Temperature sensor to my Garmin 550t using bluetooth, and it also now records the Ambient Temperature in the .gpx track log.   How can I use the geotag feature of exiftool to extract the relevant ambient temperature from the correct .gpx trk entry and put that temperature data into the AmbientTemperature field of the corresponding JPEG file (Tag ID: 0x9400, Tag Name: AmbientTemperature, Writeable: rational64s, Group: ExiflFD, Value: degrees C)?   I have a directory for each trip, with a subdirectory for each day of travel.   Each subdirectory has a .gpx track file and a large number of picture files taken on that day.   Thanks in advance for any help anyone can provide.   (P.S. I looked for all forum entries containing the word Temperature and have already read them, but could find nothing about my subject.)
Title: Re: How to copy AmbientTemperature from .gpx track to jpeg file metadata
Post by: Phil Harvey on March 03, 2019, 04:51:41 PM
Hi Jerry,

I would need to modify the ExifTool GPX reader to look for temperature data.  Could you post or email (philharvey66 at gmail.com) a sample GPX with temperatures and I'll see about adding this ability.

- Phil
Title: Re: How to copy AmbientTemperature from .gpx track to jpeg file metadata
Post by: JerryRaack on March 04, 2019, 01:20:09 PM
Phil,
Thanks for agreeing to take a look at this.   I sent a set of 6 photos and the .gpx file to you today via email.
Jerry
Title: Re: How to copy AmbientTemperature from .gpx track to jpeg file metadata
Post by: Phil Harvey on March 04, 2019, 01:33:31 PM
I got the files, thanks.

ExifTool 11.30 (likely to be released in a few days) will have the ability to write the EXIF/XMP AmbientTemperature tag from GPX track logs such as this.

- Phil
Title: Re: How to copy AmbientTemperature from .gpx track to jpeg file metadata
Post by: Phil Harvey on March 06, 2019, 10:06:38 AM
Hi Jerry,

ExifTool 11.30 is now available.

- Phil
Title: Re: How to copy AmbientTemperature from .gpx track to jpeg file metadata
Post by: JerryRaack on March 16, 2019, 09:50:29 PM
Phil,
    Fantastic!   Works perfectly.   I used it to do about 1800 pictures in 9 directories today.   Only thing I saw was that I got a minor
warning message for each file it read as follows:
"Warning: [minor] Error reading PreviewImage from file - ./P1311612.jpg"

But, it worked and copied all the GPS data, Elevation and Temperature to the EXIF metadata of the files from my Track file (.gpx)

THANK YOU SO MUCH!!!!
Jerry
Title: Re: How to copy AmbientTemperature from .gpx track to jpeg file metadata
Post by: Phil Harvey on March 16, 2019, 10:34:42 PM
Hi Jerry,

Glad it worked for you.

The PreviewImage warning is a common problem.  Most image editing programs will remove the preview image, and some cameras write it improperly, either of which may cause this warning.  You may ignore minor warnings like this with the -m option.

- Phil