The decimal places in the GPS Altitude are too few

Started by asia888, May 22, 2024, 06:12:15 AM

Previous topic - Next topic

asia888

The decimal places in the GPS Altitude are too few.

StarGeek

In what way is it "too few".  Can you provide a sample image and explain why it is wrong?

The data in the GPS tags is saved as a fraction. There may be minor rounding differences when displaying the data as a decimal. You can use the -n (--printConv) option to list the entire decimal number that is converted from that fraction or the -c (-coordFormat) option to control how the data is printed.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Use the -n option and you'll see all available digits of precision.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

wywh

Add -v to see the fractions.

In images the max displayed decimals seem to be 8 for altitude (91/81 ≈ 1.12345679 in the example below) or less if the integer has more digits (max integer length seems to be 10 digits, and overflowing decimals are truncated):

exiftool -m -P -overwrite_original '-GPSLatitude*=29.9792' '-GPSLongitude*=31.1342' '-GPSAltitude*=1.1234567890123456789' image.jpg

exiftool -a -G1 -s -Location:All -n -v image.jpg
  | 5)  GPSInfo (SubDirectory) -->
  | + [GPS directory with 7 entries]
  | | 0)  GPSVersionID = 2 3 0 0
  | | 1)  GPSLatitudeRef = N
  | | 2)  GPSLatitude = 29 58 45.12 (29/1 58/1 1128/25)
  | | 3)  GPSLongitudeRef = E
  | | 4)  GPSLongitude = 31 8 3.12 (31/1 8/1 78/25)
  | | 5)  GPSAltitudeRef = 0
  | | 6)  GPSAltitude = 1.12345679 (91/81)
[GPS]           GPSLatitude                     : 29.9792
[GPS]           GPSLongitude                    : 31.1342
[GPS]           GPSAltitude                     : 1.12345679

Likewise, for movies it seems to be max 14 decimals for altitude. The max string length seems to be 15 digits; overflowing decimals are truncated:

exiftool -m -P -overwrite_original -Keys:GPSCoordinates='29.9792, 31.1342, 12345678901234.1234567890123456789' movie.mp4

exiftool -a -G1 -s -Location:All -n -v movie.mp4
  | | Keys (SubDirectory) -->
  | | + [Keys directory]
  | | | Added ItemList Tag 1.1 = (mdta) location.ISO6709
  | | ItemList (SubDirectory) -->
  | | + [ItemList directory]
  | | | GPSCoordinates = +29.9792+031.1342+12345678901234.100/
[Keys]          GPSCoordinates                  : 29.9792 31.1342 12345678901234.1

- Matti