Easy Geotagging with ExifTool

Dmitri Popov

Productivity Sauce

Oct 11, 2011 GMT
Dmitri Popov

Need to quickly geotag a bunch of photos taken at a specific location? ExifTool is your friend. Using this powerful command-line tool, you can geotag multiple photos with a single command. Before you proceed, make sure that ExifTool is installed on your machine. To install ExifTool on Ubuntu, run the sudo apt-get install libimage-exiftool-perl command. Next, you have to obtain the longitude and latitude of the desired geographical location, and feed the coordinates to ExitTool as follows:

exiftool -GPSLongitudeRef=E -GPSLongitude=139.7513889 -GPSLatitudeRef=N -GPSLatitude=35.685 *.jpg

This command will geotag all JPEG images in the current directory. Besides GPSLongitudeRef, GPSLongitude, GPSLatitudeRef, and GPSLatitude, ExifTools supports a number of other tags. Check the GPS Tags page for further info.

Comments

  • *.jpg deprecated

    If you are anything like me, your JPEG images are a mix of ".jpg" and ".JPG" files. So rather than specifying "*.jpg", I recommend using "-ext jpg .". This form also has the advantage of being able to process JPEG images recursively in sub-directories with the addition of the -r option.
comments powered by Disqus