Showing posts with label worldwind. Show all posts
Showing posts with label worldwind. Show all posts

Tuesday, October 18, 2011

The iGlobe project - Globe + N-d data + Intelligence

Patrick at NASA is amazing at putting people together, he put CSIRO Marine and Atmospheric Research ( who provide my daily bread currently ) , ORNL , NOAA and NASA itself. This project aims to visualise space-time resolved datasets in the globe context. With proper planetary projections on any object.

We had internally started building blocks of a large modular data visualisation framework called TrikeND, this was a natural choice to attach it to the globe context via worldwind. Even though scientists often prefer to see the data in pure form without being attached to the globe, so we have alternative renderers such as VTK and Jzy3D in the sights in addition to iGlobe. The primary data source is NetCDF, but we also provision GIS formats via Geotools, I put in sometime experimenting with OSGification of Geotools, with lots of help from Mathieu and Jody. This is designed to carry on from our legacy product DIVE.
DIVE Use cases

iGlobe focuses on addressing the following issues:

Vector field rendered in iGlobe

1: Streaming large datasets from where they sit to where they are viewed. We would like to use standard protocols where possible, especially WCS NetCDF profile and OPeNDAP.
2: Providing heuristics to identify the right fields to be visualised as scalars, vectors and tensors.
3: Different display techniques for rendering scalar and vector fields, including volume visualisation with voxel and slice based techniques, display lists, vertex array, VBO , true impostors and other usual suspects.
4: Coherent time-locked animations keeping all the layers in sync in real/model time domain.
5: Transparent analysis techniques running on small problems on the client side and calling on server resources for large problems. Varun has been implementing various data mining techniques including FFT, change detection and anomaly detection.

There is lot more to come including an opportunity run iGlobe as part of an experiment on the ISS.

Thursday, September 15, 2011

ESA SOCIS - Coding in the Space Space

The summer of code pattern seems to have become rather popular, pity it is a mis-nomer for us Southern hemisphere folk, that's what you get for the earth being top heavy in landmass ( whoever decided they are on top anyway).

This year the European Space Agency (ESA) is running an SOC event, the catch line being a slight variant of the Copenhagen Interpretation. The two projects I am associated with are:
  1. Orfeo Toolbox SAR Interferometry support - This one is academically of most interest to me, there have been several attempts to develop the interferometry chain in open source, but they have not been properly software engineered, have dubious licensing or other shortcomings. More on this project and the teething issues encountered later.
  2. iGlobe NetCDF support enhancements - This one is professionally of most interest to me. Patrick at NASA recently put us (CSIRO) together with NOAA, NASA and ORNL to build and application tying NetCDF to WorldWind. We are planning to explore large data visualisation techniques and get best possible performance and accuracy. As well as include some analysis capability. The project is code named iGlobe.


These projects will bring my student supervision quota up-to 5 for this year, I have only had them for 3 months and there has been a huge amount work delivered. I wish I had this kind of free labour and velocity at the real workplace.

Monday, August 8, 2011

Life and Times of a NASA International Visitor

Monday, 1st of August 2011, I officially signed in as a NASA visitor. Patrick gave me a grand tour of the place. Since photography would get us into trouble in most of the places I resorted to sketching things up. First stop was the Vertical Motion Simulator, which was simulating a VTOL aircraft (tilt-rotor) when we got there. We saw Hangar one (big blimp hangar), the uber Wind tunnel with hockey playing equipment strewn in front of it. We then discussed the past, present and future of WorldWind, Globe viewing client, scalable + distributed data serving, porting to Android platforms and much much more. We finally had a small timeslot to catch up with Mars Rover software team, heavy users of the Ardor3D Java based game engine. I have been building OSGi manifests into Ardor3D and I was preaching the use of the manifest enabled jars in their projects - Antares and Verve. I also discussed the differences between Clipmapped terrain (as in Ardor3d) and Chunked LOD (as in WorldWind) with Leslie and how we can merge the 2 techniques for large terrain rendering to make something scalable, accurate and aesthetically pleasing.
Day two I sat in on one of the WorldWind team telecons and got wind of the developments on Android and challenges of a multitouch interface user semantics, as well as scalability required to proxy and deploy Microsoft Virtual Earth datasets.
On Friday I had a joint showing with Bruce from Emxsys and caught up with Vince Ambrosia and team from the WRAP project. We discussed coupled fire models (terrain + fuel + wind + fire) and UAV derived information assimilation for training and operational fire fighting purposes. Another show-n-tell in NASA hangars followed (including ogling at Google Jets parked in there). We saw the mostly moulded carbon fibre hull SIERRA and discussed air-space management during fires to allow use of UAV's.

