Thursday, April 09, 2009

New domain !!!

Hi all,

I have changed to the new domain: I hope to have some time to move some post to the new site.

Saturday, January 24, 2009

SwingAnnotations on WWJ

Thanks to Arnaud Saval, who helps me with the problems commented in my previous post, here is the new version of AnnotationWindow which I called more rightly SwingAnnotation.

There are two important requirements you need to know before start using SwingAnnotation:
  1. You need JDK6u12 (which currently is in early access). JDK6u12 solves the problem between heavyweight and lighweight component, this way we can put JPanel on top of a Canvas component without problems.

  2. The container on which the WWJ Canvas resides must use a null layout:

    wwd = new WorldWindowGLCanvas();
    wwd.setSize(new java.awt.Dimension(600, 500));


SwingAnnotations are implemented using a JPanel on which you put the desired content panel. Given a geoposition it takes care to compute the corresponding screen position and set the panel location to the appropriate site.
The JPanel of the SwingAnnotations share the same container as the WWJ canvas. This is the reason you need to set the layout to null, to allow place the panels at any location.

You can get the source code here.

Sunday, November 30, 2008

Annotation on a JWindow

Hi all, too much time without put a post in this blog but time is something I haven't lately.

After a couple of days sick with the flu :( today I have a while and spent it looking to a peace of code I had for WWJ.
The idea is making use of JWindow to create annotate windows and have all the power of Swing to create annotations (buttons, text fields, etc).

Unfortunatelly, there are some issues that needs to be solved.
  • Behaviour is different on Linux than Windows. In Linux (using GNOME) the annotation windows remains visible when the main frame becomes hidden. On the other hand, for Windows (Vista) it works fine.
  • Focus. When you put an annotatin window with a text field it doesn't get the focus to write text.

Well, if any of you have time to solve these and, probably, other errors I appreciate a lot you send me (or publish) the code too.

You can get the annotation windows related code here.

Sunday, August 31, 2008

Selecting Prism objects

It gives courage discover there are people that can get benefit from your bits of work.

Thanks to Turbo, who is using my Prism objects, in his project about the need of allow selection on Prism. Now you can add a set of Prism to a RenderableLayer and use the selection mechanism to now which prism is selected.

The issue is when you are in "selection mode" you can interact with the globe. To avoid this "problem" you need to set the 'setPickEnable' to false in the RenderableLayer where you put the Prisms.

The new code and example can be found here.

Saturday, July 19, 2008

Prism objects on Balloon

Today I have dedicated a couple of hours to integrate my funny Prism objects into Balloon.
Given a shapefile, all Polygon objects are read and rendered as Prisms.
Here is the result:

Friday, July 18, 2008

Using Polyline for shapefiles

I just tested the use of Polyline to render polygons and lines (from a shapefile) into WWJ, to achieve to power of "follow terrain" property.
Unfortunately it is very slow, at least in my ancient laptop.

Another solution I test is the use of SurfacePolygon to render the shapefile polygon elements. It have a good performance but you lost precision transforming vectorial data into a bitmap.

Depending on your needs you can chose between the two options.

Wednesday, July 16, 2008

Basic shapefile support on Balloon

Some time ago I have created a set of classes, using OpenGL primitives, to render efficiently shapefiles in WWJ.
Now, I have spend some time integrating it into Balloon. Here is the result:

The classes has veru good performance but has some important limitation:
  • First, it must be used with vertical exaggeration set to zero, that is, no relieve (and it is not much usefull a virtual globe without relive).
  • Second, there are no filled polygons, polygons are rendered has line loops.
I have made some test using Polyline for lines and SurfacePolygon for polygons but I need more time to test its performance with great amounts of data and integrate it into Balloon.

Thursday, June 05, 2008

Prism (themathic) maps on WWJ

This is the first implementation of prism objects for WWJ.
Also, I have build a data file with world limits (extracted from a shapefile) and prepared an example application.
The example is far away to become a thematic application like UUorld but a second prism object version could have more improvement and utilities, like show text on top of prism.

Every prism goes from globe surface (from zero elevation) to the specified top elevation.
You can render it in a wire or filled mode, change the fill and wire color and transparency and modify the top elevation.

You can get the source code here.

Next video shows the example in action. Sorry for the poor quality but executing WWJ while capturing screen is too much for my ancient laptop :(

Saturday, May 31, 2008

Prism objects for WWJ

Looking at the thematic mapping blog some time ago I saw a beautifulies KML examples of animated prism maps.
Prisms are goods to represent amounts with different shapes like countries or cylinders.

A couple of days ago I have started to work on a new renderable object Prism for WWJ, to allow WWJ community have this useful things. It is still in development but looks very well :)

Given a set of lat/lon positions you can create a prism object specifying the top elevation, color, etc.

It looks great, for to be honest has the same problem as the big brother GE has, the hole problem.

The vertex of polygon are extruded from globe surface to the specified height, but only the vertex not the polygon itself. Then, for big shapes, like China or Australia and using little heights, a hole can appear.

Thursday, May 29, 2008

Google Earth Browser plugin

I was thinking about blogging not only about The Balloon Project but also about GIS things. And here is my first post.

The next links talks about the new release of the Google Earth browser plugin:

and here is a bit summary of it:
  • advantage
    • it is another product of the google universe
  • disadvantage
    • only for windows (at the moment and like the initial release of GE)
    • memory and processor eater

and finally, I would like to note this is a great new for google product fans, but Google doesn't invent nothing, WWJ and MS VE arrives first, they can be the bastards brothers but arrives first ;)