How to geotag photos on Linux with Otto

If you want to transfer, rename, geotag, and organize photos and RAW files in one fell swoop, Otto is your friend. This shell script can transfer photos and RAW files from a storage card, neatly organize them, and even add a copyright notice to each photo. If the photos are geotagged, the script also writes useful information, such as camera model, lens, and weather conditions into the Comment field of the EXIF metadata.

Better still, if your camera doesn't support geotagging, the script offers two ways to geotag photos and RAW files on the fly. Add the -g switch followed by the city where the photos were taken, and the script automatically obtains the city's coordinates and uses them for geotagging:

otto.sh -d /path/to/photo/dir -g Tokyo

Otto also makes it possible to geocorrelate photos and RAW files using a GPX file. This can come in handy when you use an app like GPS Logger for Android to track your movements and save them as GPX files.

To geocorrelate photos and RAW files when transferring them, use the -c switch followed by the path to the desired GPX file:

otto.sh -d /path/to/photo/dir -c /path/to/foo.gpx

For each day, GPS Logger for Android saves tracking data in a separate GPX file. But what if you need to correlate photos taken during several days? Using the -m switch, you can instruct Otto to merge multiple GPX file into one an use the resulting file for correlating photos:

otto.sh -d /path/to/photo/dir -m /path/to/gpx/dir

This is an excerpt from the Linux Photography book. Get your copy from Google Play Store or Gumroad.