Over all it was a highly enlightening trip. One I would like to repeat as soon as possible.

Thursday, July 21, 2011

Getting some fish into WorldWind

Last few days I have gone back to biological data, well animal tracks. CSIRO has put together a very nice oceantracks website using the amazing Indie game engine - Unity 3D (amazing in every way except running on Linux). It runs on Android, so with some effort on GL-ES front it can be made to work on Linux.



Talking about multi-platform game engines the other impressive one is Ardor3D,  not that OGRE or Irrilicht are bad. It is just easier to get going without getting platform specific binaries or needing to set up a large tool-chain. It is also easier to maintain the Java based game engine on top of JOGL and LWJGL instead of maintaining JNI bindings to a C++ engine (especially if your bindings are outside the source tree) . The other large draw from Ardor is the JOGL based rendering which lets us share the GLContext between Ardor and WorldWind, as I have done in jaxb-collada (lots of thanks to the original Ardor hack post and improvements from niccastel and brujito). Some pretty famous use-cases have picked Ardor up as their rendering engine including the Mars rover project, I hope to catch up with them in a few weeks. May be the local guys down here in Hobart will adopt it as a mission control system for the SLOCUM Gliders.


There are some altitude setting bugs in the Ardor3D+WorldWind code , and the animations key-frames are not enabled, but the models load nicely and will look great with some more water surface shaders and actual track data.

WorldWind_Tuna

Friday, July 15, 2011

GSOC 2011 - Sub-surface Features in WorldWind

Honestly I did not sign up to mentor this project, but I kind of drifted into throwing some advice by the way of the student. Doing a prototype of sub-surface visualisation is not at all difficult, but it is difficult to get it right, to convey the information without losing the context provided by the draped textures.

California Seismic or Australia Boreholes data goes down into the earth's crust. The crust is not that thick (only a few 10's of km in the 6000 or so km's of earth radius). Thinks get a bit weird in portraying things accurately while using vertical exaggeration. The surface of the earth becomes a bit of an event horizon. Nevertheless good progress has been made with changing the transparency of the surface textures and deploying secondary meshes below the normal terrain mesh. The aim is to get something close to Rockworks. The implementation so far tweaking secondary meshes in WorldWind can be seen here:

Wednesday, March 23, 2011

Merry with Maven - Maintaining GEOS-3586

I have been typing GEOS-3586 a lot of times this past week. The DDS/BIL plugin written for Geoserver 2.0.x had fallen by the wayside as things had changed on the WMS MapProducer(Response) front. This time it is going to be a serious push to get the plugin promoted from community module to extension status. I still need to get my head around GSIP-27 and GSIP-22 to efficiently continue maintaining this module.

Finally I was recommended to just keep trunk updated and work towards getting the module moved out of community into extensions space. The DDS/BIL module has indeed a special place since it is the only community module extending map respones, all other map reponses are part of core. The extensions in response are mostly in the WFS area (OGR, Excel etc.).

WorldWind in typical fashion throws some curve-balls at Geoserver: it uses BGCOLOR=-9999.0 for the elevation models instead of a hexcode. Fixing this will require dangerous interventions on the Geoserver side as outlined here by Andrea:


The kvp parsers are at work way before the output formats
get even into the picture.
The class that parses bgcolor is ColorKvpParser.

I think you can write a DispatcherCallback that hijacks the parsing and error
reporting mechanism, but you have to be very careful to do so to avoid
breaking the proper error reporting mechanism in other cases.

