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:
  • http://earthissquare.com/2008/05/28/google-earth-in-a-web-page/
  • http://bullsworld2007.wordpress.com/2008/05/28/another-google-idea-borrowed-from-world-wind/
  • http://maps.co.mecklenburg.nc.us/ft/?p=238

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 ;)

Friday, March 28, 2008

WWJ and using JWindow to improve annotations

Here is a screenshot about something I'm trying. I have created a new Renderable object that shows a JPanel into a JWindow at a specified Position (and also a little triangle using OpenGL). The object is responsible to move the JWindow when the globe is rotated and hide it when the position is outside the frustum.



It is not finished but is a easy way to create annotation with all the power of Java :) Also it has a great effect because JWindow annotation can exists and move out the Canvas.

Monday, March 17, 2008

Load/Save configurations

Yes, too much time without news about the Balloon project but, well I continue working on it ;) and currently I'm finishing the load/save configuration mechanism.
Imagine you have an amazing set of layers pointing some images, icons, WMS servers and a couple of views. Now you want to save this "configuration" state.
That's not all. Maybe you have installed a couple of future :) Balloon plugins and they need to be capable to store their information in the save file too.

Here is a little example of configuration file:
















ROSAS


otro sitio







Note: The bad syntax is because the syntax highlighter and blogger api. There seems to be a problem with element open closed in the same line like: <img ... />.

It is far to be like a KML file, also it isn't my intention. The configuration file must store only the current layers (with the attributes needed to restore it later) and the views currently open in the application.