LocationCreated should be struct, not struct+

Started by mahikeulbody, August 22, 2012, 09:00:01 AM

Previous topic - Next topic

mahikeulbody

According to IPTC Photo Metadata: Core 1.1/Extension 1.1 (July 2010) - Doc Rev 1, LocationCreated has a cardinality 0..1  so it should not be a struct+ as defined into Exiftool. See attached doc.

(there is the same problem for LocationShown)


Phil Harvey

Interesting.  As you can also see, it is defined as an XMP "Bag", which automatically makes it an ExifTool List tag.  Currently there is no mechanism in ExifTool to limit the number of items in an XMP Bag.

Why did they define it as a Bag if you can only have 0 or 1 elements?  Odd.

I see there are some other tags with restricted cardinality (ie. Licensor is 0..3).  For these, ExifTool does not restrict the number either.

- 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 ($).

mahikeulbody

You are right and, I agree, it is odd. I sent an inquiry about this point to IPTC org. I did not hope an answer but I just received one of the managing director :

Hi Michel,

good point. I checked all versions of the IPTC Extension schema and even had
a look into our internal drafts. This divergence in cardinality and Bag
structure is there from the beginning, maybe we had some thoughts about a
potential extension of the cardinality at this time.

Unfortunately this definition is not a perfect design but on the other hand
it does no harm. As "downgrading" the Bag to a single structure would spoil
the backward compatibility there is no chance to modify this specification
anymore.

Thanks for pointing at it.

Michael Steidl
Managing Director of the IPTC [mdirector@iptc.org]



Phil Harvey

Very nice that they are so responsive.  At least we have confirmation that ExifTool is writing this tag properly (although it is currently up to the user to limit the cardinality).

- 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 ($).

mahikeulbody

If you implement some day the cardinality, how do you think to manage the tags inside a bag 0..1 : as single tags or as tag-lists limited to one item each one ? I would prefer the first choice...

Phil Harvey

The first option would unfortunately require dedicated code, and would be ugly from a programming point of view.  The 2nd option is at least a bit more general, but I'm not too keen on implementing a cardinality limit.

- 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 ($).