Use this open source SDK to develop a GIS application
Introduction: The Open source World Wind Java (WWJ) SDK developed by NASA provides new possibilities for the Geographic Information System (Geographic information Systems,gis) community. World Wind is a 3D interactive earth viewing tool written in Java™ language and OpenGL that allows users to view anywhere on Earth from outer space. This article describes how GIS developers who want to enhance an eclipse-based application embed the WWJ SDK as a plug-in in eclipse.
The WWJ SDK is a 3D graphics globe built on top of Java OpenGL (JOGL) extensions. The core of the WWJ class hierarchy is the GLCanvas subclass Worldwindowglcanvas. GLCanvas is an Abstract Window Toolkit (AWT) component.
WWJ's dependency on AWT is an obstacle for GIS developers who want to use WWJ in Eclipse applications. As you may know, Eclipse uses the Standard Widget Toolkit (swt), and SWT is incompatible with AWT. Also, AWT and JOGL are tightly integrated, making it difficult to migrate from AWT to SWT. This article will provide a solution that allows you to use the WWJ SDK in your Eclipse application.
Enter SWT/AWT Bridge
SWT quickly becomes a top-level window toolkit because it can quickly build scalable and powerful client applications. SWT and Awt/swing are both competing for the authority of Java user interface development. Because of their pros and cons, the Eclipse Foundation is aware of the need to build a SWT/AWT bridge that allows the embedding of awt/swing components in SWT. Starting with Eclipse version 3.0, this bridge has become a part of SWT. This API is located in the ORG.ECLIPSE.SWT.AWT package (see Resources).
The Swt/awt bridge is the key component required by SWT to embed the World Wind 3D Globe based on AWT into the Eclipse application.
Eclipse view of the WWJ 3D Earth
With SWT's existing SWT/AWT bridge, you can easily embed the WWJ 3D Earth into your view. Listing 1 shows the basic Eclipse view that performs this task: