Question about hierarchical tags

Hey

Recently I introduced digiKam for managing my photos.

Via the previous package (Synology Photo Station) I had already provided a certain simple (maximum 2 levels) folder structure and I mainly invested in tagging the photos (without hierarchy). Via Photo Station I had the possibility to add location description (by this I don’t mean geotagging with the coordinates, which I also did in addition to the description). However, this info was not written in the metadata of the photos but in a database on the NAS

With digiKam I want to make work to add the location description to the metadata of the photos.

When working out how I would do this, I came up with a tag hierarchy. The principle seems logical to me, but since I only had limited knowledge of photo metadata, I wanted to take a closer look at this. I have learned a lot of things and I think I can go for it, but I can’t find an answer to one particular question yet.

In all the articles I’ve read the hierarchy is explained with some examples and root tags like “Location” or “WHERE” are used to indicate that there are underlying locations like countries, cities, buildings, . … are listed.

One of the strengths of the hierarchy is that when you designate a child tag, you can automatically include parent tags as well. Fine, but if I follow this all the way to the root tag, then the “Location” or “WHERE” tag will also be added as a tag and will also be displayed as a tag. I understand that it is included in the hierarchy in the XMP, but that it is displayed is less logical to me (the only thing it could say is that there may be a location description present).

I would think there should be a distinction somewhere between tags that serve to create the hierarchy and tags that are elements of that hierarchy. During my search for info about tag hierarchy I thought I read that Adobe Lightroom has something for this. Does this mean that this is common use and can often be done in other applications or is it just an option that is in line with my thoughts?

I would like to ask you what your thoughts and experiences are with this.

Thank you for your feedback! :slight_smile:

Maybe I didn’t fully understand your question. But there is a function that allows you to set how much of the tag hierarchy is displayed. Look here:
https://userbase.kde.org/Digikam/Tutorials/Tagging_and_Face_Tags

I prefere: Toggle Auto > Non
This way, only the tags actually assigned are displayed, which is much clearer for me.

Hey micha

Sorry for the late reaction. Although I receive notifications, I missed your reply.
Thx for your response. I think this could be the answer to my question. I try this out!:grinning:

Hey micha

I read the tutorial, especially the section about “Toggle Auto”. On my digiKam configuration it is configured with “Parents”. This means that if select a child tag, the parent tags are automatically added.

Your suggestion is to set this configuration to “None”, so the parent tags are not automatically tagged. The tutorial says that with this configuration set tot “None” you break the tag hierarchy. Not exactly what I want, I just was looking for a way to hide a part of the hierarchy (especially the root tags).

As I see, the “Toggle auto” configuration is just a configuration that can help you to automatically add the parent of child tags. If you use it to automatically add the parent tags, then you are still able to uncheck the root tag.

To know what really happens I did a small setup with “Toggle auto” set to "Parents, new images and following tag hierarchy.

(1) WHERE

(1.1) Europe

(1.1.1) Germany

(1.1.2) Netherlands

(1.1.3) United Kingdom

With the root tag “WHERE” I prefer not to see in a UI.

I added the tag “Netherlands” and the parent tags “Europe” and “WHERE” were automatically selected. I unchecked the root tag “WHERE” and applied.

In the XMP metadata I found different kind of tag info.

  1. digiKamschema
    Tags list: WHERE/Europe/Netherlands,WHERE/Europe

  2. Dublin-kern
    Subject: Netherlands,Europe

  3. Microsoft Photo
    Last Keyword XMP: WHERE/Europe/Netherlands,WHERE/Europe

  4. Schema ACDSee XMP:
    Categories:

    WHERE
    Europe
    Netherlands



  5. Schema Adobe Lightroom
    Hierarchical Subject: WHERE|Europe|Netherlands,WHERE|Europe

In the UI I only see “Europe” and “Netherlands”.

As I see in the metadata, with the exception of Dublin-kern, the complete hierarchical structure (the ACDSee clearly shows what is not assigned), I guess I always can uncheck the root tag without breaking the hierarchy.

Do you think I did draw the right conclusion? :relaxed:

Thanks in advance!

I’m finding this thread really useful, but am still confused about whether to put location data in the tags or in the IPTC location fields. Peter Krogh has mentioned (that was a few years ago) that the location data should be entered in the IPTC fields (City, Sublocation, Province/State, Country) rather than in heirarchical tags, but at least in digiKam these fields don’t seem that useful. You can only edit them by creating a new or modified template, and the fields don’t seem to be searchable. Entering the location with heirarchical tags is much easier to do, and the tags are searchable. Any recommendations about this? Thanks.

Hello @troodon and @FlyingFox,

Unfortunately, I am not at all a connoisseur of digiKam - but I use it with enthusiasm. I made my setting this way and I am completely satisfied with it:
Toggle Auto > Non
There my keywords are nicely arranged hierarchically, but only the actual keywords are written into the image.
Sorry for writing so late. If you want someone to get info from the new entry, you have to write @ and then the name, then he will get a mail.

