You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running into this issue a few days ago as well. I realized that I could not use rational numbers representing geo-coords in the decimal degrees format for a couple of reasons. I converted decimal degrees into three separate rational numbers for the hours, minutes, and seconds. The rational numbers for hours and minutes are all of the form "(some_integer, 1)," while the seconds rational numbers are "(some_integer, some_integer)." I am finding with the accuracy required for my project, all "seconds" rational numbers can be represented by 32-bit numbers.
Looking at the EXIF standard documentation, GPS coordinated are required to be in the (hours_rational, minutes_rational, seconds_rational) format anyway, with all numbers 32-bit. It is possible that Piexif is written to accept 64-bit decimal degree coordinates and I was encountering another error entirely. But, I was able to successfully add lat/lon to images using the above method.
This line in in _dump.py
new_value += (struct.pack(">L", num) +
is failing with large rational integer outputs of Python Fraction
Fraction(2476979795053773, 2251799813685248)
Is there a better way to generate the rational fraction the GPS lat, lon require?
The text was updated successfully, but these errors were encountered: