Geotagging using csv input

Started by dshean, August 12, 2014, 03:07:58 AM

Previous topic - Next topic

dshean

Hi,
First of all, just want to say thanks for creating/maintaining such a wonderful tool.

I'm wondering if it is possible to geotag a set of photos using a simple csv file with GPSDateTime,GPSLatitude,GPSLongitude,GPSAltitude

My current workflow creates involves a step to convert my csv to a gpx using gpsbabel before geotagging, and it just seems like it shouldn't be necessary considering exiftool's flexibility.  Maybe I'm missing something?  Thanks.
-David

Phil Harvey

Hi David,

Sorry for the delay in responding.  I've been on vacation.

Sure.  You can do this easily as long as the CSV file is formatted correctly.  The format you want is exactly the same as the output from this command:

exiftool -gpsdatestamp -gpstimestamp -gpslatitude -gpslongitude -gpsaltitude -csv FILE

(where FILE is one or more file and/or directory names)

See FAQ 26 for details.

- 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 ($).

Caja

Hi
Thanks for this great tool Phil! I've been searching for a solution for a long time now and it seems like this post exactly describes my problem. I tried formatting my CSV file correctly but I'm still new to this so I need some more 'tips for dummies' I'm afraid. The file has almost 50k rows and looks like this:

gpstimestamp,gpslatitude,gpslongitude,gpsaltitude
94556.8,51.0455502,-2.1764101,121.9887
94556.8,51.0455504,-2.1764102,122.3269
94556.8,51.0455504,-2.1764103,122.3269
94556.8,51.0455506,-2.1764105,122.3269
94557,51.0455507,-2.1764106,122.3269
94557,51.0455516,-2.1764116,122.3269
94557,51.0455518,-2.1764117,122.3269


(etc)

I need to match the images and the GPS information based on time they were taken. How do I do this? I tried using this command:
exiftool -csv="c:\Users\Phil\test.csv" "c:\Users\Phil\Images"

But I got a message 'No SourceFile (image path) in imported CSV database'

I would appreciate your help!
Kaja

Phil Harvey

Hi Kaja,

The CSV file requires a file name as the first column.  This is not what you want.

You have a GPS log file and you want to associate a GPS fix with an image based on timestamp.  This is the ExifTool -geotag feature, but unfortunately ExifTool doesn't read log files in this format.

I suggest you look into GeoTagger to see if it will read this format.  If not, you may be able to use a utility like GPSBabel to convert this to some other more compatible format.

- 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 ($).

Caja

Many thanks Phil! I'll keep looking