-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
GPSLatitude and GPSLongitude differs from GPSPosition #165
Comments
That is a fantastic shot of Bryce! Thanks for taking the time to report this. First off, here's this library's code for extracting latitude and longitude: exiftool-vendored.js/src/ReadTask.ts Line 195 in f111cda
You'll see I look at the "GPSLongitudeRef" value to know when the value needs to be negated. If the ref is West, I force it to negative, and if it's East, I force it to a positive value. Some prior versions of ExifTool returned absolute values of lat/lon, which required this code. Your file has a negative longitude with an East ref, which I believe is invalid. I just checked my image repository of examples, and there isn't a single case where a negative GPS Longitude has a GPS Longitude Ref of "East". Given that recent versions of ExifTool have been giving the proper signed values for GPS lat/lon, I think it's reasonable to remove the I'll append a warning message to the warnings array in the case that Ref seems to not match up with the sign of the lat or lon. |
Perfect, thanks for a quick fix! |
Seems it affects xmp sidecar files as well. immich-app/immich#6580
|
This new issue is related, but is a different situation and behavior from the original issue. In the future please open a new issue (feel free to reference related issues, of course!) This library is passing through the value it's getting from ExifTool. I'm seeing "East" as the There are several handfuls of bug reports in the ExifTool forum around this issue, along with remediations: https://exiftool.org/forum/index.php?topic=10163.msg52950#msg52950 https://exiftool.org/forum/index.php?topic=14943.msg80546#msg80546 |
I'm sorry, I haven't realized that "East" value comes from exiftool itself. Will check it first with |
No worries--I appreciate the time you took to gather a simple reproduction for me. (And if you discover there's some more proper heuristic I should apply, or exiftool magick arg I should use, I'm all ears!) |
Describe the bug
Tags GPSLatitude and GPSLongitude don't match GPSPosition extracted using exiftool-vendored 24.2.0 from the picture below
exiftool 12.70 shows...
$exiftool -c "%+f" -EXIF:GPS -GPSLatitude -GPSLongitude -GPSPosition
20140530_125154_HDR
To Reproduce
Just use the example snippet for reading tags.
Expected behavior
GPSLongitude
should be-112.160555555556
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: