IMatch 2023 - Unable to change "City" metadata

Started by zuiko, June 15, 2023, 03:45:11 PM

Previous topic - Next topic

zuiko

I'm not sure if this is a bug or if some setting I have is causing this but it seems to be new in the 2023 version.

If I try and change the "City" tag in the metadata panel, the Composite/MWG-City tag is identified correctly as being changed.  When I write the change to the file, the name reverts back to the original value.

I've attached two logs of the exiftool output, the first one is the initial write of the value "City-1" for the city name, the second one is an update to the name to be "City-2".  What's odd is this option to exiftool in the second log:

-XMP-iptcExt:LocationShown=[{City=City-1}]

It seems to be overriding the LocationShown tag that MWG-City would write and setting the value back to "City-1".  When the metadata is re-imported after the file is written the value for MWG-City is updated with "City-1".




Mario

#1
Hm. I see. And can reproduce this.
This seems to come from the way IMatch/ExifTool have changed in relation to how repeatable structured tags need to be written. XMP Locations are partially repeatable and, for some reason, it seems the structured tag values are the old/previous values and not the updated values, this reverting the changes back...
This is particularly difficult for the location data and the complex interrelations between Composite tags, LocationShown and LocationCreated XMP tag sets.

I'll look into this for the upcoming 2023.1.6 release.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook


JohnZeman

I'm glad this has been reported because I've been having the same problem with location metadata in version 2023.

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

#5
You use a work-around using the new structured tags.

1. Create new MD Panel layout or update an existing layout.
2. Select Custom Panels in the tree on the left
3. On the right, under Tag Sets select XMP IPTCExtension LocationShown
4. Click on "New Panel for this tag set"
5. Close dialog with OK.

See Tag Sets (Structured Tags) for more info.

Switch to the new layout created. It will look like this and allow you to change the location data:

Image2.jpg

The problem is using the MWG/Composite City tag to update the city. It maps to up to 3 other XMP/IPTC tags during write-back and this is what causes the issue. If you update the "real" IPTCExt location data, all is well.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I have resolved this issue for the new IMatch 2023.1.6 release (out soon).

But I think it would be better to get rid of the MWG/Composite tags used for historical reasons since IMatch 5 and switch users to use the structured XMP::IPTCExt::LocationShown tag set instead (see above).

For IMatch 2023.1.6 I have added a new convenience tag mapping that maps between the IPTCCore::CountryCode used in old MD panel layouts and the CountryCode in the IPTCExt::LocationShown country during write-back to automatically sync them.

For new users with first time installs, the MP panel already presents new layouts, but IMatch does not delete/replace existing Metadata Panel layouts for obvious reasons.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

Mario I am still having problems with location metadata.  As per your instructions if I add

XMP IPTCExtension LocationShown\0
( {File.MD.XMP::iptcExt\LocationShown\LocationShown\0} )

to my metadata layout it becomes a read only field that I cannot do anything with.

However if I use

{File.MD.XMP::iptcCore\Location\Location\0}

for a location field and

{File.MD.XMP::iptcExt\LocationCreatedSublocation\LocationCreatedSublocation\0}

for a sublocation field, things seem to be working ok, at least so far.

For City

{File.MD.XMP::iptcExt\LocationShownCity\LocationShownCity\0}

so far seems to be working.

I'm totally flying blind here but at least I seem to be getting some positive results.

Mario

QuoteMario I am still having problems with location metadata.  As per your instructions if I add

XMP IPTCExtension LocationShown\0
( {File.MD.XMP::iptcExt\LocationShown\LocationShown\0} )

to my metadata layout it becomes a read only field that I cannot do anything with. Mario I am still having problems with location metadata.  As per your instructions if I add

Did you add it as a structured tag / tag set or as a normal tag to a layout?

XMP IPTCExtension LocationShown is a structured tag, with many sub-tags. You cannot edit it directly, which is why it becomes read-only.

You add this tag as a tag set:

Image2.jpg

and then IMatch shows all elements of the tag set, e.g. city or country:

Image3.jpg

The ability to display and work with structured tags like IPTCExt Location is new to IMatch 2023. Before you could only view and edit individual tags of such a set, e.g. XMP::iptcExt\LocationShownCity\LocationShownCity

See Tag Sets (Structured Tags) for all information.

Note: With IMatch 2023.1.6 you can again use the reduced MWG/Composite tag version again, if you only need one entry for location. It works again as in previous IMatch versions:

Image4.jpg
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

Mario you're right, I had missed that about structure tag sets before.

However now I have a MUCH bigger problem.  So far any raw (DNG) master file I edit the metadata of gets a yellow triangle when I do a writeback and I haven't found any way to get rid of it.  JPG versions seem to be ok.  Removing the DNG masters from the database then re-adding them again makes no difference, once the yellow triangle appears it seems to be there for good.

Mario

Are these Apple special DNG files produced with a recent iPhone?
Then read this https://www.photools.com/community/index.php/topic,13257.msg93575.html#msg93575

If not then:
This sounds like ExifTool had a problem writing or reading the file. Curious.
Switch to debug logging and then write back to a DNG file and force a metadata reload for a DNG file with <Shift>+<Ctrl>+<F5>. ZIP and attach the log file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

Ah yes, it is an iPhone 14 Pro I was using.  Come to think of it each DNG I checked was from that iPhone.

Logfile zipped and attached.

Thanks Mario.

Mario

The log is clear. It's the invalid XML node names ExifTool produces for some of the proprietary Apple metadata that breaks the import of the data in IMatch. Phil knows about this and will fix it in the 12.64 release of ExifTool. IMatch cannot do anything about this, sorry.

Can I assume that location (City, ...) metadata changes work again for you with the 2023.1.6 release?
Then I can close this ticket.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JohnZeman

Quote from: Mario on June 17, 2023, 10:50:01 AMCan I assume that location (City, ...) metadata changes work again for you with the 2023.1.6 release?
Then I can close this ticket.

Yes, the metadata changes are working for me now, thanks!