Exploring Google Earth in Linux

Shots of Earth


Google Earth lets you view the world from space and zoom in on towns, roads, and even buildings. We'll show you how to travel the planet from your Linux desktop.

By Carsten Schnober

Google Earth [1] brings hi-res aerial views of the whole Earth to your computer desktop. The latest full release, Google Earth 4, integrates satellite and aerial images with Wikipedia text [2], 3D models, and photos from Panoramio [3]. We tried out version 4 in Linux and found the journey quite pleasing - but if you ever decide to integrate your own 3D model, you may need Windows or MacOS.

On Screen

To run Google Earth in Linux, you need a desktop with working 3D acceleration. Apart from this, the software does not ask too much of your computer: a CPU with a clock speed of 500MHz and 128MB RAM are all it takes, although Google does recommend a 2.4 GHz CPU and 512MB RAM to avoid annoying screen refresh delays. Because Google Earth downloads the image data while you are using the tool, you also need a fast Internet connection. The box titled "Installation" tells you how to set up Google Earth on Linux.

After launching Google Earth, you are immediately boosted into space, where you can look down on the Earth. To navigate, use your mouse. Hold down the left mouse button to rotate the globe in any direction; the mouse wheel scales the visible selection up or down. If you hold down the right mouse button, and drag the mouse at the same time, you can either zoom in to or out from the earth's surface.

Installation

Start by clicking the Download link on the Google Earth website [1] to transfer GoogleEarth.bin to your hard drive. The .bin file is the installer program. Then pop up a terminal window, change to the directory where you stored the file, and type sh GoogleEarth.bin.

If you run the installation script as root, it will create the Google Earth program in the directory /usr/local/google-earth; the link to the command for launching the program, googleearth, is created in /usr/local/bin. This folder is included in most users' search paths. If you do not have root privileges, or if you do not want to install Google Earth globally, you can run the installer as a normal user.

The program will ask you for a target directory and suggest creating a googleearth directory below your own home directory. In this case, you need to change directory to /home/user_name/googlearth after the install, and launch the program by entering ./googleearth.

Basic Functions

To look for a specific location, type the name in the search box at the top in the Fly to box. This can be the name of a country, or a city - you can even enter the street name and house number. Press Enter to confirm, and Google Earth will fly you to your chosen destination; if your choice of destination is not unique, the program will give you a list of matches, and you can double-click to select the right entry. In theory, you can fly directly to geographic locations, such as Mount Everest or the Everglades.

The Find businesses tab helps you navigate. For instance, you can search a town for all the restaurants registered with Google. To do so, type a name or a category such as Hotels in the What box. Then either select a location you have searched for previously in Where, or enter the name of the city manually. Pressing Enter takes you to a list of matches, which the program will highlight on the map.

Finally, the Directions tab gives you the ability to calculate a route between two locations. To do so, type two addresses in the From and To boxes. The program will then display the route on the map, pointing out important sites and major roads.

Google Earth also has a sense of humor: if you enter a route that you can't travel on by car, such as from England to the USA, Google Earth will take you to the seaside and then tell you to: "Swim across the Atlantic Ocean." The route planner works perfectly apart from this, and it will even show you points of interest or warn you of toll roads along the route.

What Else?

Google Earth offers users more than just a photographic map of the earth. While you navigate the globe, you will stumble across icons that embed Panoramio [3] photos, local webcams, and Wikipedia entries (see Figure 2) and will display the additional media at the click of your mouse. Information of this kind can never be completely neutral because of the selection process, but the size of the Wikipedia community helps to maintain objectivity. In the case of the Panoramio images, popularity is what decides which images finally make their way into Google Earth.

Google Earth has chosen to be subjective in another case: in cooperation with the Holocaust Memorial museum in the United States, the program currently points visitors to the war that is raging in the Sudanese region of Darfur (Figure 1). Flames point to destroyed villages, and reports, photos, and plain facts illustrate the local situation. The Holocaust Memorial Museum is looking to reach the 200 million users of Google Earth in this way, and in doing so, they demonstrate how important a medium like Google Earth could be.

