LRGeocode

LRGeocode is a plugin for Lightroom 4 that helps you to convert the location fields in photo metadata into physical GPS coordinates that can be shown in the map module or at sites like Flickr.

It takes the location, city, state and country fields from a photo and uses Google’s geocoding API to attempt to convert them into GPS coordinates. Given a selection of photos it will do just one look-up per unique address and tag all photos with that address with the same coordinates. This sort of lookup isn’t always accurate so for now the plugin will check each address it finds with you, giving you the option to search for something more accurate.

Warnings

This is something I hacked together over the space of a day. About the only testing it’s seen is running it over my photo library one folder at a time (600 photos at most). Knowing the code I felt safe enough doing that without making a backup, that was probably silly of me and I recommend you take backups before you do anything. In theory any changes it makes can be reverted with the usual Undo command but think of it this way, would you trust a random person on the internet to go fiddling with your data?

I’m not likely to make any improvements to this plugin. It has mostly served its purpose for me now. If you want to see new features, why not fork the code on github?

Notes

  • I’ve found this safe enough to use on my own photo library, but if something goes wrong and it trashes your data then I’m very sorry but you should have made a backup first.
  • It won’t attempt to re-tag photos that already have GPS information.
  • If any photos have the same location fields as photos with GPS information then that GPS will be applied to them all, because your existing GPS data is already accurate … right?
  • Once it has done all the lookups it will write all the GPS data for all the selected photos in one go, that might freeze the UI for a short time if there are a lot in the selection. For a few hundred it isn’t even noticeable.
  • It requires at lease the country and state field to be filled out or it will ignore the photo.
  • The results you get entirely depend on how precise you’ve been in filling out the fields.
  • Google’s API doesn’t return results for business names, only street/town/physical locations.
  • You can cancel the work at any time or once it has completed Undo will revert any changes made.

Installing

Download the zip file, extract it somewhere sensible then from Lightroom’s plugin manager tell it to load the plugin from the LRGeocode.lrplugin folder.

Usage

Select the photos you want to geocode, go to Library -> Plugin Extras -> Geocode. The plugin will ask you to confirm its result for every address it looks up. Clicking cancel will cancel the entire operation.