Tuesday, October 30, 2007

WWJ on iPod Touch: when will it be ?

OK, i admit, i bought one this afternoon, and i cannot resist to show off a mock up of WorldWind Java on the iPod Touch beautiful screen:

It seems inevitable that Java will run one day on this device, considering the constant efforts from Sun to provide virtual machines and API for the increasingly powerful mobile gadgets we have these days. Now to get Open GL and JOGL decently running will be another challenge...

Thursday, October 25, 2007

A couple tricks to speed up WWJ

There are many applications where you only need the globe without elevation details - think satellite tracking or global imagery viewing, and others where you are ready to give up a bit of relief geometry details for a faster interaction.

If that is the case, there are two ways you can help yourself.

Using a full sphere SurfaceImage

One feature that has been incorporated a few month ago allows you to use a single image and paint it over the globe inside a sector or over the full sphere. This allows you to trade the BMNG tiled image layer for a single image BMNG layer - that is also included in the worldwind.jar, which results in a faster startup time and 'lighter' globe to interact with.

// From examples.applet.WWJApplet
// Add a BMNG base layer to the model layer
// list, before the Blue Marble
new BMNGOneImage(), "Blue Marble");

Of course, if you zoom onto that layer, you will not get better details as with the tiled version... unless you also have it on top. The wwj applet example uses that one-image layer.

Hacking the tesselator

If you have a look at the actual default configuration EllipsoidRectangularTessellator in globe, you will notice right at the start a static constant named DEFAULT_DENSITY with the value 24. This class is responsible for building the terrain geometry using regular lat/lon aligned (rectangular) tiles each segmented like a check board in rows and columns. With the default density, there are 24 rows and columns per tiles.
// From EllipsoidRectangularTessellator
private static final int DEFAULT_DENSITY = 3; // 24;

The density determines how fine - and accurate, the terrain relief will look. However, you would be surprised to see that with a density value as low as 3 the terrain still displays very decent mountains and relief... and WWJ gets much more responsive.

Update march 22, 2008: After further scrutiny, it appears i was wrong about what i though the density value would control. When decreasing this value, it does indeed reduce the number of rows and columns per tile, but then the tiles are smaller - and there are more of them, which results in many more 'skirts' or tile sides to render, and doesn't change the geometry level of detail...

What does matter is another value named DEFAULT_LOG10_RESOLUTION_TARGET and located in the upper portion (but not the beginning) of the globe.RectangularTesselator.

// From globes.RectangularTesselator.java
private static final double

This one will indeed control the mesh 'density' - see screenshot below.

Log10 resolution: 1.0 (left), default 1.3 (center) and 2.0 (right)

There is no public interface yet to access and change the tessellator density (or log10 resolution) setting(s) - i'll push for one to be implemented at some point. So all you can do for now is either edit the SDK source or clone the tessellator in your own package, change the setting and refer to it in the WWJ config file worldwind.properties.

Sunday, October 21, 2007

Flat worlds and annotations coming to WWJ

Here is a preview of coming features for WWJ 0.3.x...

Dragging shapes example on 'plate carrée' world

Flat worlds are still in the experimental stage but should ultimately allow to have both a 'cartographic' flat global view of the globe and 3D terrain. Various projections of the world should also become available. Quite fun and interesting.

Annotation tests

Comic books bubble annotations are on their way too. They will come with a simple general purpose multi-line text renderer and wrapper some have been asking for ;)

Thursday, October 18, 2007

World Wind Eclipse RCP Geobrowser

WorldWind Java SDK applications are getting more and more interesting. Using the Eclipse platform, Vladimir Silva created worldwindrcp a 'geoweb browser' with full support for WMS 1.1.x and 1.3.x, KML ground overlays, screen overlays, and placemarks. It also supports animated ground overlays to visualize events over time. Nice work!

This is starting to look like the WorldWind .Net version...

The source code includes two eclipse projects: the World Wind RCP itself: org.eclipse.plugin.WorldWind/ and a set of WW contribution layers (Animated time loops, KML/WMS support etc): WWContrib-025/

See this WWJ forum thread about worldwindrcp.

Wednesday, October 10, 2007

World Wind Java 0.3 is out

