GPS Lat/Long EXIF write precision.

Started by david69cn, October 19, 2018, 05:44:18 AM

Previous topic - Next topic

david69cn

Exiftool is very easy to use and runs very fast, thanks to Phil Harvey
I have used exiftool to successfully write GPS latitude, longitude and altitude information to my photos. but the number of digits after the decimal point is only 6 digits. The precision of latitude and longitude is not enough. I need to keep 8 digits after the decimal point. How to deal with it?

thank you!

Phil Harvey

The stored value keeps more than 8 digits of precision.  Use the -n option or add a "#" to the tag name to see the full precision, the -c option to use the format of your choice, or the -v option to see how it is actually stored (as 3 rational values):

> exiftool a.jpg -gpslatitude=35.604920927
    1 image files updated
> exiftool a.jpg -gpslatitude
GPS Latitude                    : 35 deg 36' 17.72"
> exiftool a.jpg -gpslatitude#
GPS Latitude                    : 35.6049209270028
> exiftool a.jpg -c "%.8f" -gpslatitude
GPS Latitude                    : 35.60492093
> exiftool a.jpg -v | grep GPSLatitude
  | | 1)  GPSLatitude = 35 36 17.71533721 (35/1 36/1 103493/5842)


- 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 ($).