Geotag XMP & EXIF simultaneously without specifying a timestamp tag

Started by lifeofdave, April 11, 2013, 08:32:19 AM

Previous topic - Next topic

lifeofdave

Hi,

Does anyone know if there's a way to geotag GPS tags into both XMP and Exif tags at the same time without specifying a timestamp tag for geotime?

At the moment I've only succeeded in tagging both simultaneously using this command:

exiftool -geotag gps.log "-xmp:geotime<createdate" "-exif:geotime<createdate" -geosync='0 0:0:5.750' dir *.*

Ideally I would like to avoid specifying 'createdate' as the timestamp to use, and just let exiftool geotag work as standard and grab the first available timestamp from it's list of tags (SubSecDateTimeOriginal, SubSecCreateDate, SubSecModifyDate, DateTimeOriginal, CreateDate, ModifyDate, FileModifyDate).

Thanks for any help.


Phil Harvey

Actually, the -geotime option always assumes DateTimeOriginal if not specified.  It is the -geosync option that grabs the first available timestamp when a sync file is specified (since there is no way to specify the date/time tag for this option).

But it is possible to specify multiple date/time tags (in reverse order of priority) in mulitple -geotime options, and the last valid one is the one that will be used.

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

lifeofdave

That makes sense, thanks for clearing up my confusion! - Dave

Professor331

Hello,

I know I am a noob, but I may have a related problem.  I have been trying to use exiftool and the GUI GeoSetter to create EXIF geo tags.

I am looking for a way to create location GPS EXIF tags on a set of photos.  I have a CSV file with file names, and Lat Long and altitude data.  I do not care about time information, I just want the images tagged with location data.  I am even willing to come up with arbitrary time values as long as I can get the location values.

Could anyone help with a way to do this?  Is there a log file format I can easily produce so that I can add the geo information to the exif tags?  The images are in jpg format.

If this isn't the right forum for this discussion please point me in the right direction.  Even if you can just let me know how to convert this into a recognizable log file format, I can screw around with it and even create my own time values, if that helps.

7000+ images, jpg format 640x480 from a video sequence.  I have lat/long/altitude in a CSV file.

Phil Harvey

The exiftool -csv option can export/import to/from a CSV file.

Use this command on a JPEG containing GPS information to generate a sample CSV file:

exiftool -gps:all -a -csv DIR > out.csv

(where DIR is the name of the directory containing the images)

Then make sure your CSV file is in exactly the same format as the output "out.csv" file.  The first column must be labelled "SourceFile", and the file names in this column must be valid path names.

If your CSV is formatted properly, then you can use this command to transfer all of the information from your CSV file to the images:

exiftool -csv=your.csv DIR

This will work for thousands of images.  Add the -r option to also process images in subdirectories.

Read about the -csv option in the application documentation for more information.

- Phil

Edit: Added -a option to the read command.
...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 ($).