Move GPS metadata from XMP to EXIF

Started by sebastianbarria, September 09, 2021, 08:28:13 AM

Previous topic - Next topic

sebastianbarria

Hi.
I have a lot of pictures with this problem:

If I search for the GPS information (exiftool file.jpg -gps* -G) , it exists in the XMP group, but not in the EXIF or COMPOSITE, so windows, qgis and even exiftoolGUI doesn't recognize it as geotagged.
So, the information is present in the image, but in the wrong location/group.

Is there any way to move the information (massively), like "exiftool file-jpg -XMP:gps*=COMPOSITE:gps*" ????
Please, help!

PS: I'm attaching one of the images here

Thanks!

StarGeek

What you'll want to do is download the xmp2gps.args file from github.  Place it in the same directory as exiftool and then you can run this command to copy the data
exiftool -TagsFromFile @ -@ xmp2gps.args /path/to/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

sebastianbarria

Thanks @StarGeek.
I did execute the command, but I get this error:
Warning: No writable tags set from 1025944.jpg

And that warning is being shown on each file...
I don't know where's the problem... please, help!
Thanks!

StarGeek

Quote from: sebastianbarria on September 09, 2021, 05:29:28 PM
Warning: No writable tags set from 1025944.jpg

That tells you that there isn't any XMP GPS tags in that file.  Run this command to double check
exiftool -G1 -a -s -XMP:all 1025944.jpg

Are you sure that the data isn't in a XMP sidecar file instead?
"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

sebastianbarria

Thanks Again StarGeek.

I did execute the command you said, and this was the result:
(I'm just pasting the GPS related tags)

[XMP-drone-dji] AbsoluteAltitude                : +486.09
[XMP-drone-dji] CamReverse                      : 0
[XMP-drone-dji] FlightPitchDegree               : -1.30
[XMP-drone-dji] FlightRollDegree                : +1.20
[XMP-drone-dji] FlightYawDegree                 : +97.20
[XMP-drone-dji] GimbalPitchDegree               : -90.00
[XMP-drone-dji] GimbalReverse                   : 0
[XMP-drone-dji] GimbalRollDegree                : +0.00
[XMP-drone-dji] GimbalYawDegree                 : +99.40
[XMP-drone-dji] GPSLatitude                     : 33 deg 26' 34.97" S
[XMP-drone-dji] GPSLongitude                    : 70 deg 48' 49.37" W
[XMP-drone-dji] RelativeAltitude                : +29.80


So, it seems it has the information in the XMP... I'm not sure how those tags got there
Cheers!

StarGeek

Ah, they are the dji drone tags, not the standard XMP-exif GPS tags.  That will require a minor edit to the xmp2gps.args file.

Open the args file up in a text editor like notepad.  There are three spots where it says XMP-exif.  Remove the -exif part so that it's just XMP, i.e. -GPS:all < XMP-exif:all becomes -GPS:all < XMP:all.

The next problem would be the GPS timestamps.  Run this command on the file and first check to see if GPS:GPSTimeStamp and GPS:GPSDateStamp are set correctly.  They should be set to UTC, not the local time of when the image was taken.
exiftool -time:all -g1 -a -s file.jpg

If they are not set, then look through the rest of the timestamps to see if there is one that is set to UTC.  You'll then want to copy that to the GPS timestamps.

"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

sebastianbarria

Thanks a lot StatGeek!
That solved my problem.

Cheers!