Embed NASA World Wind Java SDK in eclipse

Source: Internet
Author: User

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:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.