Re: [gexiv2] gexiv2 decimal digits in the GPS tags



This is partly due to the inherent limitations of floating point numbers, which aren't capable of representing all possible numbers.

The other thing is that you're right, the exif data only stores degrees, minutes, and seconds. So the functions convert the values back and forth, and this involves multiplication and division, and the original value isn't preserved at all. The value returned is the closest approximation to the original value that could be stored as d/m/s.

On Oct 20, 2015 9:37 PM, "Eyal Saiet" <ejsaiet alaska edu> wrote:
Hello gexiv community,
I am a bit confused why am a I writing numbers with a certain length of digits after the decimal point, and when I read the I get more than I wrote. Example is easier to explain:

>>> y_loc=71.377951137 ; m.set_gps_info(float(x_loc),float(y_loc),float(z_loc));m.get_gps_latitude()

True

71.37795113694443


Why is get_gps_latitude() return more digits than was written?

Is there some calculation going on in your module that cannot return the exact value?

I thought Exif header can only accept degree, minute, decimal seconds?!

Thanks

--
Eyal Saiet


_______________________________________________
gexiv2-list mailing list
gexiv2-list gnome org
https://mail.gnome.org/mailman/listinfo/gexiv2-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]