Figure 1: Google Earth is cooperating with the US Holocaust Memorial Museum to draw attention to the war in the Sudanese region of Dafur.

Figure 2: Google Earth relies on the Internet Community to embed extra info via Wikipedia.

House by House

Google Earth's collection of images taken by satellites and aircraft are two-dimensional by nature; this is particularly apparent if you change the angle of view. The standard view is a bird's eye view of the earth. If you press Shift and push the mouse wheel, you can change the angle of elevation to have a flatter view of your target.

The default setting gives buildings an unnaturally flat appearance in this view. But if you enable the 3D Buildings item in the list below Layers, the facades of the buildings that have already been recorded take on a 3D appearance, making them look more realistic.

Of course, displaying buildings in the third dimension involves far more effort than just photographing them from above. The software needs a model of each building to calculate its proportions relative to the current perspective. Some US cities have made fair progress here, although the information is mainly restricted to downtown areas. Additionally, photos of the facades of most buildings are missing, and this means that the outer walls of some 3D building models are plain white: Figure 3 shows a Google Earth image of New York.

Figure 3: 3D modeling of buildings is quite advanced in the US in particular, but photos of the facades of most buildings are missing

Community Contributions

If you are not satisfied with the 3D buildings that Google Earth officially integrates, the product homepage has a Displaying 3D Buildings link that takes you to buildings contributed by Google users. Download the 3D_Warehouse_de.kmz file, and open the file in Google Earth by selecting File | Open.

This displays additional 3D buildings, indicated by house icons, in various regions of the world.

The Google Earth homepage also has a couple of files in Recommendations with the coordinates and optional descriptions of sights and other points of interest. Google is not the only site to provide .kml files: in fact, users can exchange information about points of interest in this way. For example, some resourceful Google Earth users have published their discoveries at [4], offering access to spectacular photos of vehicles, houses, or military installations. To integrate .kml files with Google Earth, you need to download the files and open them by selecting File | Open.

Publication of military installations in particular has brought Google Earth some criticism from various governments. Anti-terrorism forces fear that enemies could exploit the photos to plan attacks. In response to this criticism, Google has reduced the resolution of various images of military bases and government buildings until just a rough pixelized image remains.

For Experts

For a fee of just US$ 20 per year, you can become a Google Earth Plus customer. This means that the Google server will give your requests priority and ensure you better performance. At the same time, Google Earth Plus supports GPS (Global Positioning System) coordinates. The price also includes professional support by email and the ability to print hi-res images.

Another variant, Google Earth Pro, is only open to users of Windows and Mac OS. For a charge of US$ 400 per year, you can automatically generate KML files and export flights to video files.

Conclusions

A fast machine with a good graphics adapter and a fast Internet connection are what it takes to fly smoothly around the globe. If you have all these resources, Google Earth offers fascinating trips from your own desktop.

Building Your Own

You can easily browse through hundreds of splendid Google Earth creations from your Linux desktop, but what if you want to create your own 3D objects in Linux?

I checked out some of the possible alternatives for building and editing 3D models for Google Earth in Linux, and I found that the options are currently quitelimited.

Sketchup with Wine

Google provides an application called Sketchup [5] for creating 3D models. Sketchup is a powerful tool for building and editing 3D objects, however, the tool currently only supports Windows and MacOS. My effort to build a 3D Google Earth model in Linux started with an attempt to run Google's Sketchup with Wine. On Ubuntu with Wine 0.9.33, Sketchup complained about a faulty OpenGL installation, but at least it launched.

Once I got it started, though, SketchUp rendered the main window and the menu and buttons incorrectly. When I tried to import or export data, the program crashed.

Some of the 3D features seem to work: users can draw, rotate, and move objects, but the tool isn't much fun without buttons and menus.

Under SUSE with the older Wine version 0.9.24, I had to launch Winetools and change some settings manually to even get the installer to launch; however, even with the revised settings, the installer still crashed before completing the installation.

Landxplorer

Some organizations, authorities, and institutions use commercial programs by third party manufacturers to create complex 3D worlds. One promising candidate is Landxplorer by 3D Geo.

