Google Earth for Mac + AppleScript = Geotagger! (and more!)
Mac users suddenly have plenty to rejoice about. What happened?
Craig Stanton — he of iPhotoToGoogleEarth fame — just discovered that Google Earth 4 has a basic AppleScript library!
This opens up all sorts of possibilities. For Craig, it allowed him to build what is perhaps the simplest, most intuitive georeferencing application on any platform: Geotagger.
How does it work?
- Position Google Earth over the spot where you took a photo. (Need some crosshairs?)
- In your finder, drag the photo to the Geotagger droplet.
Done. Geotagger uses AppleScript to read the position of the center of the screen in Google Earth, and adds this to the EXIF metadata of the photo(s) you dropped on it. You can now import these photos into Flickr or Panoramio, where they will be automatically geotagged. If you import these photos into iPhoto, you can use Craig's iPhotoToGoogleEarth plugin to export them as KML. Only caveat: The photos need to be JPEGs.
Being able to commandeer Google Earth via AppleScript really opens up a Pandora's box for Mac users. Check out the commands:

I had hopes for AppleScript support when GE3 came out for the Mac because I really wanted to build a remote control for Google Earth using my Bluetooth enabled mobile phone and fellow Stockholmer Jonas Salling's Salling Clicker. Now that's possible. Here's the proof, taken outside on Stockholm's Odenplan last night:
(Geeknotes: The mobile phone in the video is acting as the Mac's 3G modem via Bluetooth while also simultaneously relaying commands via Bluetooth using Salling Clicker. No, that's not why it crashed — the current Google Earth 4 Mac beta is a tad unstable if you as much as breathe on the preferences file.)
If you have Salling Clicker, you can download the file containing my (very simple) AppleScript commands for Google Earth. Treat it as a proof of concept; you'll have to attach the scripts to phone keys yourself. I'm sure AppleScript gurus have ways of turning this into a more polished product.
I can't wait for increased AppleScript support by Google Earth in the future. Imagine geocoding placenames via AppleScript, or taking screenshots of your house as wallpaper for your mobile phone, or letting GPS devices and location-aware mobile phones show you where you are in Google Earth. In fact, some of these things should even be possible with the current AppleScript library. Apple users, your Google Earth API has arrived.
Permalink |
Del.icio.us
|
Connotea
Comments
The QT video appears as a big ? on my screen. I'm running QT Pro 7.1.3 on OS X 10.4.7 on Intel. It should all work.
Also "dowload" looks better if spelled "download" :=)
Posted by: Denis Stanton at 23:42 UTC, September 26, 2006
Well, it's embedded YouTube code, and I can see it in both Firefox and Safari on my Mac with same specs. Can you see other embedded YouTube content?
Posted by: Stefan Geens at 23:56 UTC, September 26, 2006
This is really cool !! Now I wish I had mac book.
Posted by: izo at 0:09 UTC, September 27, 2006
Pandora's box indeed: we've had our own minor headaches with cross-platform issues between Mac and Windows, and as developers dive into the Windows API and now AppleScript, the experience of missing out on "something cool in Google Earth" because it's only been tricked out on a particular platform, well, I guess it's a part of growing up.
Personally I think there's tremendous growth potential in providing an informative, pleasurable, repeatable experience without worrying about what OS, Service Pack, or obscure .dll the end user may or may not have. So while I applaud creativity in extending the usefulness of GE, I feel a faint queasiness when said innovation is limited to a specific platform.
Brian
p.s. None of the above should be construed as interest in engaging in a Mac vs. Windows vs. Linux debate....
Posted by: Brian Timoney at 1:13 UTC, September 27, 2006
Stefan, you are right, it is the use of YouTube (and therefore Shockwave) that is preventing the movie from showing on my Intel iMac. QuickTime would be fine, but shockwave is not.
Adobe's site says "Shockwave Player has not yet been ported to run natively on the new Intel-based Macintosh computers and currently only runs in Rosetta emulation mode. To install and use Shockwave Player on an Intel-based Macintosh, you will need to run the browser in Rosetta emulation mode. Follow the instructions below to launch your browser in Rosetta emulation mode."
Posted by: Denis Stanton at 5:49 UTC, September 27, 2006
Brian, YouTube uses Flash (as opposed to Shockwave, which is a Macomedia Director format). The Flash Player 9 is available as Universal Binary.
Posted by: Philby at 6:24 UTC, September 27, 2006
Tell me more about "breathing on the preferences file".
Posted by: PenguinOpus at 14:39 UTC, September 27, 2006
That is very cool the BT script for Google Earth:)
On the AppleScript side of things for Google Earth, if any one who is using Blojsom and ecto as there blogging sulution can us my AppleScript's for Geo-Blogging for Google Earth & Maps.
To see Google Earth examples of the end results:
Click here to download the kmz file of my Geo-Blog.
Click here to download the kmz file of The Uni. of Richmond Geo-Blog.
Posted by: Adam at 16:20 UTC, September 27, 2006
Oops just to add my ecto script is using Google Earth's scripting Dictionary more info click here :)
Posted by: Adam at 16:50 UTC, September 27, 2006
Very interesting Adam. I had seen your Blojsom scripts but somehow assumed you were using the Finder's screenshot capture command. I should pay more attention:-)
Posted by: Stefan at 18:35 UTC, September 27, 2006
Thanks for the Geotagger link. Have you seen JetPhoto? This sets up photo galleries and connects with Google Earth (seems to work fine with Geotagger) and Flickr.
Posted by: Duncan at 6:29 UTC, November 13, 2006
hello,
pl inform how to download google earth for nokia 9300
hope to do needful
thanking u
Posted by: hiren pattni at 4:20 UTC, April 04, 2007
this is a really fantastic development! I'm trying to work with the new applescript library, but I can't seem to specify the "speed" property of the SetViewInfo command correctly... It just snaps to new location instantly. Does anyone on here have any ideas? They would be so so so appreciated!
tell application "Google Earth"
SetViewInfo {
latitude:40.735328649342,
longitude:-73.99444850118,
distance:41.955846282163,
tilt:6.56734449525258E-10,
azimuth:-1.87413875374805E-4,
|speed|:0.1}
end tell
thanks again!
-C
Posted by: camb416 at 19:17 UTC, October 10, 2007
"speed" is not a member of the viewinfo record--it is a separate optional parameter:
tell application "Google Earth"
SetViewInfo {latitude:40.0624, longitude:-105.192825, distance:4209.0, tilt:0.0, azimuth:0.0} speed 0.2
activate
end tell
Posted by: hal eden at 17:14 UTC, May 01, 2008
Hi,
I think you'd better assign keypad for scripts you created to make it easier to navigate in Google Earth using mobile phone.
As for me:
Joystick up/down/left/right/push: GE-up/down/left/right/stop
2/8/4/6: Tilt-up/down/left/right
1/3: zoom in/out
5: point north
0: look straight down
After make that tiny changes, the navigation is much easier.
Anyway, thanks so much for your script file.
Posted by: phananhvu at 4:43 UTC, August 13, 2008
Post a comment
NeoGeo Jobs
Ogle Earth: Recent posts
Ogle Earth's links
Archives
Movable Type 3.2