Archive

Posts Tagged ‘Google Earth’

Tours and 3D animation

February 19th, 2009 9 comments

Looking around the various tech reviews of the new Google Earth 5, one new feature seems to have slipped under the radar – the KML tags describing the new touring function include a seriously powerful method for defining smooth motion 3d animation.

I’ve been messing around with this a little, and hacked together a few basic (not much KML code), slightly weird 😉 , but dramatic examples. These are tours – view them by loading them into GE and double clicking on play me! in the side panel.

Fly wingman with a 3d model plane (also see the vid above)

Polygon morph France into Spain!

Dot-to-dot tour of European cities

How do these work ?

With the new <gx:AnimatedUpdate>. A container for the <Update> element. Which allows you to temporarily modify KML, and specify a length of time for that action to take place over.

Switching features on and off during a tour is the obvious example. Not so apparent, because it’s not directly available through tour recording inside Google Earth, is that for many other changes GE will smoothly interpolate (tween) the difference.

The example Google provide gradually increases the size of a placemark. But this effect can be applied to any KML attribute taking a range of values – orientation, colour, scale and coordinates. Significantly, these transitions will work in parallel, sequentially, across multiple features and alongside scripted camera movements.

This is powerful stuff! A much more convenient and concise method of animation than time slider hacks, where every intermediate step needs coding in KML. Only real downside in all this – and I guess it could be a biggie depending on your needs – you can’t fly around at will during tour playback.

About the examples

  • The first uses a single <gx:AnimatedUpdate> to gradually change location of a 3d model over a 60 second duration. Code for this below the fold if anyone wants to check it out.
  • Second does the same to transform all 38 coordinates in a polygon.
  • Last example combines a series of linestring coordinate transformations with color and scale changes for placemark icons.

Read more…

When two satellites collide, in Google Earth

February 12th, 2009 No comments

Satellites Colliding in Google Earth

Satellites Colliding in Google Earth

This is a quick Google Earth timeline animation of the recent satellite collision between the Russian Cosmos 2251 and the US iridium 33.

Update 2009-02-14: Two ways to view this now.
– A Google Earth browser plug-in version
– Or the original KML file for regular Google Earth below

Cosmos 2251 and Iridium 33 Collide

Use the time slider at the top of the screen to play the file back. The animation tracks the objects during the 6 minutes leading up to impact. Also included are the orbital paths (ground tracks) of the two objects between 16:00 and 17:00 GMT on February 10th.

Location data is based on the orbital elements for the two satellites, from Celestrak.

Google Earth 5, World Time Zone Clock – Javascript and KML

February 5th, 2009 19 comments

World Time Zone Clock in Google Earth 5

World Time Zone Clock in Google Earth 5

Here’s a KML and Javascript(!) hack for the new Google Earth 5.

It overlays a time zone map and allows you to click anywhere on the globe to see a running clock with the current time for that location.

Grab the KML file here:

World Clock

This uses normal KML to display a balloon when a polygon is clicked. Each balloon description has its own bit of Javascript to automatically calculate and display the time for the associated time zone.

More Info
In addition to running javascript, this hooks into a couple of other implementation changes in the new GE 5.

  • Polygons are now directly clickable. Previously you had to click on them in combination with a key press to make their description bubbles appear.
  • Stylemap highlight styles are triggered by mouseovers on polygons and lines instead of just placemark icons.

The polygons in this file are drawn from Valery‘s KML Timezone map, posted on the Keyhole BBS a few years ago.

Google Earth 5.0

February 3rd, 2009 No comments

Latest version of Google Earth, 5.0 is now out. This is a massive ugrade to Google Earth, which takes the application forwards in lots of new ways. For sheer scope and range of new features easily the biggest update yet.

Headline features are Historic satellite images, 3D Ocean terrain, Google Mars!, and powerful new touring capability

Download the new version from the official download site here: Google Earth 5.0

A few observations:

  • Historical Imagery – For me the single most impressive and unexpected addition is the ability to see historic aerial and satellite imagery. Including stuff going back to the 1940s! Previously Google Earth only allowed the display of one image of any place taken at one particular time. Most other new features were predicted in one way or anther – this came out of the blue. Really excited about this. Must be costing Google a packet to acquire all this data.
  • Ocean – Displays 3d underwater terrain (bathymetry), with a neat wave effect for the ocean surface. Less excited by the possiblities of this than other people seem to be, but admittedly does look cool.
  • Mars – A complete 3D terrain model. Very impressive. Pretty much every conceivable layer provided – different types of imagery, space probe landing sites etc. The Mars rover tracks look ripe for time animation!
  • Touring – Provides the ability to record and play back tours. Especially like the fact recorded tours are stored as kml files. Makes it possible to share them, automatically generate them through scripts – e.g. as a black box recording from a flight simulator, and in future (hopefully) play them in the browser plugin.

Some User interface changes:

  • Time slider has some new features – zoom buttons which change the playback length between a minute, hour, day, week, month, year. Further options to set start and end times
  • Overview map – new location bottom left of screen, some options to change the size and zoom ratio.
  • The Ruler displays a compass heading in addition to distance.
  • Placemarks bounce when the mouse hovers over them.

Couple of niggles – might be due to my PC, internet connection or maybe just the number of people trying to use the application.

  • The new version took a very, very long time to install.
  • Imagery is being pulled in very slowly at times

Development Stuff

The KML changes are listed in the KML Reference. And a post on the devlopers blog here.

Some very tight control of touring is possible through the new kml extensions. Ability to set the satellite imagery date and sun position time in a lookAt or camera view. Hopefully this new provision for UI control will eventually be extended to things like toggling off individual 3d buildings in the layers.

On a side note, none of these new dev features have been rolled out in the Google Earth plugin yet. But a couple of the changes in GE 5 were effectively already in the browser version – the Javascript/CSS support in balloons, and the clickability of polygons and lines.

Growth of Wal-Mart, Google Earth Animation

January 27th, 2009 No comments

Here’s a Google Earth time animation showing 3176 Walmart store openings in the USA, from 1962 to 2006. See how the business started out with a single retail location in Arkansas, then spread at an accelerating rate across different regions.

Video showing the animation running in Google Earth:

Grab the KML file for Google Earth here:

Walmart 1962-2006 (300kB)

  • Once it’s loaded, use the time control slider top of the main Google Earth window to play.
  • Because this is Google Earth, you can fly around and zoom in and out during the animation.

For anyone thinking this visualization looks vaguely familiar – hands-up, it’s not my idea, the animation is inspired by FlowingData‘s very slick, slippy-map animation of the same data, released last year, here.

To replicate that I’ve used the same KML carpet bombing technique as the flight path animations I knocked together a while back – each time a placemark appears I rapidly cycle through a sequence of Icons of decreasing size, to provide some visual punch.

Note: The location data isn’t all that precise in this – I think it’s just based on zip code area locations, not street addresses. But the stores generally aren’t too far away from the placemarks – look for the massive grey buildings with a zillion cars parked out front.