The city of Berlin used Landxplorer to build the first realistic and comprehensive, city-sized 3D model in Google Earth (Figure 4), a massive creation consisting of 40,000 buildings, five of which you can enter virtually [6]. We asked about Linux support for Landxplorer. According to the vendor, the software is written in .NET, and it might even be possible to run it on Linux using Mono, but there are no plans to do this right now for lack of demand.

Figure 4: The official Berlin city Model in Google Earth.

KML and KMZ

Another option for modifying Google Earth 3D models in Linux is to tweak the XML directly. Google Earth uses XML files in KML or KMZ format to import objects. KML stands for Keyhole Markup Language, an XML 1.0 variant designed specifically for the exchange of data with Google Earth. KML files can contain references to 3D models, which in turn reference image files as textures.

If you have a zipped collection of KML files, the archive has a file extension of .kmz. Google Earth loads the file without unpacking it beforehand and displays the 3D objects it contains at the right position. Whereas .kml files contain data on an object and only reference 3D models, KMZ archives include a .kml file, subdirectories, and a .dae file with a description of a 3D object in Collada format [7].

Listing 1 shows a simple KML file. The example uses a .kmz file from Google's 3D Warehouse [8]. The file, which I downloaded and unpacked, was obviously created using SketchUp, and it contains a link to a file called sample.dae. Once you open the file in XML form, you can modify some of the settings with a text editor. The extensive tutorial on the Google website [9] describes permitted tags and also covers advanced features of KML 2.1.

Listing 1: Simple KML File
01 ?xml version='1.0' encoding='UTF-8'?>
02 <kml xmlns='http://earth.google.com/kml/2.1'>
03 <Placemark>
04  <name>KML-samplefile</name>
05  <description><![CDATA[Created with <a href="http://sketchup.google.com">Google SketchUp</a>]]></description>
06  <DocumentSource>SketchUp</DocumentSource>
07  <Style id='default'>
08  </Style>
09  <Model>
10  <altitudeMode>relativeToGround</altitudeMode>
11  <Location>
12   <longitude>11.62404755064788</longitude>
13   <latitude>48.21799407992902</latitude>
14   <altitude>0.000000000000</altitude>
15  </Location>
16  <Orientation>
17   <heading>0</heading>
18   <tilt>0</tilt>
19   <roll>0</roll>
20  </Orientation>
21  <Scale>
22   <x>14.0</x>
23   <y>14.0</y>
24   <z>14.0</z>
25  </Scale>
26  <Link>
27   <href>models/sample.dae</href>
28  </Link>
29  </Model>
30 </Placemark>
31 </kml>

Native Linux Tools

Google Earth sources promise compatibility with the Collada XML-based graphics standard; however, neither Blender nor the commercial Maya software provided the ability either to download a 3D model from the Google database or to import an object into Google Earth.

Although Blender on Ubuntu Feisty Fawn finally reported Import Successful after a couple of errors caused by incorrectly set file permissions, the main window of the 3D design program remained blank, and Google Earth just returned error messages when I attempted to load a .dae object stored in a .kmz file.

Designers will find import scripts for Blender [10] that are supposed to give the software the ability to open KML and KMZ files directly. I was unable to import the files on Ubuntu and SUSE 10.2 in our lab.

INFO
[1] Google Earth: http://earth.google.com
[2] Wikipedia: http://en.wikipedia.org
[3] Panoramio: http://www.panoramio.com
[4] Google Earth Community: http://bbs.keyhole.com
[5] Sketchup: http://sketchup.google.com/
[6] Berlin's 3D city Model: http://www.3d-stadtmodell-berlin.de/3d/en/C/seite1.jsp?nav1=open
[7] Collada format: http://www.collada.org
[8] Google's 3D Warehouse: http://sketchup.google.com/3dwarehouse/
[9] KML HOWTO: http://code.google.com/apis/kml/documentation/index.html
[10] Importing KML and KMZ into Blender: http://www.blendernation.com/2006/05/11/import-sketchup-and-google-earth-files-into-blender/