1 Like

Thanks Micha, yes I’ve decided to use Toggle Auto > Non for the same reason, and just manually tag up the tree as far as the tags are relevant. Having a tag such as “location” is useful for organizing the tag structure, but is not helpful in searching.

Hey @troodon and @micha

Thx for your reaction. Maybe using a location tag hierarchy was not the best example to explain my question. I could have used a WHAT tag as well :grinning:

I know about the existence of the IPTC location fields, but I thought that you only can fill in an effective location like a country, city name, … . I think you are right that a location should be filled in this way, but I don’t know if it has the possibility to add information like:
It was in Europe
It was in France
It was in Paris
It was in the Eifel tower
It was in the 58 Tour Eiffel Restaurant in the Eifel tower.

In that way an (additional) hierarchical could be useful. I’ll will take a closer look to these fields to know these fields beter, but like you said, I they don’t seem that useful in digiKam, then it’s probably beter not to spent to much time in it :blush:

At this moment I’m just gatering information and try to work things out on paper. I’m not gonna change my whole tag structure just to try things out. I wan’t to be prepared and want to have a direction to work towards, without los of current tag information. Thus, I’ll take a new back-up before I start. :slightly_smiling_face:

I normaly should receive e-mail notifications as I started this topic. I now received a notification when you both posted. Thx for reminding that the use of a mention (@-sign)! :grinning:

1 Like

Hello @FlyingFox and @troodon

I don’t think it’s that hard.
My keywords are structured like this:
Place > France > Paris > Eiffel Tower > 58 Tour Eiffel Restaurant > etc.
And I let digiKam write the keywords into the photo file.
But I don’t want all parents and children of the keywords to be written into the picture.
Therefore I prefere: Toggle Auto > Non
It may not be ideal, but I’m very happy with what comes out of it.
I’m afraid I can’t answer your questions or concerns in more detail, but I hope this suggestion has helped nonetheless.

1 Like

You can do that with the IPTC fields as well. Not sure those are really useful within digikam, as I haven’t found a way to use them.

