Author Topic: Using xmp LocationShown tag  (Read 2993 times)

BogdanH

  • ExifTool Freak
  • *****
  • Posts: 757
  • ExifToolGUI Author
Using xmp LocationShown tag
« on: December 20, 2011, 12:33:14 PM »
Hi Phil,
Right now I'm reading Iptc PhotoMetadata 2010 specification... to be short: how to edit Xmp LocationShow tag? Whatever I've tried:
-LocationShown=MyLocation
-Xmp:LocationShown=MyLocation
-xmp-IptcExt:LocationShown=MyLocation

..etc. I always get
Warning: Improperly formed structure for XMP-iptcExt:LocationShown
Nothing to do.

from ExifTool.

Bogdan

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Using xmp LocationShown tag
« Reply #1 on: December 20, 2011, 12:48:20 PM »
Hi Bogdan,

LocationShown is a structured tag.  You can either write it as a structure:

exiftool -locationshown="{city=some city,countrycode=some country}" ...

or by writing the associated "flattened" tags:

exiftool -locationshowncity="some city" -locationshowncountrycode="some country" ...

Read here, and see the XMP tag name documentation for more details.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

  • ExifTool Freak
  • *****
  • Posts: 757
  • ExifToolGUI Author
Re: Using xmp LocationShown tag
« Reply #2 on: December 20, 2011, 01:46:50 PM »
Thanks for examples. I have read "XMP tag name documentation" (and missed your "Structured.." page), but didn't understand the meaning (how to make use) of struct+ and string_+. As always, concrete example helps a lot  :)
Anyway, this Xmp stuff can be quite complicated. Not only can be programmer's nightmare, but can be confusing for end-user as well: too many "similar meaning" tags (i.e. Author vs Creator)...

Bogdan

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Using xmp LocationShown tag
« Reply #3 on: December 20, 2011, 02:00:40 PM »
Hi Bogdan,

As you point out (the "+" in struct+ and string_+), the LocationShown tags are also list type.  My example shows how to write only one entry, not how to add to existing entries or write multiple entries.  You can, of course, do this too if needed.  Let me know if you want to do this and have any questions.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

  • ExifTool Freak
  • *****
  • Posts: 757
  • ExifToolGUI Author
Re: Using xmp LocationShown tag
« Reply #4 on: December 20, 2011, 03:34:44 PM »
Hi Phil,
Surprise, surprise... I have just tried. If you wouldn' mentioned that, I wouldn't think of possibility that these tags are of list type. Why would anyone put multiple i.e. "cities" in LocationShownCity? I mean, how many cities can be captured in single photo? Ok, from satellite maybe...
Thank you for keeping me informed  :)

Bogdan