In the init(Response) method of the DispatcherCallback you check the error,
reset it to null if it's the one coming from the bgcolor parse failing,
it is that special value, and the output format is one of the two that worldwind
is using (use the raw kvp map to check the format and bgcolor values).

Then you register that dispatcher callback as a spring bean in
applicationContext.xml
and GeoServer should automatically pick it and use it

Please be very specific in the checks above or you'll leave users making
wrong request in a world of pain (no error reporting and software blowing up
in the most unexpected ways, or just ignoring what they set).
I am also planning to include WorldWind (in an applet form) as a 3D layer preview tool  in Geoserver alongside Openlayers. Chris Holmes floated this idea a while back. Since I will be doing lots of work on WorldWind anyway, I can practice browser integration on the side in Geoserver.

The plugin has some primitive documentation now as well - hacked together with my basic look-and-learn Sphinx-fu.

Talking about putting things together - I finally migrated the content from my old blog into this one. Now just need a way to redirect all the posts to duplicates here and just keep the blog being deleted one.

Tuesday, February 22, 2011

Out with the old (SPI) - Modular Java with OSGi

Renewal starts with death. For me renewal often manifests itself in form of a real or imagined virus detection on my laptop. It prompts me to delete large swaths of stuff and replace it with new things. The latest outbreak was FakeJava. So I promptly deleted my old faithful JDK/JRE and Eclipse and anywhere else in the system where Java installers were lurking. For a Java developer this is pretty drastic. It gave me the chance to update my Eclipse with Helios and try the new improved osgi container implementation lurking in the Eclipse plugins folder. If you are a Java developer of any calibre and not fatally attracted to vim and emacs, you probably have Eclipse installed (or had it at some stage). Anyway long story short - dig inside the Helios install and you shall see something along the lines of org.eclipse.osgi_3.6.1.XXX.jar. This is the source of all Eclipse plugin goodness (no it is not all beacuse of the SWT).

Start up this jar as the osgi container, java -jar org.eclipse.osgi_3.6.1.XXX.jar -console will start up in interactive mode. If you are into IDE tooling (that is the reason you are using Eclipse in the first place anyway) there are a couple of options to make osgi play nicely with you - Eclipse PDE or BndTools. I have written up a few brief steps based on my experience getting a non-SWT, osgi-bundles based WorldWind GUI going. The basic ingredients were already there:

1) Eclipse PDE Tutorial to wrap Jogl (based on Jogamp but works just as well with classic JOGL).
2) Shrink-wrapped Eclipse projects to use with WorldWind, including Jogl and SWTGLCanvas (which I did not quite get to run).
3) BndTools component based development, somehow similar to fragments.
4) Using Eclipse Bundle Repository plugin to pull in the PDE based bundles - exported out of eclipse using Export Application Wizard (+some platform specific forcing hackery). Add this to build.bnd in the bndtools main repo - bndtools.bndplugins.repo.eclipse.EclipseRepo;location=${worldwind-repo};name=WorldWind-repo and the freshly exported PDE bundles will become available to BndTool. This step was the most frustrating and probably would not really need to be done if you stick with pure PDE or pure BndTools, but I had a lot of fun mixing and matching.
5) After everything is set-up you can create a project along the lines of the component tutorial using IGlobe instead of IGreeting and get WorldWind to provide you with a JPanel.
6) BndTools does not add the contents of Jar-in-jar bundles PDE produces into buildpath, make sure you add worldwind.jar and Jogl into the path for a sample build. At runtime OSGi will take care of this.

After this all the bundles will be playing happily in the OSGi Framework, things will look something like this:


