wanderer icon indicating copy to clipboard operation
wanderer copied to clipboard

Waypoints from photos: different EXIF tag

Open thomas-mc-work opened this issue 8 months ago • 8 comments

When I import some photos then I get the error saying that no location data was found in them. My exif viewer shows me they have tags like GPS Longitude, while in your source code I saw it's only looking for GPSLongitude. Is that an issue on my side? I've exported them from Darktable. I hope that this software is complying with the standards.

thomas-mc-work avatar Apr 24 '25 18:04 thomas-mc-work

GPS Longitude does not seem like a valid EXIF tag: https://exiftool.org/TagNames/GPS.html

Flomp avatar Apr 26 '25 15:04 Flomp

Yeah, I think it was my fault. Exiftool formats the tag names with spaces on CLI ouput. Actually it is valid by the standard, which leaves the question open. Is there anything else that is expected by wanderer?

thomas-mc-work avatar Apr 27 '25 19:04 thomas-mc-work

Is there anything else that is expected by wanderer?

What do you mean by that?

Flomp avatar Jun 21 '25 10:06 Flomp

Expected in order to recognize the GPS records embedded in the picture.

thomas-mc-work avatar Jun 23 '25 19:06 thomas-mc-work

This is the relevant function: https://github.com/Flomp/wanderer/blob/8e3eea6216fe8ff8355789e34a429dce338c1571/web/src/lib/components/waypoint/waypoint_modal.svelte#L79

So these four tags need to be present: "GPSLatitude", "GPSLatitudeRef", "GPSLongitude", "GPSLongitudeRef"

Flomp avatar Jun 24 '25 12:06 Flomp

Here is an example output of an image:

$ exiftool -j DSC09820.jpg | grep GPS
  "GPSVersionID": "2.2.0.0",
  "GPSLongitude": "15 deg 57' 12.87\" E",
  "GPSLatitude": "45 deg 47' 57.43\" N",
  "GPSLatitudeRef": "North",
  "GPSLongitudeRef": "East",
  "GPSPosition": "45 deg 47' 57.43\" N, 15 deg 57' 12.87\" E",

When I try to import it then I get the notification DSC09820.jpg: no-gps-data-in-image (using version 0.17.0 now).

thomas-mc-work avatar Jun 25 '25 20:06 thomas-mc-work

Another image example for debugging:

$ exiftool -j bratislava.jpg | grep GPS
  "GPSVersionID": "2.2.0.0",
  "GPSLongitude": "17 deg 6' 3.88\" E",
  "GPSLatitude": "48 deg 9' 5.14\" N",
  "GPSLatitudeRef": "North",
  "GPSLongitudeRef": "East",
  "GPSPosition": "48 deg 9' 5.14\" N, 17 deg 6' 3.88\" E"

Image

thomas-mc-work avatar Jul 21 '25 18:07 thomas-mc-work

This seems to be an upstream problem of the exif library we use: https://stackblitz.com/edit/js-63co72k4?file=index.html

Image

The library does not seem to be maintained anymore, and I can't see a simple fix from briefly looking through the source code.

https://github.com/exif-js/exif-js/blob/51a8f7d2f3aa71cb03463c84088067c9a4ebe8cb/exif.js#L821

Flomp avatar Aug 20 '25 12:08 Flomp