I wonder how the GPS coords is actually encoded in the EXIF data, because I have a hard time believing they're actually encoding it with as many significant digits as displayed by the website.
For the example they give, I'm counting 14 significant digits for GPSLatitude, and 16 for GPSLongitude, which is way more specific than a grain of sand, ref https://xkcd.com/2170/
I suppose it's floating point, and of course that brings its own "fun" in displaying in decimal.
Apparently, each coordinate is an array of 3 rational values representing the degrees, minutes and seconds, where the numerator and denominator are 32-bit unsigned integers (plus a separate field to represent the sign). That's a lot of precision.
EXIF is a binary format. I would expect it to just stuff a double in there. So 16 digits is what you get even if you need less. 32 bit floats aren't precise enough to store latitude/longitude coordinates.
You're right they don't usually include that many significant digits. Here is an example sample of some GPS data I specifically extracted from a cross-country bike trip from photos I took on my phone, for comparison:
The GPS encoding depends on the software that generates the EXIF. In case of the article with iPhone this is reasonably consistent across the apps. But, EXIF GPS (and other fields) can be very inconsistent across other software, both on mobile phones with cameras, and cameras themselves. In my experience I seen the most errors in knock off devices.
IF you are interested to learn more, look into "deadbox" digital forensics.
I know for a fact that, possibly due to a bug, or intentionally, they are not encoded to the accuracy that they could be, and using Apple's own EXIF tools will not let you encode them at full accuracy. I know this as I had to write a tool to re-encode the values into the EXIF.
Comments
I wonder how the GPS coords is actually encoded in the EXIF data, because I have a hard time believing they're actually encoding it with as many significant digits as displayed by the website.
For the example they give, I'm counting 14 significant digits for GPSLatitude, and 16 for GPSLongitude, which is way more specific than a grain of sand, ref https://xkcd.com/2170/
I suppose it's floating point, and of course that brings its own "fun" in displaying in decimal.
At least it also includes GPSPositioningError!
Apparently, each coordinate is an array of 3 rational values representing the degrees, minutes and seconds, where the numerator and denominator are 32-bit unsigned integers (plus a separate field to represent the sign). That's a lot of precision.
EXIF is a binary format. I would expect it to just stuff a double in there. So 16 digits is what you get even if you need less. 32 bit floats aren't precise enough to store latitude/longitude coordinates.
Just look for the many documentations that exists, just quick search: https://exiftool.org/TagNames/GPS.html
You're right they don't usually include that many significant digits. Here is an example sample of some GPS data I specifically extracted from a cross-country bike trip from photos I took on my phone, for comparison:
https://github.com/lelandbatey/batey_bike_trip_records/blob/...
The GPS encoding depends on the software that generates the EXIF. In case of the article with iPhone this is reasonably consistent across the apps. But, EXIF GPS (and other fields) can be very inconsistent across other software, both on mobile phones with cameras, and cameras themselves. In my experience I seen the most errors in knock off devices.
IF you are interested to learn more, look into "deadbox" digital forensics.
I know for a fact that, possibly due to a bug, or intentionally, they are not encoded to the accuracy that they could be, and using Apple's own EXIF tools will not let you encode them at full accuracy. I know this as I had to write a tool to re-encode the values into the EXIF.