It has been five month since WWJ 0.2 was released at the Java One conference last may. A lot of work has been done since by Tom Gaskins's team. Several code updates have been posted on the forum, so you may already have a good idea of what to expect.... so here comes the new and enhanced World Wind Java SDK 0.3 (.zip 13M) and Java Web Start Demo.

Example application template - globe

San Francisco - USGS Urban Ortho layer

Here is an unsorted list of changes i can think of:

Since 0.2.5

  • Polylines have had a major update. They can now gently follow the underlying terrain, avoiding intersections, and should become a viable alternative to SurfacePolylines. Some optimization is still needed though.
  • Stereo anaglyph capability has been added with a new AnaglyphSceneController and a corresponding example application.
  • The SkyGradientLayer has been incorporated and nicely teams up with the FogLayer to provide some atmospheric effects to the globe.
  • An interactive terrain profile tool has been added with a corresponding example.

Before 0.2.5

  • There was a Point class in 0.2.0 which has been replaced with Vec4. Most Point methods are available in Vec4, but with a '3' at the end of the name - eg: getLength3().
  • Some major reorganization has taken place in the packages structure with the addition of many - more categorized, sub-folders.
  • An example package has been added. It contains an application template with some basic components and a growing list of simple applications, each showing a particular feature of the SDK.
  • Applet templates, one using javascript interactions, have been added with appropriate deployment notes in the examples.
  • SurfaceShapes quality and diversity have been improved - see Shapes example.
  • Mouse dragging support of objects has been added - see DraggingShapes example.
  • There has been major enhancements to the OrbitView with, among other things, the addition of ViewStateIterators, Animators and Interpolators. Click on the world map to see it in action or have a look at the WWJApplet javascript API.
  • Memory management and garbage collection have been greatly improved, reducing significantly the memory footprint.
  • Tools to access WMS servers have been added - see WMSLayerManager example.
  • Single image layers have been incorporated - useful for applets faster load-and-start. See StartupImage example and BMNGOneImage layer.
  • Stars, world map, scale bar, fog and sky color layers have been incorporated.
  • Support for runtime statistics has been added - see RuntimeStatistics example.
  • A Worldwind.shutdown method has been added
  • Support of tabbed panes and other potentially tricky UI configurations has been improved - see UsageInTabbedPane example.
  • Ground and air tracks support and rendering has been added - see PipeTracks example.
  • New USGS and Earth Observatory layers have been added.
  • Spherical and ellipsoidal triangle methods have been added to LatLon and Position classes.

There are surely many other improvements and bug fixes i'm forgetting here...

Check this World Wind Java forum thread for the release readme.txt and follow up comments. Also: WorldWind Java home page at NASA Learning Technologies and World Wind Central.

More screenshots:

Tracks and pipes example

Polylines following terrain - Shapes example

Tracks example

WMS Layer Manager example

Terrain profiler example

Anaglyph stereo example

Atmosphere entry over New Zeland

Thursday, October 4, 2007

French geology layer for WWJ

Here is a WMS layer to get access to the french BRGM geology maps in WWJ.

Download BRGMGeologyLayer.java and add it to the worldwind.layers.earth package, after removing the .txt extension. In BasicDemo add the layer on top of I3 Landsat, like the USGS layers. It will start to show tiles under 100km altitude.

This layer was already accessible through the WWXMLLayer code i posted last may, but some major refactoring have occured inside the SDK since then and i havent migrated the code yet.

Tuesday, October 2, 2007

Real time terrain cross section in WWJ

What does Antarctica looks like if you slice it in two?

Here is a fun visualization tool prototype layer for WWJ. It displays a real time terrain profile in a screen corner. The section plane itself will either follow the view position or the mouse cursor, allowing you to 'scan' entire continents, oceans and mountain ranges at any scale in a single hand gesture.

Download TerrainProfileLayer.java (updated oct. 30) and add it to worldwind.layers.earth, after removing the .txt extension. In BasicDemo, add the layer before or after the compass. Important: this layer implements a PositionListener and needs to have its event source set before it will operate:

new BasicDemo.LayerAction(new TerrainProfileLayer(), true),
new BasicDemo.LayerAction(new CompassLayer(), true)
for (BasicDemo.LayerAction action : layers) {
if (action.layer instanceof TerrainProfileLayer)

You can set the profile graph to maintain the distance/elevation proportion to have exact slopes (not the case in the above screenshot though), but it is a lot less fun for wide range sections.