dwc:TaxonScientificName as a list

Started by GDuncan, September 05, 2018, 12:21:57 PM

Previous topic - Next topic

GDuncan

Hi,

I'm hoping to use exiftool to tag some biological images that I have with relevant metadata.

I'm hoping to use to the Audubon Core standard where possible, and one thing I'm trying to record is a list of species that occur in the image. Audubon core uses the darwin core term ScientificName for this, so I've been hoping to use -XMP-dwc:TaxonScientificName in exiftool to tag each scientific name, and noticed that exfitool handily supports darwin core as standard! However I've noticed that the term is defined as a string rather than as a list of strings, so, understandably, only the last species is attributed.

Is there any way to enable this standard term to be used as a list of strings? Would the way forward be to redefine the term in the config file or is there a sneakier way? Having great use of exiftool so far!

Graeme

Phil Harvey

Are you sure it should be a list?  It isn't a good idea to re-define a standard term in a different format.  You could do this with a user-defined tag, but why not just use a comma-separated string?  (or some other delimiter)

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

GDuncan

Audubon core defines the term as "Repeatable" (see https://terms.tdwg.org/wiki/Audubon_Core_Term_List#dwc:scientificNamebut unfortunately does not guide on the method of repetition. Darwin Core doesn't state either way, though (I've used it before) generally Darwin Core usually relates to a single occurrence of a living thing, and as such i wouldn't expect it to worry about repeatability.

The reason for a list/bag type term is that, I'm hoping to import these images into a searchable catalogue system / DAM whereby users can search by scientific name, and it should be quicker with a database search against individual species rather than searching within a delimited string. I'm not sure whether that makes sense, sorry! But basically all the information will eventually be held in a database.

I can always define my own term, I was just hoping to use standards where possible as it were :)

(and I must say, the exiftool way of entering list data is incredibly intuitive!)

Phil Harvey

If you want to define your own, take a look at the sample config file for the config file syntax, and the DarwinCore tag definitions to see how these are defined.

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

GDuncan


GDuncan

#5
Just to note down, that I successfully solved this issue by the following modification in  the .Exiftool_config file:

%Image::ExifTool::UserDefined = (
'Image::ExifTool::DarwinCore::Main' => {
scientificName => {List => 'bag'},
vernacularName => {List => 'bag'},
},
);

herb

Hello,

thanks for the infos, how you solved the problem.

Interesting for me is, that you defined 2 additional user-defined tags - with names of existing structure elements - outside the existing structures of DarwinCore.
This reminds me a little bit on using SimpleDarwinCore.

In your first post you mentioned AudubonCore. Did you also define these tags as user-defined Exiftool tags?

Best regards
Herb

GDuncan

In the end there were only a few additional Audubon core terms that I needed added (those that I required that were not covered in external schemas)

I added a new "ac" namespace via the following in .Exiftool_config:

%Image::ExifTool::UserDefined::ac = (
GROUPS => {0 => 'XMP', 1 => 'XMP-ac', 2=> 'Image'},
NAMESPACE => {'Audbon core' => 'https://www.tdwg.org/standards/ac/'},
WRITABLE => 'string',
caption => {WRITABLE => 'string'},
metadataLanguage => {WRITABLE => 'string'},
metadataLanguageLiteral => {WRITABLE => 'string'},
);


Phil Harvey

Note that the {WRITABLE => 'string'} definitions should just be { }.  The WRITABLE element has no meaning for an individual tag.  Specifying Writable => 'string' would be the way to do this, but it isn't necessary here because you made this the default by setting the table WRITABLE.

Also, your namespace definition is incorrect, it should be:

NAMESPACE => {'ac' => 'https://www.tdwg.org/standards/ac/'},

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


herb

Hello Graeme, hello Phil,

thanks to all for this detailed information.

And sorry that I hijack this thread to ask Phil some questions about DarwinCore:
First I want to give the information that DarwinCore has introduced a new class "UseWithIri".
Should/must Exiftool also support this new DarwinCore class? I think yes, because Exiftool supports all other classes.

On the DarwinCore internet site you will find also lot of information about SimpleDarwinCore.
In very short words: SimpleDarwinCore is identical to DarwinCore, but structures are not allowed.

Now my technical question: GDuncan has defined 2 DarwinCore tags outside a structure with:

'Image::ExifTool::DarwinCore::Main' => {
     scientificName => {List => 'bag'},
     vernacularName => {List => 'bag'},
},

These tags are therefore in the namespace dwc.
Is this the correct way to introduce SimpleDarwinCore or is it also necessary to introduce another namespace (I propose) "sdwc"?

Thanks for your comments in advance.
Best regards
Herb

Phil Harvey

Hi Herb,

I can't answer these questions.  It depends on how the DarwinCore designers want to implement this in XMP.  You should ask them, not me.  If you discover any new DarwinCore XMP tags that ExifTool doesn't support, please let me know.

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