<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>517790</bug_id>
          
          <creation_ts>2026-03-18 19:36:52 +0000</creation_ts>
          <short_desc>GPS coordinate overwritten when writing tags to XMP sidecar</short_desc>
          <delta_ts>2026-03-19 07:41:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>digikam</product>
          <component>Geolocation-Engine</component>
          <version>9.1.0</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kristian Karl">kristian.hermann.karl</reporter>
          <assigned_to name="Digikam Developers">digikam-bugs-null</assigned_to>
          <cc>metzpinguin</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/digikam/-/commit/31a0544c0925db928a710f7404aa5690d190c7e7</cf_commitlink>
          <cf_versionfixedin>9.1.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2504483</commentid>
    <comment_count>0</comment_count>
    <who name="Kristian Karl">kristian.hermann.karl</who>
    <bug_when>2026-03-18 19:36:52 +0000</bug_when>
    <thetext>Bug description

  When metadata is configured to write to sidecar only (WRITE_TO_SIDECAR_ONLY) with ExifTool:
  1. Reading GPS from the image works correctly.
  2. Writing updated GPS coordinates to the sidecar works correctly.
  3. However, when the sidecar is subsequently loaded and a different field (e.g. a tag) is modified and saved, the GPS coordinates in the sidecar revert to  the original values from the image file.

Test steps
1 Configure: read from image, write to sidecar only, ExifTool backend
2 Read and verify original GPS (59°11&apos;8.68&quot;N, 17°45&apos;24.20&quot;E)
3 Change GPS to (59°11&apos;9.12&quot;N, 17°46&apos;11.45&quot;E), verify in sidecar 
4 Add tag &quot;Key/cat&quot; to image/sidecar

Expected results
Sidecar has new tags and the GPS position from step 3
 
Actual results
Sidecar has new tags and bur reverted the GPS position from step 2

ADDITIONAL INFORMATION
1 exiftool version: 13.25
2 A PR that adds a new unit test gpssidecar_utest that reproduces a bug where GPS coordinatesstored in an XMP sidecar file are silently overwritten with the original image coordinates when a subsequent metadata     change (e.g. adding a tag) is applied to the sidecar.
https://invent.kde.org/kristiankarl/digikam/-/commit/d2eb63cb1745be9dfcac95bcedcb99eb500b6dec

SOFTWARE/OS VERSIONS
System:
  Host: UBUNTU-LTS-24-10 Kernel: 6.17.0-19-generic arch: x86_64 bits: 64
  Console: pty pts/3 Distro: Ubuntu 25.10 (Questing Quokka)
Machine:
  Type: Kvm System: QEMU product: Standard PC (Q35 + ICH9, 2009) v: pc-q35-9.0
    serial: &lt;superuser required&gt;
  Mobo: N/A model: N/A serial: N/A BIOS: SeaBIOS v: rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org
    date: 04/01/2014
CPU:
  Info: 8x 1-core model: 13th Gen Intel Core i9-13900KF bits: 64 type: SMP cache:
    L2: 8x 4 MiB (32 MiB)
  Speed (MHz): avg: 2995 min/max: N/A cores: 1: 2995 2: 2995 3: 2995 4: 2995 5: 2995 6: 2995
    7: 2995 8: 2995
Graphics:
  Device-1: Red Hat Virtio 1.0 GPU driver: virtio-pci v: 1
  Display: server: Xwayland v: 24.1.6 driver: gpu: virtio-pci tty: 159x49 resolution: 1280x800
  API: EGL v: 1.5 drivers: kms_swrast,swrast platforms: gbm,wayland,surfaceless,device
  API: OpenGL v: 4.5 vendor: mesa v: 25.2.8-0ubuntu0.25.10.1 note: console (EGL sourced)
    renderer: llvmpipe (LLVM 20.1.8 256 bits)
  Info: Tools: api: eglinfo,glxinfo x11: xdriinfo, xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel 82801I HD Audio driver: snd_hda_intel
  API: ALSA v: k6.17.0-19-generic status: kernel-api
  Server-1: PipeWire v: 1.4.7 status: active
Network:
  Device-1: Red Hat Virtio 1.0 network driver: virtio-pci
  IF-ID-1: docker0 state: down mac: aa:fc:c2:41:75:22
  IF-ID-2: enp1s0 state: up speed: -1 duplex: unknown mac: 52:54:00:4b:ba:3c
  IF-ID-3: tun0 state: unknown speed: 10000 Mbps duplex: full mac: N/A
Drives:
  Local Storage: total: 80 GiB used: 52.04 GiB (65.1%)
  ID-1: /dev/vda model: N/A size: 80 GiB
Partition:
  ID-1: / size: 78.19 GiB used: 52.04 GiB (66.6%) fs: ext4 dev: /dev/vda2
Swap:
  ID-1: swap-1 type: file size: 8 GiB used: 0 KiB (0.0%) file: /swap.img
Sensors:
  Src: lm-sensors+/sys Message: No sensor data found using /sys/class/hwmon or lm-sensors.
Info:
  Memory: total: 32 GiB available: 30.34 GiB used: 4.2 GiB (13.8%)
  Processes: 360 Uptime: 19h 49m Init: systemd Shell: fish inxi: 3.3.39</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2504485</commentid>
    <comment_count>1</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2026-03-18 19:48:10 +0000</bug_when>
    <thetext>Yes, I can reproduce it. However, it has nothing to do with ExifTool, as ExifTool is not used when writing to sidecars.

Maik</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2504500</commentid>
    <comment_count>2</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2026-03-18 20:16:36 +0000</bug_when>
    <thetext>The cause is this Exiv2 conversion table:

https://exiv2.org/conversion.html

We already have merge helpers for some metadata, but we need a special merge helper for the GPS metadata.

Maik</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2504624</commentid>
    <comment_count>3</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2026-03-19 06:47:03 +0000</bug_when>
    <thetext>Git commit 31a0544c0925db928a710f7404aa5690d190c7e7 by Maik Qualmann.
Committed on 19/03/2026 at 06:46.
Pushed by mqualmann into branch &apos;master&apos;.

add Exif.GPSInfo.* to the metadata writeback helper
FIXED-IN: 9.1.0

M  +1    -1    NEWS
M  +14   -1    core/libs/metadataengine/engine/metaengine_p.cpp

https://invent.kde.org/graphics/digikam/-/commit/31a0544c0925db928a710f7404aa5690d190c7e7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2504650</commentid>
    <comment_count>4</comment_count>
    <who name="Kristian Karl">kristian.hermann.karl</who>
    <bug_when>2026-03-19 07:41:54 +0000</bug_when>
    <thetext>Thank you very much for the quick fix Maik.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>