How to add GPS latitude and longitude using Exiftool in mac (how to edit meta data in jpeg)

bibinwilson picture bibinwilson · Jan 25, 2017 · Viewed 8.3k times · Source

I have a bunch jpeg image that is obtained from FLIR camera. Along with that images I collected the GPS coordinates also. Now I'm trying to take the GPS latitude and longitude to the metadata of the image.

I wrote a program in R programming language to find the GPS location of each image with respect to the time(when ever the GPS location time and the camera time matches, I took that coordinates).

ie, for a particular image, I have GPSLatitude <- 19.33423 and GPSLongitude <- 72.090834

But now I need to add those exact GPS location to the image.

I tried to do that with Exiftool. I'm using Mac osX sierra. In that I installed exiftool. But now I don't know the how to update GPS data using that.

Can anyone help me. If possible let me know the method to update the data directly from the R programming language itself

Thanks

Answer

Casto Salobre&#241;a picture Casto Salobreña · Jun 26, 2017

To add the gps coordinates with exiftool:

exiftool -XMP:GPSLongitude="-84.683333"  -XMP:GPSLatitude="10.502117"  -GPSLongitudeRef="West" -GPSLatitudeRef="North" photo.jpg

The values are just floating point numbers as got from Google Maps for example.