I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-11-20 17:30:35-08 by bogdan
GPS data from XMP to Exif
Hi,

I have XMP file, containing:
... <exif:GPSLatitude>43,41.73866N</exif:GPSLatitude> <exif:GPSLongitude>7,16.53864E</exif:GPSLongitude> ...
I can copy GPSLatitude from Src.XMP to Dst.JPG, for example:
exiftool -tagsfromfile Src.XMP "-exif:GPSLatitude<xmp-exif:GPSLatitude" Dst.JPG
-but when doing this, only Exif:GPSLatitude is copied from XMP. How do I copy "N" (in this case) into Exif:GPSLatitudeRef tag?

Just a though in this regard: if at all, then usually all GPS tags are needed to be copied. In such case, it would be great having something similar to "AllDates"... something like:
exiftool -tagsfromfile SrcFile "-Exif:AllGPS<xmp-exif:AllGPS" DstFile

Thanks for answering.

Bogdan
Direct Responses: 9375 | Write a response
Posted on 2008-11-20 19:23:29-08 by exiftool in response to 9373
Re: GPS data from XMP to Exif
Hi Bogdan,

You need to also copy the GPSLatitudeRef, ie)

exiftool -tagsfromfile Src.XMP "-exif:GPSLatitude<xmp-exif:GPSLatitude" -gpslatituderef Dst.JPG

Doing this will copy the Composite:GPSLatitudeRef to EXIF:GPSLatitudeRef, which is what you want.

The tag shortcuts wouldn't work for this purpose unfortunately. In this case, a .args file and the -@ option is the way to go, as is done when translating IPTC to XMP.

- Phil
Direct Responses: 9376 | Write a response
Posted on 2008-11-20 19:51:24-08 by bogdan in response to 9375
Re: GPS data from XMP to Exif
Thank you very much -exactly what I needed :-)

Bogdan
Direct Responses: 9383 | Write a response
Posted on 2008-11-21 02:05:48-08 by exiftool in response to 9376
Re: GPS data from XMP to Exif
I just realized that you can do what you want with just one argument: "-all>gps:all". I think this should copy all xmp gps to the exif gps. - Phil
Direct Responses: 9395 | Write a response
Posted on 2008-11-21 17:09:04-08 by exiftool in response to 9383
Re: GPS data from XMP to Exif
I had forgotten many of the details of these conversions since I looked into them years ago. (Perhaps I should document some of this.) But I forgot about the XMP:GPSDateTime difference, so the Date/Time stamps must be handled specially.

# translate from XMP to EXIF GPS
exiftool "-gps:all<all" "-gpsdatestamp<gpsdatetime" "-gpstimestamp<gpsdatetime" ...

Note that exiftool will be smart and copy the date part of GPSDateTime to GPSDateStamp, and the time part to GPSTimeStamp (a bit of magic here).

# or you could specify the "all" tags more explicitly to reduce the work that exiftool must to to check all tag names:
exiftool "-gps:all<xmp-exif:all" "-gps:all<composite:all" "-gpsdatestamp<gpsdatetime" "-gpstimestamp<gpsdatetime" ...

# or to copy from EXIF GPS to XMP:
exiftool "-xmp:all<gps:all" "-xmp:gpslatitude<gpslatitude" "-xmp:gpslongitude<gpslongitude" "-gpsdatetime" ...

Here, the GPSLatitude, GPSLongitude and GPSDateTime must be copied separately since these tags are different format in the XMP but are provided as Composite tags for this specific purpose.

- Phil
Direct Responses: 9396 | Write a response
Posted on 2008-11-21 18:51:27-08 by bogdan in response to 9395
Re: GPS data from XMP to Exif
Thank you. This very usefull to know when dealing with GPS data -and my "examples" file is growing and growing :-)

Greetings,
Bogdan
Direct Responses: Write a response