QinetiQ

QinetiQ‘s QGlobe is the first known port of World Wind to the Android platform. The team at QinetiQ has generously donated their source code for free and open distribution.

Below you will find links to the QGlobe source code, the QGlobe application, instructions for using the QGlobe source, and notes from the QinetiQ developer.

  • QGlobe source code contains the original source code donated by QinetiQ
  • QGlobe application for Android devices

Running QGlobe With IntelliJ IDEA

1. Setup
Set up an Android Development Environment.

2. Download
Download the QGlobe source code.

3. Extract
Extract the QGlobe source code to a folder anywhere on your hard drive. These instructions refer to the extracted folder as QGlobe-src.

4. Run
Connect your Android device to your development machine. In IDEA, select “Open Project”, then choose the folder QGlobe-src. Select the “World Wind Android” run configuration, then click the run button (green arrow).

Notes From the QinetiQ Developer

“A good place to start is the com.qq.worldwind.android package. This is the setup code for the project. WorldWindAndroid is the main activity, WorldWindGLSurfaceView sets up the opengl context, and WWAutoRenderer is the android equivalent of WorldWindowGLCanvas.

I copied a lot of code from the java.awt and javax.xml.stream classes since they are not included in the android jdk. I had to rename them to com.qq.java packages since android won’t let you define java packages. A couple of awt classes are wrappers to android equivalents such as BufferedImage, Font, and Graphics 2D and a lot of classes are copied over just to compile the source. JOGL is also heavily awt based, so I overwrote most of it. I deprecated all the methods in GL that are not a part of opengl es and they will throw an exception if they are called.
When it comes to the gov.nasa.worldwind code, I tried to add a //BBB comment wherever I changed the logic. Most of the changes are converting opengl code to opengl es equivalent.

The layers I have working are:
SkyGradientLayer
StarsLayer
BMNGOneImage
BMNGWMSLayer
VirtualEarthLayer
LandsatLayer
WorldMapLayer
ScalebarLayer
CompassLayer

The placenames layer is close to working, but it has a major memory leak I wasn’t able to track down. It could be from a bad conversion of TextRenderer, but it seems to work just fine for the ScalebarLayer.

I would recommend developing on an actual device. I’m using a xoom. I haven’t used the emulator in a while, but when I did it wasn’t able to handle the size of the opengl perspective worldwind uses by default. I had to switch to the EarthInKilometers globe to get a smaller scene in order for anything to show up.”