As for the tag tree: having all the parents as well can be useful with other programs, that can reuse the tree structure when it is present. e.g. darktable works that way, and using tags was a bit of a pain there unless/until I had the full tag sequence in the metadata,(and not just the leaf tag(s).
Correcting that wasn’t as hard as I feared, it just took a bit of time.

1 Like

Hey @micha, @rvietor

Your suggestion absolutely helps me! It’s an exercise I’ve to go through :slightly_smiling_face:Like rvietor says, it will take some time, but it’s necessary. Soon I’ll have the time to do the migration.

If I find more time, I’ll check out the IPTC fields details, but that’s probably not the most urgent change I’ve to make :blush:

While I’m just starting with digiKam, I feel I am very happy with the way I organized hierarchical data in Lightroom.

For locations, I stored the actual location where the photograph was taken from, in the IPTC location tags (and GPS coordinates). In addition I have a hierarchical keyword tag structure for locations, but I use that for what is visible in the photo. So if I am standing on a hill looking out over a city, then the hill is registered in the IPTC tags, but the city is registered in the keyword tag structure, even though I’m outside the city.

The nice thing with keywords is also that you can store several items, and several levels at the same time. So if two cities would be visible in my view, I would store both in the keyword tags. (Which is not possible with the IPTC location tags.) If the subject I photographed is a local or national landmark, I also tags it at higher levels. For example a photo of the Eiffel tower would also get tagged as Paris and France, a typical Parisian cafe would get tagged with Paris but not France, a photo of a McDonalds in Paris would not get either. That way if I look at the France tag (without including subtags) I will only get photos that really represent France, instead of random photos that just happen to be taken in France.

For people (and pets) that are related to me, I use a hierarchical relationship structure. I am at the top level, my household and closest friends are at level 2, my uncles and aunts and indirect friends at level 3, underneath the person that is my connection to them, etc. With this structure it doesn’t make sense to show subitems, but it does make it easier to find people instead of a long alphabetic list. (Especially if I forgot their name!)

I do both and it works fine for me.
IPTC is a wonderful asset; however, it is very limiting as to actual usefulness and not just any program is going to be able to access the data.
Almost every operating system and image program imaginable can read keyword tags — so long as they are written into the image file.

I don’t have much luck with digiKam and IPTC; I have found XnView to have a much better means of handling IPTC.

Keyword Tags is where digiKam rocks (I just wish they hadn’t messed it all up with silly face tagging; that should have been employed in an entirely different field and not in the already established tags tree).
For locations, I have a main root tag “Places”, to which is added subtags such as > State Name > County > City/Town and all pertinent information within each County and City/Town such as Highways, Roads, and Streets and things that are on those; plus, Rivers, Lakes, and Creeks.

You just can’t add all this detailed information with IPTC

I have never found a limit to what I can include with keyword tags and I have never found a limit as to how far I can go with subtags.

I forgot to add: my setup only writes the tags that I select, whether they be parent or child or great great grandchild; if I want a parent tag included, I select it.
Parent tags are not automatically included.

Not saying this isn’t working for you, but I find I often like to search on a parent tag (perhaps several levels up). As an extra tag or so doesn’t really take up much space, I prefer having the parents selected/added automatically. Although that might add a limit to the allowable depth for some types of metadata (due to string length limitations).
(And I hope you do add at least a country code when you tag “Paris” :wink: )

For those that need it, ITPC does have the advantage of well-defined semantic meanings for their tags (and their location info goes to “sublocation” below “city”). Keywords have no such semantics attached to them.

Maybe I need to explain this a bit more:
The tag heirarchy, from Root to Tag is written into the file; however, when looking at the files metadata, the only tags that display are the ones that I selected.
I hope that makes sense.

Agreed. I don’t bother with IPTC location fields anymore, especially as so many of my pictures are hundreds of kilometres away from any city, and even the nearest town has no relationship to the location. Hierarchical keyword tags make much more sense. digiKam’s geolocation feature, on the other hand, is much more useful than I thought it would be.

One feature that XnView has that I wish digiKam had, is the ability to save a template that includes ALL the tags, captions etc, so you can create a temporary template, then apply it to a group of images.

digiKam has one feature I consider essential that XnView doesn’t have - the ability to work with external drives, showing search results and thumbnails, even when the drive is not attached to the computer.

Hi,

HierarchialKeywords are a tricky problem. I had a lot of problem to find the right settings when I move from Lightroom to darktable / digiKam.

For example I have this keyword tree:

Locations
– Countries
– – Switzerland
– – – Vaud
– – – – Lausanne

When I tag an image, I don’t want to have Locations and Countries saved. In XMP / MWG / IPTC terms they are Categories.
In Lightroom Categories are set when you “exclude” them (you see bracket around the keyword.
In Darktable, you have to check the category checkbox when you edit it.
In DigiKam, categories aren’t managed.

You can decide to apply the parent keyword if you decide so. However keyword set as categories will not be take into account.
For digikam, Toggle auto is not advised, as the documentation mentions. The same page suggest you manually checks every keywords.

Read the last green box “Note on tag hierarchies” in the " Tags – How To" paragraph on the following page
https://userbase.kde.org/Digikam/Tutorials/Tagging_and_Face_Tags

Digikam is not able to import / export and list of keywords. Lightroom and Darktable have these feature and this is quite useful wen you migrate from / to another program. I was happy to be able to export m keywords list, use it in darktable, but not in digikam.

With digikam 7.8.0, metadata are saved in an XMP file, the same as with Lightroom (it will add data, not replace the whole file), and not darktable, despite the XML compatibility with commercial software being UNchecked.

if you have the image.jpg
lightroom, digikam (unchecked + checked) use : image.xmp
darktable uses image.jpg.xmp

Hierarchy is saved using by default / (slash) character. From my search the | (pipe) character is mostly used. So use Lightroom and darktable. You have to change digikam keywords advanced settings to use the pipe instead of the slash, if you plan to use other program.

Hope this helps… And I hope I fuly understood all these keywords things :slight_smile:

1 Like

To FlyingFox = Thanks for starting this thread; I have learned something from every reply.

Someone mentioned searching tags when the parents are not selected; my experience is that, within digiKam at least, it matters not whether any parent tags are applied or not, when I choose the “tags” tab on the left pane and click any tag, everything that is tagged anywhere under that tag will show up.

As for IPTC, I use it extensively as I find it makes a lot more sense than XMP; however, it’s maximum amount of characters for each field is very limiting and very annoying; why can’t the powers that be keep IPTC and abolish this amount of characters foolishness, yet keep it backwards compatible ?

XnView seems to have done just that and ignores the amount of character limitations; however, if a photo is edited in any program that strictly adheres to the number of characters, that program will clip the remaining information away — I just always use XnView to replace the clipped information in the finished photo so it is not lost.

When I choose to read IPTC data in any program that has the capability, I see one set of IPTC information that is readable and understandable, no matter which program created it.

When I choose to read the XMP data, I get pages of confusing versions with bits and pieces of useful information scattered far and wide — ridiculous…

In this thread alone, I see where several have moved from LightRoom to digiKam.

I have had LightRoom installed for several years and have opened it and looked around a total of three times - I’ve never used it.

For what reasons are you guys migrating from LightRoom to digiKam ?

In my experience, I have found every program to have strengths and weaknesses; what one program excels at, it will be weak in other areas; so, I don’t rely on a single program to do what I need.

Sadly, some programs will be strong on one or two points, but add so much fluff and nonsense to the point of allowing their strong points to falter.