I have a few folders of .JPG images that I need to geo-tag. I don't have a .GPX file or anything else that will let me use my usual tools (Geosetter or Photo Mechanic) to geotag the images, but I do have a CSV file of the image filenames and their lat/longs, like this:


I'm on Windows 7. Obviously, I could edit the EXIF metadata manually and copy and paste each set of coordinates into the appropriate EXIF tags, but I was hoping to find a way to do it automatically. I've found the Exiftool GUI, which has the ability to copy metadata from an XMP file to the appropriate JPG, but I don't know how to get my table into a set of XMP files in order to take advantage of that. I could also create a batch script to use Exiftool from the command line, which I can probably figure out on my own in due time but to someone who doesn't deal with EXIF data regularly, the sheer number of tags, command-line arguments and options available in Exiftool is a bit daunting.


1 Answer 1


ExifTool could do this, but the use of negative coordinates might make it a two step procedure depending upon what tags you want to use. XMP gps tags will take negative coordinates, but EXIF gps tags only accept positive numbers and need the directional reference tag to be accurate.

First off, there would have to be some changes to CSV. The first row would have to be "SourceFile,XMP:GPSLongitude,XMP:GPSLatitude". Date wouldn't be necessary, unless you need to change the date. The first column would have to be the full path to the source file. So, your csv file would have to be changed to something like


From there, the command would be as simple as

ExifTool -csv="/path/to/csvfile.csv" /directory/path/

That will load up the XMP gps tags. If you need the EXIF geo tags set as well, you could follow up with

ExifTool "-GPS:all<XMP-exif:all" "-GPS:GPSLongitudeRef<Composite:GPSLongitudeRef" "-GPS:GPSLatitudeRef<Composite:GPSLatitudeRef"  /directory/path/ 
  • 2
    \$\begingroup\$ This worked perfectly, thanks! The software I'm using apparently reads GPS data from the XMP tags so I didn't test the last step, copying the lat/longs from the XMP tags to the EXIF tags. \$\endgroup\$
    – Dan C
    Commented Apr 2, 2015 at 19:44
  • \$\begingroup\$ the 2nd part that Dan didn't use also works perfectly. Thanks! \$\endgroup\$
    – DaveB
    Commented Aug 13, 2016 at 20:25
  • \$\begingroup\$ I tried this method but no result. I think I am doing something wrong i.sstatic.net/y80Wy.png i.sstatic.net/hZ81V.png How exactly should I write the code? \$\endgroup\$
    – sevinc24
    Commented Oct 19, 2022 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.