More Snow Leopard Geotagging With Services: Google Earth

As mentioned before, I feel geotagging is an important part of image metadata. In a previous post, I showed a simple Applescript-based Snow Leopard service to set images to a commonly used location.

With a slight modification to the Applescript in the service, you can pull the location out of Google Earth and embed your photos. I was really excited when Picasa supposedly had this feature, but it’s not mac compatible! Now, iPhoto can do the same thing.

Step 1. Set up the Automator Workflow as described in a previous post.

Step 2. Use the following Applescript

 

on run {input, parameters}
 local myLongitude
 local myLatitude
 tell application "Google Earth"
  set myView to GetViewInfo
  set myLongitude to longitude of myView
  set myLatitude to latitude of myView
 end tell

 tell application "iPhoto"
  set mySelection to selection
  repeat with myImage in mySelection
   tell myImage
    set longitude of myImage to myLongitude
    set latitude of myImage to myLatitude
    reverse geocode myImage
   end tell
  end repeat
 end tell

 return input
end run

Leave a Reply