START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] OSGi System Bundle (3.6.1.R36x_v20100806)
[   1] [Active     ] [    1] org.trikend.glob3.globeui (0)
[   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[   3] [Active     ] [    1] Apache Felix Declarative Services (1.4.0)
[   4] [Installed  ] [    1] JOGL native bindings for Linux x86 (1.1.2)
[   5] [Active     ] [    1] org.trikend.glob3.globe-impl (0)
[   6] [Active     ] [    1] JOGL (1.1.2)
[   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
[   8] [Active     ] [    1] org.trikend.glob3.api (0)
[   9] [Installed  ] [    1] JOGL native bindings for MacOSX (1.1.2)
[  10] [Active     ] [    1] Worldwind (1.0.0)
[  11] [Resolved   ] [    1] JOGL native bindings for Windows x86 (1.1.2)
[  12] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)


Here is a screenshot for further clarity (or lack thereof).

worldwind_bndtools_less

Thursday, January 27, 2011

Collada Models everywhere - WorldWind and COVE

Last few days I have had a lot of fun hooking one JOGL rendering engine into another. The fantastic Ardor 3D engine is designed with games in mind and WorldWind globe renderer interact nicely with each other. Ardor does not hog the GL context and behave as if it is the only thing with the run of the place. WorldWind can do the globe rendering then Ardor takes over to insert say a vertex shaded waving water layer and some buildings on fire.

105 macquarie st
There are the expected fights over z-buffer and texture caches, but a few context back-up restores in Java can take care of that. I had a bit of fun raiding the Google 3D warehouse for models and throwing them in. In some cases the positioning and scaling was not quite right, but the model framework established from joglutils and jaxb-collada work lets me specify this quite easily.

We also had a fantastic demo from Keith, developer of the COVE (Cooperative Ocean Visualisation Environment). Had nice chats about merits of scene segmentation trees from BSP to Hyper-Octrees(obviously harder to implement). He manages to keep decent performance with a wealth of features. Showing hundreds of arrows without VBO's can kill performance, but at least it keeps working on integrated graphics cards.
Current Vectors in COVE
Note to self: avoid DNS srv record madness for Google Talk, manually add the chat server If you are unable to fix the DNS settings, specify talk.google.com in the "Connect Server" field in the "Advanced" tab.

Monday, December 6, 2010

JAXB + Collada 1.4 Schema = Messy method names

Collada Reference ModelNASA WorldWind Java has recently added extensive KML support. They use neither SAX nor DOM, but a very creative solution with an XML pull parser. The events of interest i.e. implemented KML features only are responded to and corresponding objects created. So the pull based methodology is more flexible - faster than SAX and less memory hungry than DOM. One of the planned things is models, and given the interest in KML shown at the CSIRO Cop meeting I decided to have a shot at extending the worldwind KML support.

Collada Box in WorldWind3D models have been around on the forums in a mega thread for a while now, but never truly integrated into the worldwind core. With KML model support proposed this might finally be on the way. I got my feet wet in Collada parsing by creating annotated Java classes from the Schema using JAXB. I have to admit I made some primitive attempts with DOM + XPATH parsing and quickly gave it up in favour of pure JAXB magic. Parsing a simplistic Blender cube took some effort, I have the vertices, faces and normals done. Just need to set up some materials to get it to render.

Wednesday, December 1, 2010

CMAR Community of Practice - day 2

On the 2nd day the concept of divisions in CSIRO has sunk in and I realize that this is the CSIRO Marine and Atmospheric Research Software Engineering community, I am over the me and them mentality as well and I am using the "We" pronoun more often.
Large KML GE

Large KML WW
The talks today started off with a review of XML and why it is not the solve all. The second talk explored the REST idiom for web services. There were a couple of talks about IMOS and TERN indexing disparate NetCDF and HDF data and allowing exploration + download of it via a portal. The inevitable scalability question came up and was left as the elephant in the room. A very detailed talk about Oracle databases and optimizations was an eye opener for me - somebody used to the relatively "just should work" world and PostgreSQL. The last talk felt like a major reimplementation of Google Docs in a semantic space, to easily digest arbitrary data from spreadsheets - the goal is lofty but the proof is in the pudding.

We tried to muster up some support for a visualization platform around NASA WorldWind for community wide acceptance and there was interest from a couple of people. After dinner the talk around visualisation reduced to (or built up to depending on how you look at it) rendering uncertainity both in observations and model output data. Making graphs with regression for my thesis, this has been a common request from my supervisor, I respond to it with error bars and regression confidence interval curves. How does this propagate to a resonable metaphor in worldwind without making every icon hairy with error-bars ? The kml support in WorldWind seems to have also encouraged people to test what can be best described as Google Earth compatibility, leading to these hairy images.

Friday, May 14, 2010

AMD vs NVIDIA and some NESTing for SAR

While nVIDIA provides backward compatible OpenCL drivers. AMD in opposition to nVIDIA who supports DirectCompute even in GeForce 8 series (8400 GT and up) for a long time ago, forgets about older than HD5000 series. I managed to get OpenCL eigenvalues kernel tested on my other machine but fell flat on my laptop with a 3670 ATI.

Some work by Orfeo Toolbox guys has recorded large performance gains in non-trivial (i.e not pixel by pixel) operations using GPU options. The eigenvalue problem is typical in SAR analysis and I would like to implement it on the GPU.

Talking about SAR, first there was BEST (Basic ESA SAR Toolbox), now ESA is funding development of NEST (Next ESA SAR Toolbox). The product so far looks impressive , Java based pulling in all the goodies including NASA WorldWind. There are plans afoot to include the DORIS InSAR processor as well.

DORIS as such is very script based and difficult to use properly. Hopefully providing and easy interface will open-up more INSAR processing options.

Thursday, March 18, 2010

Passing the buck - load sharing with rich client side applications

There is all this talk about cloud computing and distributed, load balanced high availability global clusters ... so on. All these deliver applications to the browser or some similar thin client interpreting and presenting the data be it via Flash or JavaScript or Java or SilverLight. The presentation technology can be used to share some of the computational load and background/stream network tasks to give the users the fuzzy highly responsive and interactive feel. The client side has the big advantage of having direct access to one of the nicest parallel processors - the GPU.

A do a lot of experimenting with Geographic data and WorldWind. I met Ben at the FOSS4G in Sydney and he demonstrated the GeoSciML based core library demo. I wanted to move some of the tasks such as graphing and core image analysis from the server side to the client side to allow heavier user loads on the server and minimize retransmissions, allowing users to do further client side operations on cached data without explicitly having to download core images. Of course to do all this the user system needs to have generous GPU and CPU grunt, but that is cheap these days. The user side transfer helps scale the system on peak loads, JNLP based deployment help keep all user instances of analysis code in sync much like a browser based application currently in use.

The first attempt was to get some of the GML(with geosci extensions) parsed and added as icons into worldwind. I got that done tonight, further digging of the data delivery system is needed to get some of the core images out and build a virtual analysis toolkit with JAI on the client side. So here is an unexciting screenshot of some core locations, hope to have more detailed info soon.

Wednesday, February 24, 2010

Bringing NearMap to WorldWind

I promised myself I will do this soon and it has been a month or so since I thought about it. NearMap provides a nice Google like URL resource to pull tiles from and WorldWind provides 3d perspective (since admittedly the NearMap elevation is strange at times). The projection is not quite right in the on-the-fly transform from Google Projection to LatLon, I am using the Mercator projection built-in worldwind. Anyway enough talk screenshot time. Here are couple of Microsoft Bing Maps vs NearMap. I hope I will do the maths for the 900913 projection right soon and fix up the little inconsistencies.

Wednesday, September 9, 2009

ESA uses NASA Software - to look at oil spills in Australia

Europe and America have always had a close technological co-operation, especially in the space sector. While Europe has major progress in the Radar domain, America has stayed behind, but another area where Americans, namely NASA made a huge leap is in making an open-source globe visualisation tool, WorldWind. Now the European Space Agency (ESA) is using this as their archive display and ordering system backdrop in EOLi , as opposed to the rather dated and hard to use 2D map they used to have.
One of the advantage of using WorldWind is that the preview images can be quickly loaded up into the globe overview to provide the user context and also allow exploration of the data history even before ordering. In the case of planning a future acquisition, the 3d display combined with a gazetteer makes finding the area of interest simple and fun.

Out of curiosity I checked on the on-going rather large oil spill near Ashmore Reef. Sure enough ENVISAT-ASAR had collected an image and I have a quick idea of how much the spill area is without getting the full image. Detailed images from TerraSAR-X and Cosmo-Skymed can be found here.