Author Topic: "0 image files updated" When Trying to Geotag (yes, I've rtfm)  (Read 3654 times)


  • Newbie
  • *
  • Posts: 9
I'm using a PHP form to upload an image then add a comment to and geotag said image taken during recording of GPS track.

I can add a comment to the exif using:
Code: [Select]
`exiftool -Comment="$comment" $image`;
I'm trying to geotag using:
Code: [Select]
$return = `exiftool -geotag images/exif/030412.gpx  $image`;$return gives me 0 image files updated 1 image files unchanged

I've been able to geotag a copy of this photo using GeoSetter and the same gpx file, so the data is appropriate.
I've also read that If you see this message without any other warning messages, it is likely that Geotime didn't get set properly.

Code: [Select]
$times = `exiftool -s -time:all $image`; I see from $times that all the dates/times are there.
I added -geotime using both datetimeoriginal and filemodifydate
Code: [Select]
$return = `exiftool -geotag images/exif/030412.gpx "-geotime<datetimeoriginal" -P $image`;
But still get nothing.
What am I doing wrong here?  I've searched the site and forum but can't figure what I'm missing.

If it helps, the form, gpx file and image can be found here


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14895
    • ExifTool Home Page
Re: "0 image files updated" When Trying to Geotag (yes, I've rtfm)
« Reply #1 on: March 06, 2012, 07:28:44 AM »
Hi Mark,

I'm glad you read the manual. :)  Did you read point number 3 in the troubleshooting section?

With the -v2 option, you can see what is happening:

Code: [Select]
> exiftool -geotag 030412.gpx -v2 test.jpg
Argument "-Geotime<DateTimeOriginal" is assumed
Loaded 364 points from GPS track log file '030412.gpx'
  GPS track start: 2012:03:04 23:48:41 UTC
  GPS track end:   2012:03:05 02:49:19 UTC
Writing File:Geotag
======== test.jpg
Setting new values from test.jpg
  Geotime value:   2012:03:04 21:34:12 UTC
Warning: Time is too far before track in File:Geotime (ValueConvInv) - test.jpg
Warning: No writable tags set from test.jpg
Nothing changed in test.jpg
    0 image files updated
    1 image files unchanged

Note that the results may be different in your time zone.  In your image, the value of DateTimeOriginal is 2012:03:04 16:34:12.  Since no timezone is specified, ExifTool assumes the local timezone of my system (-05:00), which puts the image time outside the GPX track.  In order for DateTimeOriginal to be inside the GPX track, the timezone must be -07:00 or later (more negative).  You can specify the timezone like this:

exiftool -geotag 030412.gpx '-geotime<${datetimeoriginal}-08:00' -v2 test.jpg

(use double quotes on Windows, or single quotes as above on Mac/Linux)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).


  • Newbie
  • *
  • Posts: 9
Re: "0 image files updated" When Trying to Geotag (yes, I've rtfm)
« Reply #2 on: March 06, 2012, 12:33:45 PM »
Thanks Phil

The extra info from using -v2 is just a little helpful!  And now that I figured out how to use Putty to actually run ExifTool from a command line, things are looking up even more.
I may have thrown myself into the deep end here, but at least I'm not completely drowning yet.

Thanks again for your help!


-I did read the manual.  At least some of it!