ExifTool Forum

ExifTool => Newbies => Topic started by: blacklion on April 11, 2021, 09:00:08 AM

Title: How to APPEND data (geotags) to sidecar XMP file?
Post by: blacklion on April 11, 2021, 09:00:08 AM
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.
Title: Re: How to APPEND data (geotags) to sidecar XMP file?
Post by: Phil Harvey on April 11, 2021, 09:05:08 AM
Take a look at the difference between examples 11, 12 and 13 here (https://exiftool.org/metafiles.html#EX11).

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

- Phil
Title: Re: How to APPEND data (geotags) to sidecar XMP file?
Post by: blacklion on April 11, 2021, 09:20:00 AM
Thank you! It is not obvious, that it could be used not only for copying tags :-)
Title: Re: How to APPEND data (geotags) to sidecar XMP file?
Post by: Phil Harvey on April 12, 2021, 08:39:11 AM
As far as the ExifTool interface is concerned, geotagging is copying tags.  You are copying DateTimeOriginal to the Geotime (https://exiftool.org/TagNames/Extra.html) tag.

- Phil