LR unnecessarily reduces the precision in exported EXIF GPS coordinates to about 18 centimeters. A trivial one-line fix would increase the precision of exported coordinates to about 0.004 centimeters.

Modern GPS augmentation systems and post-processing can produce coordinates with accuracy at the centimeter level or finer. For example, this LR user is processing drone pics for photogrammetry applications: https://forums.adobe.com/message/10936939

This bug affects coordinates in exported JPEGs and TIFFs but not in raw XMP sidecars, which maintain high precision.

EXIF represents GPS coordinates with three rationals (fractions) for degrees, minutes, and seconds. The numerators and denominators are stored as 32-bit unsigned integers, allowing extremely fine precision (on the order of 1 part in 70 million of latitude or longitude seconds).

For example, ExifTool stores the latitude 37.1234567891389 in EXIF with these three rationals:

degrees = 37 / 1

minutes = 7 / 1

seconds = 767091 / 31381

LR stores GPS coordinates in the catalog as 64-bit floating point numbers, which allow 15 decimal digits of precision, with at least 12 fractional digits. This provides a precision of roughly 0.00001 (10^-5) centimeters.

But inexplicably, LR exports EXIF coordinates using a minutes denominator of only 10,000, limiting precision to about 18 centimeters. For example, it exports latitude 37.1234567891389 as:

degrees = 37 / 1

minutes = 74074 / 10000

seconds = 0 / 1

(You can examine the rational representation of the exported coordinates using "exiftool -v".)

The fix is trivial -- use a minutes denominator of 50,000,000 rather than 10,000, which will increase the precision to about 0.004 centimeters. (A denominator of 50,000,000 is small enough to allow a maximum value of 60 to be represented as a 32-bit unsigned rational.)

Here's sample code of how to do the conversion from floating point to the EXIF rational representation:

Modern GPS augmentation systems and post-processing can produce coordinates with accuracy at the centimeter level or finer. For example, this LR user is processing drone pics for photogrammetry applications: https://forums.adobe.com/message/10936939

This bug affects coordinates in exported JPEGs and TIFFs but not in raw XMP sidecars, which maintain high precision.

**Workaround**

A workaround is to use the Run Any Command plugin to create an export post-process action that runs ExifTool with arguments that copy the GPS coordinates from the original to the exported file.**Details of the Bug**

EXIF represents GPS coordinates with three rationals (fractions) for degrees, minutes, and seconds. The numerators and denominators are stored as 32-bit unsigned integers, allowing extremely fine precision (on the order of 1 part in 70 million of latitude or longitude seconds).

For example, ExifTool stores the latitude 37.1234567891389 in EXIF with these three rationals:

degrees = 37 / 1

minutes = 7 / 1

seconds = 767091 / 31381

LR stores GPS coordinates in the catalog as 64-bit floating point numbers, which allow 15 decimal digits of precision, with at least 12 fractional digits. This provides a precision of roughly 0.00001 (10^-5) centimeters.

But inexplicably, LR exports EXIF coordinates using a minutes denominator of only 10,000, limiting precision to about 18 centimeters. For example, it exports latitude 37.1234567891389 as:

degrees = 37 / 1

minutes = 74074 / 10000

seconds = 0 / 1

(You can examine the rational representation of the exported coordinates using "exiftool -v".)

The fix is trivial -- use a minutes denominator of 50,000,000 rather than 10,000, which will increase the precision to about 0.004 centimeters. (A denominator of 50,000,000 is small enough to allow a maximum value of 60 to be represented as a 32-bit unsigned rational.)

Here's sample code of how to do the conversion from floating point to the EXIF rational representation:

function degreesToEXIF (d)

local sign = d >= 0 and 1 or -1

local degrees, fracDegrees = math.modf (math.abs (d))

local minutes = fracDegrees * 60

local minutesDen = 50e6

local minutesNum = math.floor (minutes * minutesDen + 0.5)

if minutesNum == 60 * minutesDen then

degrees, minutesNum = degrees + 1, 0

end

return sign, degrees, 1, minutesNum, minutesDen, 0, 1

end

John R. Ellis, Champion