WorldWind Kotlin - single cross-platform planetary 3D globe software library for JS, Android and JVM

High-Level Project Summary

We would like to present the concept of a single cross-platform WorldWind planetary globe software library based on Kotlin multi-platform technology, which is designed to replace three legacy platform-dependent WorldWind repositories to avoid complex support of similar code-bases.Our solution allows to launch the same code of the library on Web, Android and JVM applications. It uses latest modern cross-platform technologies, like: Kotlin Coroutines, Kotlin Serialization, Kotlin DateTime, Ktor HTTP Client, MOKO resources and others.The challenge claims “to improve an existing NASA or open-source Earth data visualization application” - we have created new improved version of WorldWind.

Detailed Project Description

We are the WorldWind Community Edition development enthusiasts team.


Since NASA suspended the WorldWind planetary globe software library project on March 8, 2019 we have gathered fired team members and other enthusiasts to continue support and development of all WorldWind repositories (WorldWindJs, WorldWindAndroid and WorldWindJava) and also the WMS elevation server


As a result we have created a community project https://worldwind.earth and WorldWind GitHub forks at https://github.com/WorldWindEarth, plus community elevation server https://wms.worldwind.earth/elev. Also we have created pull-requests for all our main improvements to NASA upstream during this 4 years:

https://github.com/NASAWorldWind/WebWorldWind/pulls/ComBatVision 

https://github.com/NASAWorldWind/WorldWindAndroid/pulls/ComBatVision

https://github.com/NASAWorldWind/WorldWindJava/pulls/ComBatVision 

At this event, we would like to present the concept of a new single cross-platform WorldWind planetary globe software library version based on Kotlin multi-platform technology, which is designed to replace three legacy platform-dependent repositories to avoid complex support of similar code-bases - the WorldWind Kotlin.


This solution allows to launch the same code of the library on Web, Android and JVM applications and uses latest modern cross-platform technologies, like:

  • Kotlin Coroutines - to execute async resources request the same way on all platforms;
  • Kotlin Serialization - to process cross-platform XML and JSON requests and response serialization to WMS, WMTS, WCS and other geospatial data servers;
  • Kotlin DateTime - to work with Instant and Duration time entities;
  • Ktor HTTP Client - to make cross-platform requests of external resources as map image tiles, elevation data tiles, placemark images etc.
  • MOKO Resources - to use common texture images and asset flies, like star field location data, on all supported platforms (JS, Android and JVM).


We have also created a special OpenGL wrapper named KotlinGL (KGL) to provide an abstraction over WebGL, OpenGL ES, JOGL and LWJGL layers inside the library.


In the scope of this hackathon we prepared a set of cross-platform examples of main WorldWind features on JS and Android platforms.


Here are an examples of the same WorldWind Kotlin code run as WebGL and native OpenGL ES application on Android:

Plus we added a new feature named MilStd2525TactialGraphics, which allows us to visualize not only point placemarks, as it was in original NASA WorldWind, but also a full range of linear symbols supported by MilStd2525 standard.

Also we have ported (made cross-platform) StarField Layer from original NASA WebWorldWind library and all kinds of Graticules from WorldWindJava library, for example MGRS Graticule.

And finally we made free camera control support (freed from the need to look at a point on the surface), which allows to use WorldWind Kotlin as an Augmented Reality engine, combining video source angles from real word with transparent WorldWind overlay camera layer:

Our goal is to keep such a wonderful project as WorldWind alive despite the fact that NASA stopped actively developing it and does not accept external pool requests.


Join our WorldWind Community Edition contributors team.


Let's make Earth cross-platform!

Space Agency Data

To develop a new WorldWind Kotlin library we used our experience in contribution to original NASA WorldWind repositories:


To setup community elevation server we used elevation data from:

Hackathon Journey

During this event we learned how to build cross-platform tutorials application for JS and Android platforms, how to display tactical graphics using WorldWind Kotlin and how to port StarField layer from JS to Kotlin.

Also we learned how to publish artefacts to Maven Central, Google Play market and GitHub pages.


Our team was inspired to choose this challenge because NASA proposes “to improve an existing NASA or open-source Earth data visualization application” and argue “If you're really confident in your work, you can submit a Pull Request with your updates for your work to be integrated into the original project. This is the spirit of Open Source!”.


We understood that this completely fulfill our goal and we can present some improvements at this event.

References

JetBrains IntelliJ IDEA - is an IDE to develop Kotlin multi-platform applications.

Kotlin Multi-platform - is a core stack of our library.

Kotlin Coroutines - used to execute async resources request the same way on all platforms.

Kotlin Serialization - used to process cross-platform XML and JSON requests and response serialization to WMS, WMTS, WCS and other geospatial data servers.

Kotlin DateTime - used to work with Instant and Duration time entities.

Ktor HTTP Client - used to make cross-platform requests of external resources as map image tiles, elevation data tiles, placemark images etc.

MOKO Resources - used to use common texture images and asset flies, like star field location data, on all supported platforms (JS, Android and JVM).

Tags

#worldwind #3d #globe #maps #sdk #earth #terrain #elevations #imagery #geospatial