Add GPS Coordinates to EXIF

Started by Like2Hike, March 07, 2015, 11:28:54 AM

Previous topic - Next topic

Like2Hike

Haven't earned my EXIFTool wings . . . yet.

So I have 100's of photos with no EXIF data, NONE. I have them in an Excel SS with file name and Lat, Long. I want to add just the coordinates so I can view the photos, geo-referenced on the map, in my Garmin GPS. I know it works because I used EXIF Pilot to manually add coordinates to a pair of images and viewed them in my handheld GPS.

I read in the FAQ that the import csv and export csv have the same format. Exported the 2 images to a csv and got 35 columns of data, most unrelated to coordinates. When I try to import a csv file I consistently get: 1 dir scanned, 0 image files read. This suggests Exiftool liked the command syntax but not the csv file.

Do I need 35 columns of input data? Some of which I don't know, thumbnail size? Does column order matter, other than SourceFile? I've attached my csv import file, may help. Anything jump out to try?

Going through the website I'm amazed what Exiftool will do, I'm anxious to get over the Newbie hump.

Thank you

Phil Harvey

You can output as much or little as you want by specifying the tags when you generate the CSV file.  But it sounds like you want a CSV with only these columns:

SourceFile,GPSLatitude,GPSLongitude

If you can generate this file from your spreadsheet, then ExifTool should be able to read it

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

Like2Hike

Sounds simple enough, but it didn't work.

Here's my command line:
Quote
M:\>exiftool -csv="M:\Test\SanJuan.csv" "M:\Test\Images"
    1 directories scanned
    0 image files read
It took ~10 sec for the message to appear, so exiftool was chewing on something. The folder "Images" had no image files with EXIF geotags. I've attached the csv file. The source file path is valid, paste into a browser and up pops the image.

Any ideas?

Thanks for the reply.

Phil Harvey

Your command specifies "M:\Test\Images" as the directory, but none of the SourceFile lines in your CSV specify files in this directory.

Also, if there weren't any other error messages, then I would say that M:\Test\Images was empty (or at least didn't contain any images).  ExifTool will take a while unpacking the temporary files the first time it is run.  After this, it should return quickly when running on an empty directory.

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

Like2Hike

Quote from: Phil Harvey on March 07, 2015, 07:07:07 PM
Your command specifies "M:\Test\Images" as the directory, but none of the SourceFile lines in your CSV specify files in this directory.

Oh, I thought the second argument was the output path. Since SourceFile gives an absolute path to each image, why is the second argument even needed? I got the syntax from the FAQ on Import, #26.

Apparently this worked, 10 images updated.

Thanks for the help.


Phil Harvey

As with all ExifTool commands, you specify the file on the command line.  I can see how this is confusing in the case of the CSV file, but one advantage is that you can read in an entire CSV database yet still specify which of the files you want to change.

Glad it works now.

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