Different focusing distance tags in one category

Started by gverhoev, October 22, 2023, 11:06:45 PM

Previous topic - Next topic

gverhoev

Dear all,

For some of my academic work, the focusing distance recorded by Nikon is used for selecting certain mages. However, Nikon writes this in different "lensdata groups" (see screenshot). I can use one tag to drive a category, but can I also use multiple tags? Or should I make a category for every instance of FocusDistance and then use a category formula to combine them?

Any help on this is greatly appreciated! Cheers, Geert

Mario

That's one of the problems with undocumented and ever-changing metadata values.
ExifTool tries to make some sense of it, ending up with different "made up" tag names.

If this is important to you, you could handle this with a data-driven category based on variables. They offer a tremendous amount of flexibility, but are comparatively slow compared to using tags directly.

The general idea is to probe several tags via a File.MD* variable. And using the default function to fall back to another tag if the first tested tag is empty. This can be nested in the form of {File.Tag.<Name>...|default:{File.MD.<Other Tag Name>| |default:{File.MD.<Yet Anther Tag Name>| ...} to check multiple tags and use the first non-empty tag.

Tip: You can try this out in the VarToy app and then create a data-driven category based on the variable when you're satisfied.
Let us know if you need more details about using default

If your database is large, set the data-driven category to manual to update it only when needed.

If your database is really huge, consider creating a per-file Attribute Set, with a "lens data" attribute. Fill this attribute using the Attribute Importer and your variable. This way you can create the data-driven category based on the Attribute, without relying on an expensive variable.
I've used that trick in several projects where a complex variable was required to cluster files and filling an Attribute once and using it to drive a data-driven category was 100 times faster that calculating the complex variable every time for each file in the database.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook