Main Menu

Import GPS Data from XMP File

Started by besi2001, November 01, 2024, 05:04:16 PM

Previous topic - Next topic

besi2001

Hello everyone,

I am currently trying to copy the GPS data from an XMP file, but the data is not being copied because the XMP file does not have the expected filename.

Here is an example:

------------------------------------------------------------------------------

Import GPS Data from XMP File

======== IMG_1129.CR2
Nothing changed in IMG_1129.CR2

======== IMG_1129.JPG
Nothing changed in IMG_1129.JPG

Warning: Error opening file - C:\Users\A1\Desktop\canon\202409\IMG_1129.xmp


------------------------------------------------------------------------------

The XMP files are present, but they are named as follows:
IMG_1129.CR2.xmp
IMG_1129.JPG.xmp

Is there a way to still copy the GPS data from these files?

Many thanks in advance.

Screenshot 2024-11-01 220256.png


FrankB

How are you trying to do that?

Via ExifToolGui. What is the menu function you're using?
The functions in ExifToolGui expect only the extension to be different.
So IMG_1129.xmp and not IMG_1129.CR2.xmp

Via the command line? And what is the command?
Very likely someone else can answer the question better.

StarGeek

I know there's a DAM out there, maybe it's DigiKam(?), that uses the File.Ext.xmp format for the sidecar files.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

besi2001

@FrankB:

QuoteHow are you trying to do that?

Via ExifToolGui. What is the menu function you're using?



ExifToolGui, Menu: Export/Import -> Import GPS Data from -> Xmp-Files

QuoteThe functions in ExifToolGui expect only the extension to be different.
So IMG_1129.xmp and not IMG_1129.CR2.xmp

You're right. ExifToolGui is expecting IMG_1129.xmp and not IMG_1129.CR2.xmp. #

@StarGeek:

I used Darktable to add the GPS data from a GPX file. Darktable creates the format File.Ext.xmp.



FrankB

Exiftoolgui doesnt support that currently. I can look into it, but that will not be available soon.

Your best bet would be to copy/move and rename the xmp files.

So IMG_1129.CR2.XMP => XMP\IMG_1129.XMP

That could be done with any tool, but also using ExifTool.

FrankB

Second thought. This might work.

- In Gui Select all files (.cr2, .jpg, .crs, but not the .xmp) to update.
- Use this command in ExifTool direct:

-TagsFromFile %f.%e.xmp "-GPS:GPSLatitude<Xmp-exif:GPSLatitude" "-GPS:GPSLongitude<Xmp-exif:GPSLongitude" "-GPS:GPSLatitudeRef<Composite:GPSLatitudeRef" "-GPS:GPSLongitudeRef<Composite:GPSLongitudeRef" "-GPS:GPSDateStamp<XMP-exif:GPSDateTime" "-GPS:GPSTimeStamp<XMP-exif:GPSDateTime"
Tip: You can save that as a predefined command

et_direct.jpg

besi2001

@FrankB, thanks for the feedback. I tried the first suggestion: I renamed the files, and it worked. It's a bit awkward, but it does the job. I'll try the second suggestion as well, as I think it might be better. I'm curious - I've just noticed that several tools are now using the File.Ext.xmp format for XMP files.

FrankB

Thanks for your feedback.
I have added an issue in GitHub for this, so I wont forget.

https://github.com/FrankBijnen/ExifToolGui/issues/673

FrankB

Hi Besi2001,

Quote from: besi2001 on November 03, 2024, 03:51:42 AM@FrankB, thanks for the feedback.

I made a fix for ExifToolGui. Will be available in the next release V636. Could be a week or two before I release that. Still need to go over the Docs.

Frank

besi2001

Hi FrankB,

Wow, that was quick! Many thanks for the swift implementation. I really appreciate it. Sorry for the late reply. I'm looking forward to the new version, V636.

Have a great start to the week, and see you soon.

Besi2001

FrankB

Hi Besi2001,

Wasn't too much work. I'm still busy testing, fixing bugs, and updating the docs for the new version. I hope to finish that within 1 to 2 weeks.

I you like you can download a pre-rel here: https://1drv.ms/f/s!AhVJC-QzM33pknOS7KwBi09lgNql?e=n7ztFX

I've changed the Import function like this: If it finds a file named 'filename.ext.xmp' it uses that, else it uses 'filename.xmp'. It is assumed that all selected files have the same named .xmp sidecar file!

But please note that the pre-rel contains a lot of other (not yet fully documented) changes as well.

Frank

besi2001

Hello FrankB,

sorry for the late feedback. Unfortunately, you don't always have time for the nice things.

I installed the latest version today and tried it out straight away. It works perfectly. Many thanks for the quick update.

Have a happy new year.

Best regards
besi2001