tag:blogger.com,1999:blog-71643975415739368682024-03-13T01:29:23.005+01:00The Balloon ProjectThe Balloon project blog is a place to talk about my personal virtual globe project so called "Balloon Project".
Initially it was born using my own developed 3D API allowing to load, render and animate GIS information, georeference images, import lat/lon shapefiles and load layers from any WMS server.
The future project will be based (I hope it) in WWJ. WWJ is still in an early alpha stage, because it, I try to contribute with some features I learn or implement working in my own 3D API.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.comBlogger61125tag:blogger.com,1999:blog-7164397541573936868.post-8846116473446601202009-04-09T20:09:00.001+02:002009-04-09T20:09:31.579+02:00New domain !!!Hi all,<br /><br />I have changed to the new domain: <a href="http://acuriousanimal.orggeo.net">http://acuriousanimal.orggeo.net</a>. I hope to have some time to move some post to the new site.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0tag:blogger.com,1999:blog-7164397541573936868.post-91701639397497381862009-01-24T14:52:00.015+01:002009-01-25T18:18:41.761+01:00SwingAnnotations on WWJThanks to Arnaud Saval, who helps me with the problems commented in my <a href="http://theballoonproject.blogspot.com/2008/11/annotation-on-jwindow.html">previous post</a>, here is the new version of AnnotationWindow which I called more rightly SwingAnnotation.<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/GJSCwGfNBHg&hl=es&fs=1"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/GJSCwGfNBHg&hl=es&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br /><br />There are two important requirements you need to know before start using SwingAnnotation:<br /><ol><li><span style="font-weight: bold; font-style: italic;">You need JDK6u12</span><span style="font-style: italic;"> (which currently is in early access). </span>JDK6u12 solves the problem between heavyweight and lighweight component, this way we can put JPanel on top of a Canvas component without problems.</li><br /><li>The container on which the WWJ Canvas resides must use a null layout:<p></p><pre name="code" class="java">...<br /> wwd = new WorldWindowGLCanvas();<br /> wwd.setSize(new java.awt.Dimension(600, 500));<br /><br /> this.getContentPane().setLayout(null);<br /> this.getContentPane().add(wwd);<br />...</pre><p></p></li><br /></ol>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.<br />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.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ERl4N3KtoEY/SXr_84gJd-I/AAAAAAAAAi0/irgkglCjNAs/s1600-h/anotwin2.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 253px;" src="http://1.bp.blogspot.com/_ERl4N3KtoEY/SXr_84gJd-I/AAAAAAAAAi0/irgkglCjNAs/s320/anotwin2.png" alt="" id="BLOGGER_PHOTO_ID_5294825733351897058" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ERl4N3KtoEY/SXr_85M2FqI/AAAAAAAAAi8/E4d1YBv96mg/s1600-h/anotwin3.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 253px;" src="http://2.bp.blogspot.com/_ERl4N3KtoEY/SXr_85M2FqI/AAAAAAAAAi8/E4d1YBv96mg/s320/anotwin3.png" alt="" id="BLOGGER_PHOTO_ID_5294825733539370658" border="0" /></a><br /><br />You can get the source code <a href="http://asantiagop.googlepages.com/WWJ_Swing_Annotation_01.zip">here</a>.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com11tag:blogger.com,1999:blog-7164397541573936868.post-82031026993464594452008-11-30T13:37:00.003+01:002008-11-30T13:50:34.784+01:00Annotation on a JWindowHi all, too much time without put a post in this blog but time is something I haven't lately.<br /><br />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.<br />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).<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ERl4N3KtoEY/STKMBTLwS9I/AAAAAAAAAg4/2n57s1fThkc/s1600-h/annotwindows.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 224px;" src="http://2.bp.blogspot.com/_ERl4N3KtoEY/STKMBTLwS9I/AAAAAAAAAg4/2n57s1fThkc/s320/annotwindows.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5274432067561606098" /></a><br /><br />Unfortunatelly, there are some issues that needs to be solved.<br /><ul><li>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.</li><li>Focus. When you put an annotatin window with a text field it doesn't get the focus to write text.<br /></li></ul><br />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.<br /><br />You can get the annotation windows related code <a href="http://asantiagop.googlepages.com/WWJ_Annotation_Window_01.zip">here</a>.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com5tag:blogger.com,1999:blog-7164397541573936868.post-22044727622674865142008-08-31T17:53:00.003+02:002008-08-31T18:01:29.184+02:00Selecting Prism objectsIt gives courage discover there are people that can get benefit from your bits of work.<br /><br />Thanks to Turbo, who is using my <a href="http://theballoonproject.blogspot.com/2008/06/prism-themathic-maps-on-wwj.html">Prism objects</a>, 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.<br /><br />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.<br /><br />The new code and example can be found <a href="http://asantiagop.googlepages.com/WWJ_Prism_Objects_02.zip">here</a>.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com10tag:blogger.com,1999:blog-7164397541573936868.post-23903431616718222772008-07-19T18:32:00.003+02:002008-07-19T18:35:33.417+02:00Prism objects on BalloonToday I have dedicated a couple of hours to integrate my funny Prism objects into Balloon.<br />Given a shapefile, all Polygon objects are read and rendered as Prisms.<br />Here is the result:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ERl4N3KtoEY/SIIXiEpkqVI/AAAAAAAAAaw/r0VNgnI_qs0/s1600-h/balloon_prism.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_ERl4N3KtoEY/SIIXiEpkqVI/AAAAAAAAAaw/r0VNgnI_qs0/s400/balloon_prism.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5224764391834298706" /></a>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com9tag:blogger.com,1999:blog-7164397541573936868.post-90277928840833984552008-07-18T20:14:00.002+02:002008-07-18T20:17:45.739+02:00Using Polyline for shapefilesI just tested the use of Polyline to render polygons and lines (from a shapefile) into WWJ, to achieve to power of "follow terrain" property.<br />Unfortunately it is very slow, at least in my ancient laptop.<br /><br />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.<br /><br />Depending on your needs you can chose between the two options.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0tag:blogger.com,1999:blog-7164397541573936868.post-26384119207267797632008-07-16T21:46:00.003+02:002008-07-16T21:53:49.288+02:00Basic shapefile support on BalloonSome time ago I have created a set of classes, using OpenGL primitives, to render efficiently shapefiles in WWJ.<br />Now, I have spend some time integrating it into Balloon. Here is the result:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ERl4N3KtoEY/SH5Quqc_eBI/AAAAAAAAAao/iMk9EAcRApY/s1600-h/balloon_shapefile.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_ERl4N3KtoEY/SH5Quqc_eBI/AAAAAAAAAao/iMk9EAcRApY/s400/balloon_shapefile.jpg" alt="" id="BLOGGER_PHOTO_ID_5223701380396447762" border="0" /></a><br /><br />The classes has veru good performance but has some important limitation:<br /><ul><li> 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).<br /></li><li>Second, there are no filled polygons, polygons are rendered has line loops.</li></ul>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.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0tag:blogger.com,1999:blog-7164397541573936868.post-24483629462299049692008-06-05T20:21:00.000+02:002008-06-05T20:21:01.192+02:00Prism (themathic) maps on WWJThis is the first implementation of prism objects for WWJ.<br />Also, I have build a data file with world limits (extracted from a shapefile) and prepared an example application.<br />The example is far away to become a thematic application like <a href="http://www.uuorld.com">UUorld</a> but a second prism object version could have more improvement and utilities, like show text on top of prism.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ERl4N3KtoEY/SEbTdbI-ZyI/AAAAAAAAAZ8/03LTA4FsGz0/s1600-h/prism01_example.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_ERl4N3KtoEY/SEbTdbI-ZyI/AAAAAAAAAZ8/03LTA4FsGz0/s400/prism01_example.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5208082521555625762" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_ERl4N3KtoEY/SEf9Tg_nKEI/AAAAAAAAAaU/HcUBFR6oh-A/s1600-h/prism03_example.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_ERl4N3KtoEY/SEf9Tg_nKEI/AAAAAAAAAaU/HcUBFR6oh-A/s400/prism03_example.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5208410005793351746" /></a><br /><br />Every prism goes from globe surface (from zero elevation) to the specified top elevation.<br />You can render it in a wire or filled mode, change the fill and wire color and transparency and modify the top elevation.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_ERl4N3KtoEY/SEbTd1ifgAI/AAAAAAAAAaE/itP6TkTELms/s1600-h/prism02_example.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_ERl4N3KtoEY/SEbTd1ifgAI/AAAAAAAAAaE/itP6TkTELms/s400/prism02_example.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5208082528641974274" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ERl4N3KtoEY/SEf9Tyxk1RI/AAAAAAAAAac/K5CuV_r-n0M/s1600-h/prism04_example.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_ERl4N3KtoEY/SEf9Tyxk1RI/AAAAAAAAAac/K5CuV_r-n0M/s400/prism04_example.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5208410010566317330" /></a><br /><br />You can get the source code <a href="http://asantiagop.googlepages.com/WWJ_Prism_Objects_01.zip">here</a>.<br /><br />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 :(<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/rdA7FGJNDkA&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/rdA7FGJNDkA&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="344"></embed></object>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com2tag:blogger.com,1999:blog-7164397541573936868.post-5508501663629715622008-05-31T19:18:00.006+02:002008-05-31T19:47:05.371+02:00Prism objects for WWJLooking at <a href="http://blog.thematicmapping.org/">the thematic mapping blog</a> some time ago I saw a beautifulies KML examples of <a href="http://blog.thematicmapping.org/2008/05/animated-prism-map-in-google-earth.html">animated prism maps</a>.<br />Prisms are goods to represent amounts with different shapes like countries or cylinders.<br /><br />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 :)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ERl4N3KtoEY/SEGLihhHY_I/AAAAAAAAAZQ/0Xwvnfeez1c/s1600-h/prism01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_ERl4N3KtoEY/SEGLihhHY_I/AAAAAAAAAZQ/0Xwvnfeez1c/s400/prism01.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5206596069446083570" /></a><br />Given a set of lat/lon positions you can create a prism object specifying the top elevation, color, etc.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ERl4N3KtoEY/SEGLjdL4t1I/AAAAAAAAAZY/INaPW2PLxvg/s1600-h/prism02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_ERl4N3KtoEY/SEGLjdL4t1I/AAAAAAAAAZY/INaPW2PLxvg/s400/prism02.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5206596085463168850" /></a><br />It looks great, for to be honest has the same problem as the big brother GE has, the hole problem.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ERl4N3KtoEY/SEGLjgRPlMI/AAAAAAAAAZg/-SoQmOBTmig/s1600-h/prism03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_ERl4N3KtoEY/SEGLjgRPlMI/AAAAAAAAAZg/-SoQmOBTmig/s400/prism03.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5206596086290945218" /></a><br />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.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ERl4N3KtoEY/SEGLj4AKERI/AAAAAAAAAZo/v6Gbzux30Y4/s1600-h/prism04.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_ERl4N3KtoEY/SEGLj4AKERI/AAAAAAAAAZo/v6Gbzux30Y4/s400/prism04.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5206596092661731602" /></a>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0tag:blogger.com,1999:blog-7164397541573936868.post-52445439973633201172008-05-29T17:42:00.005+02:002008-05-29T17:57:36.398+02:00Google Earth Browser pluginI was thinking about blogging not only about The Balloon Project but also about GIS things. And here is my first post.<br /><br />The next links talks about the new release of the Google Earth browser plugin:<br /><ul><li>http://earthissquare.com/2008/05/28/google-earth-in-a-web-page/</li><li>http://bullsworld2007.wordpress.com/2008/05/28/another-google-idea-borrowed-from-world-wind/</li><li>http://maps.co.mecklenburg.nc.us/ft/?p=238</li></ul><br />and here is a bit summary of it:<br /><ul><li>advantage</li><ul><li>it is another product of the google universe</li></ul></ul><ul><li>disadvantage</li><ul><li>only for windows (at the moment and like the initial release of GE)</li><li>memory and processor eater</li></ul></ul><br />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 ;)Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com1tag:blogger.com,1999:blog-7164397541573936868.post-58456296996181421942008-03-28T18:56:00.004+01:002008-03-28T19:02:13.092+01:00WWJ and using JWindow to improve annotationsHere 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.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ERl4N3KtoEY/R-0yCoVz31I/AAAAAAAAAYY/c1OFyNneQIo/s1600-h/jwindow.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_ERl4N3KtoEY/R-0yCoVz31I/AAAAAAAAAYY/c1OFyNneQIo/s400/jwindow.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5182853766943334226" /></a><br /><br />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.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com2tag:blogger.com,1999:blog-7164397541573936868.post-81050896810410533642008-03-17T21:50:00.012+01:002008-03-17T12:55:51.855+01:00Load/Save configurationsYes, 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. <br />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.<br />That's not all. Maybe you have installed a couple of <span style="font-style:italic;">future</span> :) Balloon plugins and they need to be capable to store their information in the save file too.<br /><br />Here is a little example of configuration file:<br /><pre name="code" class="xml"><br /><Balloon name="Balloon Configuration"><br /> <Stars visible="false"/><br /> <Atmosphere visible="true"/><br /> <Fog visible="true"/><br /> <Worldmap position="gov.nasa.worldwind.WorldmapLayer.NorthWest" visible="false"/><br /> <Compass position="gov.nasa.worldwind.CompassLayer.NorthEast" visible="true"/><br /> <Scalebar position="gov.nasa.worldwind.ScalebarLayer.SouthEast" visible="true"/><br /> <Timeline position="TimelineLayer.North" visible="true"/><br /> <Views><br /> <View name="New view 1"/><br /> </Views><br /> <WorldLayers><br /> <Landsat name="i-cubed Landsat" opacity="1.0" visible="true"/><br /> <WMS layer="Todas" name="Todas las capas" opacity="0.5" server="http://www.idee.es/wms/IDEE-Base/IDEE-Base" visible="true"/><br /> <AnnotatedIcon elevation="0.0" latitude="42.25217798245473" longitude="3.156023105000482" name="stock_help-agent.png" source="/home/asantiago/Desktop/Balloon_Icons/stock_help-agent.png" visible="true"><br /> <AnnotationText>ROSAS</AnnotationText><br /> </AnnotatedIcon><br /> <GlobeAnnotation elevation="0.0" latitude="41.55723320395057" longitude="2.5203810261487614" name="New annotation" visible="true"><br /> <AnnotationText>otro sitio</AnnotationText><br /> </GlobeAnnotation><br /> <FacingIcon elevation="0.0" latitude="42.266306504317086" longitude="3.273907317536755" name="tools-check-spelling.png" source="/home/asantiago/Desktop/Balloon_Icons/tools-check-spelling.png" visible="true"/><br /> <SurfaceImage maxlatitude="51.8743896484375" maxlongitude="13.290637969970703" minlatitude="40.0" minlongitude="3.2906382083892822" name="stock_timer.png" opacity="1.0" source="/home/asantiago/Desktop/Balloon_Icons/stock_timer.png" visible="true"/><br /> </WorldLayers><br /></Balloon><br /></pre><br /><br /><span style="font-style:italic;"><span style="font-weight:bold;">Note</span>: 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: <code><img ... /></code>.</span><br /><br />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.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0tag:blogger.com,1999:blog-7164397541573936868.post-87465040606864911662008-01-20T18:01:00.000+01:002008-01-22T20:32:24.516+01:00Using SurfacePolygon to render shapefilesToday I a have working with SurfacePolygon to render shapefiles.<br />SurfacePolygon takes a set of Positions and creates a BufferedImage that is rendered as a normal tile. That has a good performance and the result image can beautifully overlap the terrain<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ERl4N3KtoEY/R5N_KFLgWvI/AAAAAAAAAWM/PlsuRsyZg1w/s1600-h/shape_pol1.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_ERl4N3KtoEY/R5N_KFLgWvI/AAAAAAAAAWM/PlsuRsyZg1w/s400/shape_pol1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5157605809435204338" /></a><br /><br />The above polygons are configured to create images with 256x256 size. The results seems good, but all depends on how much good you want.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ERl4N3KtoEY/R5N_KFLgWwI/AAAAAAAAAWU/RhqC-u1h4hY/s1600-h/shape_pol2.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_ERl4N3KtoEY/R5N_KFLgWwI/AAAAAAAAAWU/RhqC-u1h4hY/s400/shape_pol2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5157605809435204354" /></a>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com6tag:blogger.com,1999:blog-7164397541573936868.post-44923546869045902152008-01-14T23:15:00.000+01:002008-01-20T17:42:43.734+01:00The day when Timeline becomes more graphicalThis is the new Timeline layer. It is not completely finished but it is more graphical and (at least for me) more beautiful ;)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ERl4N3KtoEY/R4vfbFLgWtI/AAAAAAAAAV8/-2o8su7lNSE/s1600-h/graphic_timeline.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_ERl4N3KtoEY/R4vfbFLgWtI/AAAAAAAAAV8/-2o8su7lNSE/s512/graphic_timeline.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5155459854795561682" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ERl4N3KtoEY/R5N54lLgWuI/AAAAAAAAAWE/wkXhLTzmzws/s1600-h/graphic_timeline2.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_ERl4N3KtoEY/R5N54lLgWuI/AAAAAAAAAWE/wkXhLTzmzws/s320/graphic_timeline2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5157600011229354722" /></a><br /><br />To create it, I was developed before a new little package called "Widgets" with a mini set of classes implementing: button, image and label.<br />All them are kinds of widgets and can receive mouse events: entered, exited, left pressed, left clicked, draw and draw end. Depending on these event you can change the properties of the objects: opacity, change its texture (to make feel the button is pressed), font, etc.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com4tag:blogger.com,1999:blog-7164397541573936868.post-78447214225649280652008-01-12T22:52:00.001+01:002008-01-13T10:42:34.218+01:00Shapefile support finishedThanks to the code I was developed for my original Balloon 3D API I just have finised the shapefile suport for WWJ ;) and I'm very happy because the performance is really good.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ERl4N3KtoEY/R4k21FLgWrI/AAAAAAAAAVs/etBb5ycoB2E/s1600-h/shapefiles_support.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_ERl4N3KtoEY/R4k21FLgWrI/AAAAAAAAAVs/etBb5ycoB2E/s320/shapefiles_support.jpg" alt="" id="BLOGGER_PHOTO_ID_5154711534053644978" border="0" /></a><br /><br />As I say previously, unfortunately it only works fine for flat world. I take a look in the Polyline implementation to know how to render it taking into account the globe relieve.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ERl4N3KtoEY/R4ncjlLgWsI/AAAAAAAAAV0/6sC_Uto0nXY/s1600-h/shapefile_support1.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_ERl4N3KtoEY/R4ncjlLgWsI/AAAAAAAAAV0/6sC_Uto0nXY/s320/shapefile_support1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5154893752336145090" /></a>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com3tag:blogger.com,1999:blog-7164397541573936868.post-43775457763038990302008-01-12T19:02:00.001+01:002008-01-12T22:46:11.693+01:00Shapefile support startedToday I have started the support for shapefiles in WWJ.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ERl4N3KtoEY/R4kA1VLgWqI/AAAAAAAAAVk/HIrKerVEMtQ/s1600-h/shapefiles.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_ERl4N3KtoEY/R4kA1VLgWqI/AAAAAAAAAVk/HIrKerVEMtQ/s320/shapefiles.jpg" alt="" id="BLOGGER_PHOTO_ID_5154652164720712354" border="0" /></a><br />There to group of things:<br /><ul><li>Goods. These are the good things about the implementation:</li><ul><br /><li>I am adapting the same code I used some time ago in my own 3D API of Balloon Project. That is a good new for me :)</li><li>The features are loaded "dynamically", not waits until the whole file is read, instead the reader process adds on the fly a new renderable object for each read feature.<br /></li><li>The implementation uses display list and the performance is pretty good.</li><li>It allows read points, polygons and collection of geometries (I need to refresh the geometry hierarchy).</li><li>You can specify the color, opacity and thickness of geometries. When some property that affects its visualization the display list is recreated.<br /></li><br /></ul><br /><li>Bads. These are the bad new about the implementation.<br /></li><ul><br /><li>Polygon are not filled.</li><li>You must to set the globe to a flat globe (vertical exaggeration equal zero). For the moment there are problems with the globe relieve.<br /></li><br /></ul><br /></ul>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0tag:blogger.com,1999:blog-7164397541573936868.post-48468740303950154492008-01-07T16:17:00.000+01:002008-01-07T16:49:45.646+01:00...and the Balloon becomes pluggableSpending some of my vacation days on the Balloon project, finally I almost finished the base platform, composed by three main modules:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ERl4N3KtoEY/R4JD6VLgWdI/AAAAAAAAAT8/9GR8_0JqBXw/s1600-h/scr1.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_ERl4N3KtoEY/R4JD6VLgWdI/AAAAAAAAAT8/9GR8_0JqBXw/s320/scr1.jpg" alt="" id="BLOGGER_PHOTO_ID_5152755593062144466" border="0" /></a><br /><ul><li>Core module: Responsibles for the 3D rendering process and interaction with the elements. Here I put some of my own extension to WWJ that helps to improve the layer management, add new object (like AnnotatedIcons), ...</li><br /><li>Use interface module: Contains the basic GUI for the Balloon with:</li><ul><li>Layer manager: allows to handle elements as a layer stack, moving elements up/down, creating group of elements, ...</li><li>Property window: each element has its own properties that are shown and modified through the properties window.<br /></li><li>A set of basic wizards to import: images (local or remote), WMS layers, icons and annotations.</li></ul><li>Support module: Contains some third party libraries needed by the GUI (like SwingX).</li></ul><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ERl4N3KtoEY/R4JD6VLgWeI/AAAAAAAAAUE/RfP021AdENE/s1600-h/scr2.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_ERl4N3KtoEY/R4JD6VLgWeI/AAAAAAAAAUE/RfP021AdENE/s320/scr2.jpg" alt="" id="BLOGGER_PHOTO_ID_5152755593062144482" border="0" /></a><br />This part needs some improvements but it current state is <span style="font-style: italic;">very decent</span>.<br /><br />On the other side, I have started to develop the first plugin for the base platform. This pluggin integrates some <a href="http://www.geonames.org/">geonames</a> capabilities into the Balloon, it allows to search toponyms and put into the globe as annotation.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_ERl4N3KtoEY/R4JD6lLgWfI/AAAAAAAAAUM/5fKZXiRb3eY/s1600-h/scr3.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_ERl4N3KtoEY/R4JD6lLgWfI/AAAAAAAAAUM/5fKZXiRb3eY/s320/scr3.jpg" alt="" id="BLOGGER_PHOTO_ID_5152755597357111794" border="0" /></a>Once installed the plugin, a new wizard is present in the "pluggins" tab. It allows to search any toponym with the given text (with some filter options).<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_ERl4N3KtoEY/R4JD6lLgWgI/AAAAAAAAAUU/CjwCNzMU7RA/s1600-h/scr4.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_ERl4N3KtoEY/R4JD6lLgWgI/AAAAAAAAAUU/CjwCNzMU7RA/s320/scr4.jpg" alt="" id="BLOGGER_PHOTO_ID_5152755597357111810" border="0" /></a>If the geoname webservices returns any found data, then we can select which one to put in the globe as annotation:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ERl4N3KtoEY/R4JD61LgWhI/AAAAAAAAAUc/MwJxUwXssus/s1600-h/scr5.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_ERl4N3KtoEY/R4JD61LgWhI/AAAAAAAAAUc/MwJxUwXssus/s320/scr5.jpg" alt="" id="BLOGGER_PHOTO_ID_5152755601652079122" border="0" /></a>and finally we get his:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ERl4N3KtoEY/R4JEb1LgWiI/AAAAAAAAAUk/KUFFfr1nZTs/s1600-h/scr6.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_ERl4N3KtoEY/R4JEb1LgWiI/AAAAAAAAAUk/KUFFfr1nZTs/s320/scr6.jpg" alt="" id="BLOGGER_PHOTO_ID_5152756168587762210" border="0" /></a>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com1tag:blogger.com,1999:blog-7164397541573936868.post-41454855091740058982007-12-24T12:38:00.000+01:002007-12-24T12:48:37.975+01:00WWJ Annotated IconsSuppose you have icons around the globe representing some type of events (traffic, rain, fire, ...) and you want to see more information when click on them with the mouse.<br /><br />Well, I have created the so called AnnotatedIcons with this idea in mind. Note, as suggested <a href="http://forum.worldwindcentral.com/showpost.php?p=53252&postcount=8">here</a> byt Pat, there is another approach to achieve similar effect based only in annotations (one annotation with two or more annotation attribute styles). Unfortunately :( I had done the major part of code when I known the alternative, and anyway I like AnnotatedIcons :)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ERl4N3KtoEY/R2-cKlLgWZI/AAAAAAAAAS8/A4EAVfqxae8/s1600-h/annotated_icon.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_ERl4N3KtoEY/R2-cKlLgWZI/AAAAAAAAAS8/A4EAVfqxae8/s320/annotated_icon.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5147504604700760466" /></a><br /><br />As you can see in the image (I have no time to make a video), some icons are rendered and when the mouse is over one its associated annotation is shown with more extended information.<br /><br />You can take the source code from <a href="http://asantiagop.googlepages.com/WWJ_Annotated_Icons_01.zip">here</a>.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com4tag:blogger.com,1999:blog-7164397541573936868.post-12681727895184526312007-12-24T12:13:00.001+01:002007-12-24T13:01:25.321+01:00WWJ Rotable IconsReading <a href="http://forum.worldwindcentral.com/showthread.php?t=13190">this</a> thread other developer talk about how useful will be have icons that can be rotated.<br />I don't know if these contribution success with all expectation but if you can compute the heading desired for your icons then these can be useful for you.<br />The RotableUserFacingIcon implementation allows to specify the heading rotation of your icons (like the compass).<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ERl4N3KtoEY/R2-dilLgWaI/AAAAAAAAATE/OCHlFrViI5U/s1600-h/rotable_icons.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_ERl4N3KtoEY/R2-dilLgWaI/AAAAAAAAATE/OCHlFrViI5U/s320/rotable_icons.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5147506116529248674" /></a><br /><br />You can get the source code from <a href="http://asantiagop.googlepages.com/WWJ_Rotable_Icons_01.zip">here</a>.<br /><br />Note, this contribution adds a peace of code into the <span style="font-style:italic;">IconRenderer</span> class to allows icon rotation take effect, and also take into account the icon is slightly displaced when it is a rotable icon.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com2tag:blogger.com,1999:blog-7164397541573936868.post-55736413518885085992007-12-08T13:34:00.001+01:002007-12-08T13:39:50.771+01:00The new balloon...I'm glad to present a screenshot about the new balloon application.<br /><br />For the moment I'm working very hard on the user interface, but it allows to work with the default WWJ BlueMarble and Lansat layers, load images (local or remote) with <a href="http://theballoonproject.blogspot.com/2007/11/wwj-surfaceimage-reloaded.html">re-loading option</a> ;) and animate with a temporality associated.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ERl4N3KtoEY/R1qPe2IwnGI/AAAAAAAAARs/i_cxSVYL7wM/s1600-h/newballoon.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_ERl4N3KtoEY/R1qPe2IwnGI/AAAAAAAAARs/i_cxSVYL7wM/s320/newballoon.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5141579684687944802" /></a>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com1tag:blogger.com,1999:blog-7164397541573936868.post-59610384918492167152007-11-27T00:15:00.000+01:002007-11-27T00:22:14.691+01:00WWJ SurfaceImage reloadedDon't worry this isn't Matrix ;) (I hope it)<br /><br />I have made a little update on the previous update of SurfaceImage to allow reload of data.<br />Suppose you have an image file that can be modified by an external process and you want reload it at regular intervals of time to see its changes.<br />Now you can have it with SurfaceImage reloaded :)<br /><br />You can get the source code <a href="http://asantiagop.googlepages.com/WWJ_Asynchronous_SurfaceImage_04.zip">here</a>.<br /><br />I have added a new <span style="font-style:italic;">reload(boolean useCache)</span> method. Note, it has one boolean parameter to specify if the image must be reloaded from cache (if it is there, I think this option isn't very useful) or reloading it from the original source of data.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com2tag:blogger.com,1999:blog-7164397541573936868.post-8979735235556162082007-11-26T20:37:00.000+01:002007-11-26T20:49:12.038+01:00A note on LayerSetUnfortunately I must recognize I am a newbie with my own code :P<br />Using LayerSet in the Balloon project I get a little headache I want to comment here.<br />LayerSet extends LayerList class and also implements the Layer interface (in the same way as AbstractLayer).<br />Take very into account, that <span style="font-style:italic;">if you create a LayerSet an adds a LayerList object, all contained layers in LayerList are copied into the LayerSet</span>, and that's all. If later you modify the LayerList, adding or removing layers, the <span style="font-style:italic;"><span style="font-weight:bold;">changes are not propagated to the LayerSet</span></span>.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com6tag:blogger.com,1999:blog-7164397541573936868.post-81051427593431410192007-11-23T17:45:00.000+01:002007-11-23T17:56:22.747+01:00WWJ renderable objectsAlthough it seems a very big change, here I present a WWJ hack to convert more object into Renderable object, that is, objects that implements the Renderable interface.<br />I have made only three things to achieve this:<br /><br /><ol><br /><li>Add the next methods to the Renderable interface:<br /><code><br /> public boolean isEnabled();<br /> public void setEnabled(boolean enabled);<br /> public String getName();<br /> public void setName(String name);<br /> public double getOpacity();<br /> public void setOpacity(double opacity);<br /></code><br />The idea is that a any Renderable object can has a enable/disable state, an opacity value and optionally a name.<br /></li><br /><br /><li><br />Add a default implementation for this method in all affected classes and interfaces. The default implementation doesn't alter the normal behavior of this elements.<br /><code><br /> /**<br /> * Default Renderable implementation.<br /> */<br /> public boolean isEnabled()<br /> {<br /> return true;<br /> }<br /><br /> public void setEnabled(boolean enabled)<br /> {<br /> // Do nothing.<br /> }<br /><br /> public String getName()<br /> {<br /> return null;<br /> }<br /><br /> public void setName(String name)<br /> {<br /> // Do nothing.<br /> }<br /><br /> public double getOpacity()<br /> {<br /> return 1;<br /> }<br /><br /> public void setOpacity(double opacity)<br /> {<br /> // Do nothing.<br /> }<br /></code><br /></li><br /><br /><li><br />Added a new class RenderableListLayer, similar to LayerList that can contain any "new" Renderable object, that is, Layers, Icons, Images, etc.<br />Here are a peace of code using this class:<br /><code><br /> LayerList ll = new LayerList();<br /> RenderableListLayer main = new RenderableListLayer();<br /><br /> main.add(new BMNGSurfaceLayer());<br /> main.add(new LandsatI3());<br /> main.add(new ScalebarLayer()); <br /> <br /> RenderableListLayer rll = new RenderableListLayer();<br /> rll.add(si1);<br /> rll.add(si2);<br /> rll.add(si3);<br /> rll.add(new CompassLayer());<br /> rll.add(new WorldMapLayer()); <br /> <br /> main.add(rll);<br /> main.setPickEnabled(false);<br /><br /> ll.add(main);<br /></code><br /></li><br /></ol><br /><br />Source code can be found <a href="http://asantiagop.googlepages.com/WWJ_Renderable_01.zip">here</a>.<br /><br />Finally it must be necessary to implement the appropriate mechanism to render images, nodes and other Renderable object taking into account its opacity and enable values.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0tag:blogger.com,1999:blog-7164397541573936868.post-69930366325080530852007-11-21T19:48:00.000+01:002007-11-21T21:31:19.919+01:00WWJ Movable SurfaceImageFinally I have modified the SurfaceImage class to implement the Movable interface too.<br />The source code can be found <a href="http://asantiagop.googlepages.com/WWJ_New_SurfaceImage_01.zip">here</a>.<br /><br /><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/n_LK1kQ8-Mg&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/n_LK1kQ8-Mg&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0tag:blogger.com,1999:blog-7164397541573936868.post-83611851020055460742007-11-18T12:14:00.000+01:002007-11-18T12:20:09.985+01:00WWJ remote SurfaceImage updatedWell, after a couple of days improving some things finally here is the until now best version of SurfaceImage ;)<br /><br />The new features are:<br />* Local and remote images (except BufferedImage's) are loaded in a separate thread.<br />* Remote images are cached on disk, to avoid network overhead.<br />* Added a 'setSector' method to change the image sector position.<br /><br />You can find the source code <a href="http://asantiagop.googlepages.com/WWJ_Asynchronous_SurfaceImage_02.zip">here</a>.Antonio Santiagohttp://www.blogger.com/profile/05354117103226692378noreply@blogger.com0