ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: pstein on July 10, 2020, 10:08:26 AM

Title: How to extract GPSlongitude and GPSlatitude value from EXIF-Header of *.jpg ?
Post by: pstein on July 10, 2020, 10:08:26 AM
How can I extract the
a) GPSlongitude and
b) GPSlatitude

value from EXIF-Header of an *.jpg image file?

exiftool should return ONLY the value e.g

43.007338

nothing more.

Title: Re: How to extract GPSlongitude and GPSlatitude value from EXIF-Header of *.jpg ?
Post by: Phil Harvey on July 10, 2020, 10:26:11 AM
exiftool -gpslatitude -gpslongitude -s -S -ext jpg DIR

- Phil
Title: Re: How to extract GPSlongitude and GPSlatitude value from EXIF-Header of *.jpg ?
Post by: StarGeek on July 10, 2020, 10:42:54 AM
Add a hashtag at the end of each tag to get the decimal value (see the -n (printConv) option (https://exiftool.org/exiftool_pod.html/exiftool_pod.html#n---printConv))
-gpslatitude# -gpslongitude#

or use the -c (coordFormat) option (https://exiftool.org/exiftool_pod.html#c-FMT--coordFormat) to format the output any way you'd like.