News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

How to APPEND data (geotags) to sidecar XMP file?

Started by blacklion, April 11, 2021, 09:00:08 AM

Previous topic - Next topic

blacklion

I have a directory of raw files (RAFs) which I want to geotag by GPX track. I don't want to write into proprietary raw format, so I want to put geotagging information to sidecar XMP files. I'm trying:

exiftool -config ~lev/.ExifTool_config -geotag gps/\* '-geotime<${DateTimeOriginal}+05:45' -o %d%f.xmp -ext RAF -r .

It works as expected if there are no XMP files for given raw files. New XMP files are created, with proper geo tags. But some raw (RAF) files already have sidecar XMPs (with ratings, keywords and all such stuff added by Adobe Bridge). exiftool rejects to update these existing XMP files (which is in line with `-o` options documentation).

How could I put geo tags into existing sidecar XMPs when XMPs already exist, and create new XMPs if they are not exist? I don't want to copy all tags from raws into XMPs, I only want to add geo tags.

Phil Harvey

Take a look at the difference between examples 11, 12 and 13 here.

Your command corresponds to example 11, but I think example 13 is what you want.

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

blacklion

Thank you! It is not obvious, that it could be used not only for copying tags :-)

Phil Harvey

As far as the ExifTool interface is concerned, geotagging is copying tags.  You are copying DateTimeOriginal to the Geotime tag.

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