News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Using xmp LocationShown tag

Started by BogdanH, December 20, 2011, 12:33:14 PM

Previous topic - Next topic

BogdanH

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

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