Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata: Support reading GPS information from xmp #4106

Open
derchr opened this issue Mar 17, 2024 · 4 comments
Open

Metadata: Support reading GPS information from xmp #4106

derchr opened this issue Mar 17, 2024 · 4 comments
Labels
enhancement Refactoring, improvement or maintenance task

Comments

@derchr
Copy link

derchr commented Mar 17, 2024

1. What is not working as documented?

Reading in GPS data from XMP sidecar files generally works. However, when updating (e.g., adding them for the first time) GPS information with an external program such as digikam, it will not get updated in Photoprism even after a complete re-index.

Often GPS files are added afterwards based on a GPX file because the camera itself does not have an embedded GPS tracker.

2. How can we reproduce it?

  1. Index an image without any GPS data. Photoprism will show Lat 0 and Long 0 in the details.
  2. Now add GPS information with an external program such as digikam or darktable.
  3. Do a complete re-index in Photoprism.
  4. Photoprism will still show Lat 0 and Long 0 in the details and not display the images in the map.

3. What behavior do you expect?

Photoprism should pick up the new GPS information and save it in its internal yml sidecar files and show the geoinformation in the UI.

4. What could be the cause of your problem?

The GPS location gets read in when first importing, but it cannot be not updated afterwards by a re-index operation.

6. Which software versions do you use?

Latest docker image with latest docker-compose example.

@derchr derchr added the bug Something isn't working label Mar 17, 2024
@graciousgrey graciousgrey added enhancement Refactoring, improvement or maintenance task and removed bug Something isn't working labels Mar 18, 2024
@graciousgrey
Copy link
Member

Thank you for your feedback!

We do not yet read GPS information from xmp files.

If you let digikam write the GPS information into the EXIF fields supported by PhotoPrism, Lat/Lng should be updated during the next indexing.

https://www.photoprism.app/kb/metadata

@graciousgrey graciousgrey changed the title Updated GPS location in XMP sidecar file is not read in again Metadata: Support reading GPS information from xmp Mar 18, 2024
@derchr
Copy link
Author

derchr commented Mar 19, 2024

Thank you for triaging my issue.

I want to add some further findings:

  • As I primarily talk about RAW files, the additional GPS data is only present in the XMP file as an exif field.
  • When the image files are first imported, the additional GPS data is in fact read in from the XMP. Maybe has something to to with exiftool?
  • After changing the GPS data in the XMP file, neither a simple re-index nor a full re-index will update the Photoprism GPS entry.
  • Even after touching all files, including the RAW and sidecar files, a re-index will not pick the new changes up.
  • The only way to update the GPS information is to temporaily delete the image files, do a cleaning re-index, add the files again and doing another re-index.

@GlassedSilver
Copy link

Someone correct me if I'm wrong here, but wouldn't the same limitation of not reading XMP for geodata also apply to writing such data? Say I use Photoprism to assign a location to a picture that metadata would ONLY live in Photoprism right?

@graciousgrey
Copy link
Member

@GlassedSilver Except from the image orientation PhotoPrism does not yet write metadata changes back to originals files.

https://docs.photoprism.app/user-guide/library/metadata/

At this time changed geodata would live in PhotoPrism's database and the yaml export files.

https://docs.photoprism.app/user-guide/backups/export/

Writing metadata back to original files (EXIF and/or xmp) is planned for the future. Improving the xmp parser is a perequisite for this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Refactoring, improvement or maintenance task
Projects
None yet
Development

No branches or pull requests

3 participants