tag:blogger.com,1999:blog-211670132008-08-19T20:45:00.890-07:00EarthBrowserMatt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comBlogger56125tag:blogger.com,1999:blog-21167013.post-47521031815018231622008-08-06T15:45:00.000-07:002008-08-06T16:05:21.890-07:00My iTunes Pirate AlbumMy alter-ego has been revealed... <br /><br /><center><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?id=128524280&s=143441"><img src="http://a1.phobos.apple.com/us/r10/Music/4f/7d/7c/mzi.dmbfccak.170x170-75.jpg"/></a></center><br /><br />I'm the drummer first mate on the pirate rock band <a href="http://www.kevinhendrickson.com/kh/hucklescary-finn/huckle-scary-finn.html">HuckleScary Finn</a> captained by my best friend Kevin Hendrickson. I'm afraid that I can't take credit for the huge resurgence in pirate themed activities here in the Portland area, but I'd like to think I got in on the ground floor.<br /><br />Notable Portland Oregon Pirate links:<br />• <a href="http://www.portlandpiratefestival.com/">Portland Pirate Festival</a><br />• <a href="http://www.boggandsalty.com/">Captain Bogg & Salty</a> (best pirate band in the world).<br />• <a href="http://www.talklikeapirate.com/">International talk like a pirate day</a><br />• <a href="http://www.captainhenryspiratestore.com/">Captain Henry's Pirate Store</a> (a pirate merchandise only store)<br /><br />ArrrrrrrrrMatt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-67630992350137228432008-07-23T10:40:00.000-07:002008-07-23T10:47:15.922-07:00What's in the EarthBrowser pipeline?If you aren't interested in wading through my sleep inducing <a href="http://blog.earthbrowser.com/2008/07/earthbrowser-presentation-at-google.html">30 minute Google presentation</a>, I'm planning on detailing much of what I said in a series of blog posts.<br /><br />Contrary to almost every bit of advice I've been given I'm going to lay most of my cards out on the table about the future of EarthBrowser. For a single guy trying to go up against multi-billion dollar corporations, I need as much attention as I can get. However I'm not going to reveal everything, I've got some pretty cool things under wraps for release later this year.<br /><br />Flash 10: I'm very excited about <a href="http://labs.adobe.com/technologies/flashplayer10/">Flash 10</a> and believe that it will open the door for real-time 3D in the web browser. For me the most important aspects of F10 are native matrix operations, hardware accelerated rendering and a shading language. This will enable EarthBrowser to have true 3D navigable terrain with mountains, valleys and even underwater exploration, right in your web browser or in the desktop authoring app. I am hoping to get a 50-100% increase in rendering speed and be able to do really pretty things like normal mapping and atmospheric scattering.<br /><br />3D Collada models: I'm not really a big fan of the obsession by Google and MS to put accurate 3D buildings on the earth, but if you have the data it isn't really hard to do. I've got more interesting uses for 3D models which will become more apparent in future versions.<br /><br />GPS track importing: A very easy feature to add for people to edit and share.<br /><br />iPhone version: I still hold out hope for Apple and Adobe to get Flash running on the iPhone so I haven't allocated much of my bandwith to this project yet. However after some exploration of the problem space, I estimate it will be relatively simple to port from my current codebase due to the nicely abstracted rendering backend.<br /><br />My next blog post will detail the geometry / time coordinate extension that I hope will make it into the KML standard at some point. Time coordinates are designed for use in feature animation, which is an obvious use but was never a design consideration for KML. I don't really have the time or desire to submit and shepherd a proposal through an OGC standards committee. Perhaps there could be something like the <a href="http://www.boost.org/">Boost Library</a> for KML where proposed extensions are selected to become part of the standard after being tested and refined by use in the community. Seems like this would be a great place for me and the <a href="http://worldwind.arc.nasa.gov/">WorldWind</a> developers to start taking a little initiative and advance the state of the art for virtual globes.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-27705965698509030482008-07-21T12:50:00.000-07:002008-07-21T13:02:33.082-07:00EarthBrowser presentation at GoogleLast Tuesday I gave a 30 minute presentation at Google about the upcoming EarthBrowser Flash plugin. I also presented an enhancement to improve the expressiveness and utility of KML along with a demonstration with orbiting satellites. Many thanks to Michael Weiss-Malik and the great guys at Google for inviting me to talk about whatever I wanted to!<br /><br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/DlT-D0DKTPw&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/DlT-D0DKTPw&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object><br /><br />If you have problems with the embedded video you can <a href="http://video.google.com/videoplay?docid=1032729556039650556&hl=en">see it on youtube</a>.<br /><br />In the presentation I go through some of the features and benefits of the EarthBrowser Flash plugin. Then I talk about giving time it's own coordinate in the geometry primitives in order to reduce KML file size and complexity as well as add new functionality. Toward the end I talk about future enhancements to the EarthBrowser desktop/web platform. I also mention that I'm developing an iPhone version.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-22977661157280692882008-07-09T08:40:00.000-07:002008-07-09T08:45:46.937-07:00Wow! C/C++, Python and Ruby running in Flash PlayerEarlier this year I saw the <a href="http://www.youtube.com/watch?v=6TKGNS1N1yo">demo of Quake running in Flash</a> directly translated from C++. It was very impressive to say the least, Adobe has some great coders and the amazing advantage of having their code running on almost every computer with a web browser.<br /><br />I just came across <a href="http://www.toolness.com/wp/?p=52">this post</a> that talks about an open source backend to the LLVM that will enable C/C++, Python, Ruby, Perl, Lua and other languages to be targeted to ActionScript bytecode (the language the flash player runs). It sounds like it will need some more work and support of a new Flash player version but the possibilities are extremely exciting.<br /><br />More detailed information on the initial LLVM work by Ryan Stewart <a href="http://blog.digitalbackcountry.com/?p=1095">here</a>.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-52911288830064955652008-06-19T14:30:00.000-07:002008-06-19T14:37:14.651-07:00KML Extension, Julian TimeCreating a virtual globe that can view KML files as well as creating numerous datasets that have to use KML has given me what I feel is a unique perspective on the strengths and weaknesses of the language. It also gives me a really unique opportunity to enact some features in the language that I feel are needed. Hopefully at some point the <a href="http://www.opengeospatial.org/">OGC</a> and Google will consider some of my suggestions once they are more formalized.<br /><br />I've just come up with a *really* nice extension to KML that can drastically reduce the size of some datasets (e.g.: a 1.2 MB dataset is reduced to 60K) and at the same time enable functionality that is sorely missing. I'm not going to spill the beans on it quite yet since I've got another couple of enhancements that will enable even more great functionality. I'll present this extension and others when I give my talk at Google on the 15th of July. I'll post a video of that talk on this blog once its available.<br /><br />Julian Time:<br />One of the less fortunate aspects of KML, in my opinion, is it's use of the <a href="http://www.w3.org/TR/xmlschema-2/#isoformats">ISO 8601 Date and Time Format</a>. I understand why they did it; because it is human readable and a standard to hang their hat on. The processing overhead on parsing the date is significant, but not a deal breaker so why do I care?<br /><br />Clearly the ISO time format should be left in, but there should be another option for specifying it as <a href="http://en.wikipedia.org/wiki/Julian_day">Julian Time</a>. There are so many nice properties of julian time that I would be very surprised if Google Earth, Virtual Earth, ESRI and any other virtual globes don't all use it for their internal representation of time. It is a floating point number (usually a 64 bit double) that can be manipulated with standard mathematical functions. Anyone who has ever written a date library the naive way (as I have) has come to dislike all of the little details like days in a month, leap years and worst of all... time zones. Why not standardize on a time format that does away with all of that dreck and can be operated on like a regular number? You can add 3.5 days, subtract an hour and do simple comparison operations like greater than, less than and equal. I can't imagine ever using another internal representation.<br /><br />Here's a conversion routine in Python:<br /><pre><br /># gdate is (year, month [1-12], day, hour, minute, second)<br />def julian_date(gdate):<br /> if gdate[1] < 3:<br /> M = gdate[1] + 12<br /> Y = gdate[0] - 1<br /> else:<br /> M = gdate[1]<br /> Y = gdate[0]<br /> D = gdate[2] + (gdate[3] / 24.0) + (gdate[4] / 1440.0) + (gdate[5] / 86400.0)<br /> A = math.floor(Y/100.0)<br /> RV = math.floor(365.25*(Y+4716.0)) + math.floor(30.6001*(M+1.0))<br /> return RV + D + (2.0-A+math.floor(A/4.0)) - 1524.5<br /></pre>Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-44319905508677829222008-06-13T06:31:00.001-07:002008-06-13T06:42:28.684-07:00Google open sources GearsGoogle has open sourced it's web plugin <a href="http://code.google.com/p/gears/">Gears</a> under a modified BSD license. Normally I wouldn't comment on something like this because it seems unrelated to what I'm doing with EarthBrowser. However I believe that it could be very important to the future direction of EarthBrowser. A web plugin that supports all major browsers on all major platforms is a *very* large project, one I would never attempt myself. I am kind of in shock that Google would make it so easy for others to make web plugins by giving this away under such a permissive license.<br /><br />A really long time ago, way back when in the days of Netscape before Internet Explorer even came around, I had a version of EarthBrowser working as a web plugin. It had too many problems with memory limits on the old MacOS 7 and 8 so I canned the project and went with a desktop app. So now there is an open source web plugin code base that I can use to port my OpenGL version of EarthBrowser right into a website. I probably won't tackle that particular project until next year, but it is good to know that it is now possible.<br /><br />I am very impressed with the release of this code, this is such a different way of doing business. I don't see any benefit for them in doing this, but there isn't any harm either. Way to share knowledge Google!Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-30751365759656937642008-06-12T12:34:00.000-07:002008-06-12T12:41:51.510-07:00KML to JSKML translator now availableIt's now available at the <a href="http://www.jskml.org">JSKML Site</a> run though the Google App Engine.<br /><br />I've created a KML parser that will transform a KML document into the JSKML format, or alternately a JSON formatted JSKML document if that is what you require. It's a simple copy and paste translator similar to Dean Edwards excellent <a href="http://dean.edwards.name/packer/">Javascript Packer</a>.<br /><br />It currently works on the KML 2.2 standard and could use a little optimization but it is functional and easy to use. If you give it a try and find an error, please let me know.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-91666710813296728262008-06-09T15:15:00.000-07:002008-06-09T15:17:07.853-07:00jskml: Javascript KML DialectKML data structures need to be represented in other formats than just XML. With virtual globes moving into the web browser, the need for an alternate representation that does not require parsing to go from XML text into Javascript objects is an important step, in my opinion, in simplifying web based scripting of online mapping.<br /><br />I have created a simple static website describing the new dialect at:<br /><a href="http://www.jskml.org">http://www.jskml.org</a>.<br /><br />I used <a href="http://code.google.com/appengine/">Google App Engine</a> and the <a href="http://www.djangoproject.com">Django framework</a> to create this site. I've got another exciting app or two planned for deployment using this platform and this website was a good way for me to orient myself as well as put out a format that I feel should be supported.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-23949302229670074352008-06-06T09:59:00.000-07:002008-06-06T10:06:15.955-07:00Thoughts on the Google earth plugin APIGood job Google earth/maps team.<br /><br />While it feels like they rushed the introduction of the earth plugin a bit, leaving pretty <a href="http://code.google.com/apis/earth/documentation/API.html">spotty documentation</a> of the API and only a Windows version, it is indeed a great first step. Putting javascript tendrils deep into the control structure of the plugin was inspired and will be transformative.<br /><br />However, the programmer in me can't help but be a little offended by the size and verbosity of the interface. Am I to understand that the very first example of creating a placemark is what will be needed for such a simple task?<br /><br /><blockquote>var placemark = ge.createPlacemark('');<br />placemark.setName("You are at Google");<br />ge.getFeatures().appendChild(placemark);<br /><br />// Create style map for placemark<br />var normal = ge.createIcon('');<br />normal.setHref('http://maps.google.com/mapfiles/kml/paddle/red-circle.png');<br />var iconNormal = ge.createStyle('');<br />iconNormal.getIconStyle().setIcon(normal);<br />var highlight = ge.createIcon('');<br />highlight.setHref('http://maps.google.com/mapfiles/kml/paddle/red-circle.png');<br />var iconHighlight = ge.createStyle('');<br />iconHighlight.getIconStyle().setIcon(highlight);<br />var styleMap = ge.createStyleMap('');<br />styleMap.setNormalStyle(iconNormal);<br />styleMap.setHighlightStyle(iconHighlight);<br />placemark.setStyleSelector(styleMap);<br /><br />// Create point<br />var la = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);<br />var point = ge.createPoint('');<br />point.setLatitude(la.getLatitude());<br />point.setLongitude(la.getLongitude());<br />placemark.setGeometry(point);</blockquote><br /><br />Admittedly it uses the super-annoying StyleMap which I feel should be abolished. Don't you think it is too much to ask to perform this kind of operation for every placemark? I suppose someone could create a wrapper library for this to simplify common tasks. <br /><br />How about implementing this in your API instead:<br /><blockquote><pre>ge.addPlacemark({<br /> name:'You are at Google',<br /> Style:{IconStyle:{Icon:{href:'http://maps.google.com/mapfiles/kml/paddle/red-circle.png'}}},<br /> Point:{coordinates:{lon,lat,alt}}<br />});</pre></blockquote><br /><br />Could the maps/earth team create the nicer interface wrapper?Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-24824641124080650652008-06-04T21:30:00.000-07:002008-06-04T21:23:18.748-07:00EarthBrowser is Adobe site of the day, Google talkI don't have the marketing megaphone that a Google has but EarthBrowser is starting to get a little attention in the Flash world. I was just notified today that earthbrowser.com was selected as the <a href="http://www.adobe.com/showcase/">Flash site of the day</a>. There was also a nice article recently on RIApedia.com titled <a href="http://www.riapedia.com/2008/05/26/earthbrowser_3d_air_app_flash">EarthBrowser - 3D AIR App in Flash</a>. <br /><br />Google, via Michael Weiss-Malik, has invited me to come down and deliver a presentation about EarthBrowser, KML and whatever else I want to talk about. I guess it will be something like the <a href="http://research.google.com/video.html">Google Tech Talks</a> where they make a YouTube video of the presentation. I've been consolidating things on version 3 for the past month so I haven't set a date yet but I'm pretty sure it will be mid July if that is available for them. Hopefully those guys aren't too miffed about my <a href="http://blog.earthbrowser.com/2007/09/libkml-wtf.html">KML</a> <a href="http://blog.earthbrowser.com/2006/09/kml-needs-ajax-style-upgrade.html">criticisms</a>, or my out of date <a href="http://blog.earthbrowser.com/2006/09/google-earth-and-kml-are-outdated.html">Google Earth criticisms</a>. Perhaps I should bring a rotten tomato shield.<br /><br />I've got a little project I'm hoping to unveil at or before the talk, but I'll leave everyone in suspense about what that could be...Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-23610969976693726652008-05-06T11:00:00.000-07:002008-05-06T11:00:01.137-07:00Cyclone Nargis and GDACSI've added a few new datasets to EarthBrowser's "Featured External Layers", which is below the main dataset element in the EarthBrowser control window. <br /><br />I'm temporarily putting in a high resolution MODIS overlay of Cyclone Nargis from earthobservatory.nasa.gov. It's a really large image so be patient, it takes a little while to download. Due to a bug in Flash for large images scaled to be small, it doesn't look very good far away, but looks better as you zoom in. Hopefully they've got a fix for this in the works.<br /><br /><center><img src="http://www.earthbrowser.com/media/blog/eb_nargis.jpg"/></center><br /><br />I've also added the <a href="http://www.gdacs.org">Global Disaster Alert and Coordination System</a> kml dataset which is updated with real-time information for ongoing disasters and recovery around the globe. To view the information for each disaster, you have to navigate through the list of elements in the control window, I wish they would put in placemarks to view the great information they have more easily.<br /><br />Finally, the Europe Media Monitor layer is a news aggregation service that plots global news stories on a map and provides an overview and link to the geo-located story.<br /><br />I'm also hoping to have an update out later this week with a timezone fix for sunrise/sunsets and also a global grid overlay feature.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-23827553713540845442008-05-05T09:00:00.000-07:002008-05-05T09:20:21.335-07:00EarthBrowser 3.0, 5 days inVersion 3 is doing very well over the past 5 days. It's selling better than I'd hoped for, the django based system I am using for the main website and for the separate data server have held up incredibly well with just a few hiccups. Amazon S3 really helps me to take the load off of my servers. I've got a handle on the tech support emails over the weekend, there are still a lot left however. I try to answer each and every person with a question or problem with a personal message. I think that kind of respect and care for each customer has really helped the business over the years. My goal is to have no unhappy customers, if I can't fix your problem or you are still not satisfied, you get a refund, it's pretty simple.<br /><br />Thanks for the mention <a href="http://www.spatiallyadjusted.com/2008/04/30/earthbrowser-30-is-out/">James</a>, <a href="http://www.digitalearthblog.com/2008/05/01/earthbrowser-30-released/">Mickey</a>, <a href="http://technology.slashgeo.org/article.pl?sid=08/05/01/003207&from=rss">Lxnyce</a> and <a href="http://bullsworld2007.wordpress.com/2008/05/01/google-ocean-and-earthbrowser-30-released/">Bull</a>. <br /><br />Some people are wondering why would they should support EarthBrowser as shareware when they can get Google Earth, Microsoft's Virtual Earth and NASA WorldWind for free. Well you get EarthBrowser for free too, you are just reminded to help support the future development of the shareware if you like it enough to use it. Google Earth is great but it isn't your computer's operating system, you CAN use more than one virtual globe at the same time.<br /><br />EarthBrowser may not have 2 inch resolution datasets, but the weather layers really blow away anything the other globes offer, in fact the weather forecast layers blow away most of what I've <a href="http://www.accuweather.com/">seen</a> from the <a href="http://www.weather.com/">major</a> <a href="http://weather.weatherbug.com/">weather</a> <a href="http://www.myforecast.com/bin/welcome.m">providers</a> offer. I'm talking with CustomWeather to see if we can do some sort of exchange of data for perhaps exclusive use of EarthBrowser on their website. I think that would really make them stand out from their competitors.<br /><br />KML is great! New datasets are being added to EarthBrowser all the time, if you only know where to find them. Today I noticed from one of my favorite blogs <a href="http://www.gearthblog.com/blog/archives/2008/05/nasa_time_animation_of_ionosphere_f.html">Frank Taylor's Google Earth Blog</a> that there is a new dataset available from NASA showing the total electron count in the earth's ionosphere. I like it so much I think I'll add it to the Featured Datasets in EarthBrowser. The red areas indicate a large concentration of electrons which may cause problems with communications. It is neat to see that the electrons build up on the daytime side of the earth and disperse shortly after darknes.<br /><br /><center><img src="http://www.earthbrowser.com/media/blog/ionosphere.jpg"/></center><br /><br />If you want to see the animated link of the <a href="http://terra1.spacenvironment.net/%7Eionops/current_files/Google_TEC_anim_00Z.kml" title="KML File">ionosphere for the past 24 hours</a> <img border="0" src="http://www.earthbrowser.com/media/blog/eb3_icon16.png" title="KML File. Install EarthBrowser." align="bottom"> in EarthBrowser just drag this link onto the EarthBrowser window. Or if you are reading this blog with EarthBrowser's embedded web-browser, just click on the link. There is also a light weight version of this file that just shows the <a href="http://terra1.spacenvironment.net/%7Eionops/current_files/Google_TEC.kml" title="KML File">current condition</a><img border="0" src="http://www.earthbrowser.com/media/blog/eb3_icon16.png" title="KML File. Install EarthBrowser." align="bottom">.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-13524002398074310152008-04-30T14:00:00.000-07:002008-04-30T14:01:04.145-07:00EarthBrowser 3.0<center><img src="http://www.earthbrowser.com/media/images/eb3_logo_small.jpg"/><br/><h3><a href="http://www.earthbrowser.com/">EarthBrowser 3.0</a></h3></center><br />Finally, it's out. Thank you to all of my wonderful supporters!!!<br /><br />I transferred over the domain name to the development server and within about 20 minutes <a href="http://www.versiontracker.com">VersionTracker</a> picked it up and I'm getting sales already. <br /><br /><a href="http://en.wikipedia.org/wiki/Steve_Wozniak">Steve Wozniak</a> was the 11th person to register version 3. He's been great to me and has bought several site licenses for schools. Maybe someday I'll be able to talk with the guy...<br /><br />I have to give a tip of my hat to the <a href="http://blog.papervision3d.org/">Papervision 3D</a> guys. They were my initial inspiration for the flash version, and although I wound up writing my own specialized rendering code, they deserve a lot of credit for what they have done! I'll go into details about how I did some things in flash in future posts, it has never been easy or fast to do software rendering. I'll also talk about some of my plans for the future.<br /><br />Right now I'm sipping on a Paulaner Salvator Dopple Bock and basking in the euphoria of 4.5 years of hard work coming to fruition.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-7301509683533487952008-04-29T15:30:00.000-07:002008-04-29T15:28:01.243-07:00EarthBrowser 3.0 goes live tomorrowHopefully people will like it.<br /><br />It's shareware, which means you can use it for free for as long as you like. However, I'm funding it out of my own pocket, which is pretty much empty at this point. So if you want all the features and don't want to be annoyed by reminders to register please pay the modest fee and help me to make it better and better. Upgrades discounted for current users of course. Oh, by the way, registered users will be able to embed EarthBrowser with their own content on their personal websites within the next several weeks.<br /><br /><center><img src="http://spacebrowser.com/media/blog/eb3_final_beta.jpg" /></center><br /><br />I just wanted to say thank you to everyone who has been so encouraging to me over the past few years; my wife, children and friends. I couldn't have done it without you.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-10421375730255357542008-04-27T08:16:00.000-07:002008-04-27T08:38:59.628-07:00Do I seem frustrated and bitter?I was just called out on the tone of my blog posts by someone I've known and respected for a long time. He said that he was a little surprised by my writing after reading my blog for the first time. I seemed bitter and frustrated, perhaps mostly at Google, and that isn't how he knows me. I guess I'm a little bitter, Google pretty much put me out of business years ago by releasing Google Earth for free. Hopefully EarthBrowser 3.0 will attract enough customers to keep my family stocked up on food, diapers and other necessities.<br /><br />I have taken a confrontational approach to many of my posts, some of this tone is conscious, some isn't. I actually try to be a little controversial and opinionated on the blog because I'm just some joe-schmo and nobody wants to read some random guy's opinions that are mushy and congenial. That's not exciting or even interesting.<br /><br />Unfortunately when writing in the blog some of my gigantic ego shows through which generally wouldn't happen in a conversation with me. I think that most programmers have really big egos, but mostly about their own coding abilities. In a self-preservation kind of way, I have to think that I'm a good programmer to tackle such a large problem by myself. I think that is just the nature of programming, no confidence = no code. <br /><br />That said, I'm going to try to tone it down. Sorry libKML guys, hope I haven't offended anyone, I realize that it is just an alpha version.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-4809932760666117002008-04-14T16:51:00.000-07:002008-04-14T16:51:58.236-07:00KML, libkml and the "standard" mistake<a href="http://google-latlong.blogspot.com/2008/04/kml-new-standard-for-sharing-maps.html">Passing off KML</a> to the <a href="http://www.opengeospatial.org/">OGC</a> so it could become a "standard" was a big mistake for Google.<br /><br />I consider myself well versed in the KML format since I just implemented most of it's features, and found them to be needing much more in the way of styling. KML will now change at a glacial rate due to the standards process, right when it needs to change the most! Google Earth's feature set will now become dictated by an outside entity, with their input of course, but that's no way to develop software! Why would they cripple Google Earth like that?<br /><br />Also <a href="http://libkml.googlecode.com/">libkml</a> has been released and it was exactly <a href="http://blog.earthbrowser.com/2007/09/libkml-wtf.html">what I thought it would be</a>, a glorified xml validation script for the kml dialect. I predict that no significant software will choose to link that library in.<br /><br />I have to say the lamest thing about KML is the whole Style/StyleMap tag collection that enables one to set a separate style on an icon for mouse-over events. It's a great way to have a non-standardized interface since everyone rolls their own mouse-over effect for each placemark style!<br /><br />I've implemented a few of my own extensions to the KML format which I will go into detail about later. They are mostly aimed at visibility and styling extensions. One of the most useful extensions is the <ebr:ElevationRange> tag which allows one to control the visibility of a Feature element (Placemark or GroundOverlay) globally based on camera elevation. This is much easier than setting up one of those <Region> elements, especially for a single placemark.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-25336971821448670312008-04-08T16:10:00.000-07:002008-04-08T16:08:59.448-07:00EarthBrowser 3.0 ImminentEarthBrowser 3.0 is currently in beta testing and I think that it might live up to my prediction to revolutionize virtual globes. It should be released within the next two weeks.</p><br /><center><img src="http://www.earthbrowser.com/blog/conus_med.jpg"/></center><br /><h4>Floundering In The Past</h4><p>I have been working on version 3 of EarthBrowser since 2004 and it is finally coming to fruition. Up until about a year ago, I was still working on a version that was based on OpenGL with a Python scripting engine. It was basically a new platform that would do seamless version updates, enable users to extend the interface programmatically, do extremely fast raster and vector map projections on multi-gigabyte data files using JPEG-2000 incremental decompression. Use a hexagonal dataset grid to feed the fragment shader based clipmap engine for smooth panning around the poles with no perspective distortion. I was also downloading, pan-sharpening and color-space correcting the Landsat 15m dataset. Bit-torrent distributed datasets were integrated, relief mapping and atmospheric diffusion were supported. It really is a masterpiece, but then Google Earth was given away for free and sales of version 2 began to dry up as I was digging myself deeper and deeper.</p><br /><center><img src="http://www.earthbrowser.com/blog/grid_big.png"/></center><br /><h4>The Turning Point</h4><p>Then along came <a href="http://modestmaps.com/">Modest Maps</a> which introduced me to Flash programming. Once again plunging into yet another new technology, I decided to make a quick sliding map with a few datasets for people to put on their websites for free advertising. Then I saw <a href="http://blog.papervision3d.org/">Papervision3D</a> and realized that I could do a globe. It was a little too slow for my needs so I ported my C++ game engine kernel over to Flash. I kept adding features expecting to hit the limit of what was possible with Flash and I never did. Around June I put the OpenGL version on the back burner and began working full time on a web version of EarthBrowser.</p><br /><h4>Unexpected Windfall</h4><p>This February Adobe released <a href="http://www.adobe.com/products/air/">Adobe AIR</a> which enabled me to bring my EarthBrowser back to the desktop. AIR has some *really* nice features that make EarthBrowser much more powerful than I imagined it could be in my last post. There is an integrated web browser, right within EarthBrowser 3.0 now. That is huge and you won't really understand how easy it makes things until you browse some geo-websites and drag and drop KML links right into your placemarks folder or look at the Wikipedia page for a city or country.</p><br /><center><img src="http://www.earthbrowser.com/blog/kilauea_med.jpg"/></center><br /><h4>Weather Datasets</h4><p>There are a lot of other nice features that you won't see in Google Earth or Microsoft's Virtual Earth. I've been creating a lot of real-time datasets generated from the <a href="http://www.noaa.gov/">NOAA</a> Forecast Models to give regions of rainfall, snowfall, humidity, temperature and many other measurements which are all animated across the globe with an intuitive time slider. Continental US doppler radar, earthquakes, volcanoes, webcams and many more datasets are all there and animated too.</p><br /><center><img src="http://www.earthbrowser.com/blog/precip_nw_med.jpg"/></center><br /><h4>Finally: KML Integration</h4><p>KML support in EarthBrowser 3.0 is really nice and intuitive. There is a <a href="http://www.panoramio.com/">Panarimio</a> KML file that allows you to see pictures from all over the world as you zoom in closer. You can download a KML or KMZ file directly within the embedded browser or drag and drop it from your desktop. EarthBrowser even has some extensions to the KML format that I felt were missing and greatly enhance the expressiveness of the format. But I'll save that for another post.</p><br /><center><img src="http://www.earthbrowser.com/blog/sandiego_fires_med.jpg"/></center><br /><h4>KML Mashup Tool</h4><p>EarthBrowser 3.0 has really been designed to be a KML authoring and mashup tool. If you want to save a single feature from a dataset, just drag a placemark icon from the globe right into your placemarks folder and it will make a copy. You can drag out any combination of items in your placemark folder onto a text editor to make a custom KML mashup file to post it on your own website or share it with your friends. Version 3.1 will extend EarthBrowser from your desktop to your website. It will be easy since it is based on Flash technology. A simple and seamless way of creating and distributing your personal or corporate geospatial content.</p><br /><h4>I'm Not a Machine, Or Am I?</h4><p>Is it possible for one man to compete with Google and Microsoft? Not really, and I'm not trying to. I want to make EarthBrowser an excellent tool for education, weather watching and KML authoring and have it be just enjoyable to use. Google and Microsoft are working hard to... hmmm... put buildings in... add more resolution... see star texture tiles and some other stuff. It takes a team of coders and a multi-billion dollar company to give this kind of software away for free. That's why I have to charge for it. I've spent countless sleepless nights and many evenings and weekends away from my family. I've gone into debt while sales of version 2 have dropped to almost nothing, trying desperately to get this new version done. I really have to thank my wife and children for their patience in allowing me to pursue the dream of owning my own business making virtual globes. Once sales pick up again with version 3, crossing fingers, I can focus on adding even more great features, but I'll talk about those later.</p>Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-39581515640535137562008-01-10T11:39:00.000-08:002008-01-10T11:52:23.781-08:00EarthBrowser 3.0 to be released soonIt's been hard keeping quiet about it for so many months, I'm really excited about all the great new features.<br /><br />Some of the major new features are:<br />- Supports 90% of KML<br />- US Doppler radar<br />- Rain/Snow/Temperature forecasts<br /><br />Version 3 is not just another 3d globe, but will revolutionize virtual globes for reason's that will be obvious when you first run it.<br /><br />If you are a customer and would like to participate in the Beta program, please drop me an email and state any relevant testing experience (not necessarily required, but helpful).<br /><br />Here is a small preview:<br /><img src="http://www.earthbrowser.com/blog/eb3preview.jpg" /><br /><br />That's all for now.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-28695715394238407092007-09-20T16:41:00.001-07:002007-09-20T16:46:00.930-07:00Fast Steradian Intersection CorrectionI just wanted to go back and mention that if the sum of the steradian angles is greater than 180 degrees, then due to the sine and cosine functions, the simple formula breaks down. However, we know that if the sum of the angles is greater than 180 degrees then by definition they intersect. Due to this, we should also store the steradian angle along with the angle sine and cosine.<br />So the revised intersection test algorithm becomes:<blockquote>angle_a + angle_b > pi or dot(normal_a, normal_b) >= cos_a*cos_b - sin_a*sin_b</blockquote><br />Not as pretty. A speedup for large coverages :-) but a slowdown for everything else... :-(Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-73363076063016748132007-09-20T16:40:00.000-07:002007-09-20T16:40:44.435-07:00Simplified GeoJSON proposalI've come up an extremely simplified GeoJSON example which can do everything that the current GeoJSON specification can do but with only 4 core elements. Every element is a feature and can contain a list of points, lines and polygons or other features. Everything else in the GeoJSON spec is pretty much taken from some OGC standard or another. It's important not to get caught up in the past we are at the beginning of a potential standard, as <a href="http://zcologia.com/news/573/rethinking-json-for-geospatial/">Sean said</a> in his post: "there's only one first chance to get a standard right." The only thing that I think might be questionably useful about this would be the nesting of features.<br /><br /><blockquote><pre>{<br /> "points":[<br /> [x0,y0], [x1,y1], ..., [xn,yn]<br /> ],<br /> "lines":[<br /> [x0,y0, x1,y1, ..., xn,yn],<br /> ...<br /> ],<br /> "polygons":[<br /> [<br /> [x0,y0, x1,y1, ..., xn,yn],<br /> ...<br /> ],<br /> [<br /> [x0,y0, x1,y1, ..., xn,yn],<br /> ...<br /> ],<br /> ...<br /> ],<br /> "features":[<br /> {<br /> "points":[<br /> [x0,y0], [x1,y1], ..., [xn,yn]<br /> ],<br /> "lines":[<br /> ...<br /> ]<br /> },<br /> ...<br /> ]<br />}</pre></blockquote><br /><br />Also an optional "crs" coordinate reference system can contain an EPSG code, ESRI WKT (Well Known Text) or a PROJ.4 projection string or all 3. If none is specified, the default is decimal degrees in the WGS84 datum. The coordinate reference system of the parent cascades down the to all children until a child specifies one.<br /><br /><blockquote><pre>"crs":{<br /> "epsg":"4326",<br /> "wkt":"COMPD_CS["OSGB36 / British National Grid...",<br /> "proj4":"+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"<br />}</pre></blockquote><br /><br /><br />Another useful item would be an optional "bounds" element that specifies the bounding envelope in the element's crs.<br /><blockquote><pre>"bounds":[min_lon, min_lat, max_lon, max_lat]</pre></blockquote><br /><br />Minimalistic and precise.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-78318943334335572912007-09-20T11:05:00.000-07:002007-09-20T11:05:56.716-07:00GeoJSON redux<a href="http://zcologia.com/news/573/rethinking-json-for-geospatial/">Sean Gilles has a post</a> responding to my call for a simplified coordinate representation in GeoJSON. His argument is that clarity of representation is more important that implementation overhead which I agree with to some extent.<br /><br />However, it seems to me that the reason that JSON is so much better than XML for many purposes is exactly that it *does* take into account implementation overhead, thereby making it easier to exchange internal data structures without the overhead of XML. <br /><br />For any sane implementation of JSON, the following must be extracted as a list of lists:<br /><pre class="literal-block"><br />[ [x1, y1, z1], ..., [xn, yn, zn] ]<br /></pre><br />So a list of 10,000 coordinates will give you 10,000 lists of 3 floating points each. Or 10,000 list structures and 30,000 floats. Each list takes time and memory to create and address and extract the elements out of. Whereas:<br /><pre class="literal-block"><br />[ x1, y1, z1, ..., xn, yn, zn ]<br /></pre><br />gives you the same 30,000 floats but only one list. A big win for any standardized JSON reading algorithm. Creating a custom, context sensitive JSON parser to ignore the structure is more than a little implementation detail.<br /><br />Strangely, after Sean argues against removing context information to improve clarity, he then requests just that. He suggests that the "type" element that describes what kind of GeoJSON element you are looking at be removed since it should be obvious from the type of request that you made to receive the GeoJSON content. What if one were to receive a set of files with various different sets of data, some single features, some feature sets and perhaps some just geometry elements? If you remove the type field from the geometry elements, how would you know what kind of geometry you have? You couldn't tell a Point from a Polygon without the type field.<br /><br />All that said, I do have another simplification for GeoJSON that is unrelated to the previous issues. How about we do away with the 'Point', 'LineString' and 'Polygon' geometry types. No really. They are just special cases of 'MultiPoint', 'MultiLineString' and 'MultiPolygon' with one element. I find myself writing code to take the special case single element entities and put them into the more general multi-element entities. That is code I would much rather not write since it introduces complexity and potential bugs. The only real difference in the two is the lack of a "Multi" and an extra set of an enclosing brackets.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-33163573565264178362007-09-19T09:40:00.000-07:002007-09-19T09:42:35.790-07:00Fast Steradian Intersection TestingI've come up with a pretty neat inclusion testing algorithm and I wanted to share it. The need is to test for inclusion of datasets within a camera view. Datasets are normally constrained to a certain area on the globe, but can cover the entire globe in some cases.<br /><br />The simple way to do this is to make a bounding box with longitude and latitude coordinates and then just do intersection testing from a view bounding box. However as you get farther from the equator, the bounding boxes get progressively more distorted and you can be either over or under inclusive in your datasets.<br /><br />My solution is to use <a href="http://en.wikipedia.org/wiki/Steradian">steradians</a>, or solid angles. All you need is a normal vector and an angle, four floating point numbers which is the same as a bounding box, actually I add another to speed up calculation but I'll explain that later. It performs uniformly anywhere on the sphere, and to specify global coverage you just set the angle to 180 degrees.<br /><br />Now all you need to do is to calculate the steradian coverage for a dataset, and one for the visible camera volume and you can do inclusion testing with just five multiplies, three adds and a compare. It may be a little more work than a bounding box intersection test, but not much more and I think that it is an acceptable tradeoff for the properties that it provides.<br />It's simple really, the dot product between steradian normals gives you cosine of the angle between them. Intersection is indicated by an angle less than the sum of each steradian's coverage angle, or:<blockquote>dot(normal_a, normal_b) >= cos(angle_a + angle_b)</blockquote><br />There is a nice formula for the cosine of a sum:<blockquote>cos(a + b) = cos(a)cos(b) - sin(a)sin(b)</blockquote><br />So if you store the sine and cosine of the angle rather than the angle you get:<blockquote>dot(normal_a, normal_b) >= cos_a*cos_b - sin_a*sin_b</blockquote><br />Simple, fast and effective. I haven't found a non O(N^2) algorithm to determine the minimum steradian on a dataset yet. It is fast and easy to use lat/lon bounding boxes, but you are going to have the same problems in higher and lower latitudes with over-coverage so it is best to calculate the minimum steradian for each dataset. At least you only have to do it once on static data.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-59587870010448631352007-09-19T08:51:00.000-07:002007-09-19T08:51:43.047-07:00libkml: wtf?So I <a href="http://highearthorbit.com/open-source-libkml-coming-from-google/">saw mention</a> that Google is soon to be releasing an open source library for the kml format.<br /><blockquote>Google will be releasing an open-source KML library in C++ that implements and tracks the standard as it progresses.</blockquote><br />I can see two intended audiences for this library; kml content creators and content consumers. I just don't think it makes sense for either of them. For kml creators, why would you need to interface with a C++ library in order to create kml files. The answer is, you shouldn't need to. It's kind of like <a href="http://blog.earthbrowser.com/2007/07/reviews-django-css-jquery-and.html">my post on Dreamweaver</a>, if you know what you are doing it just gets in the way and if you don't know what you are doing it is way too complex. A C++ library seems like overkill to write out some xml text. I guess it could keep track of external and document-wide styles? Big deal.<br /><br />If you are a kml consumer then it makes a little more sense to use a library in C++, but not much more. Using external libraries requires you to build a bridge between your code and the library concepts. So the libkml will be dictating what types of entities you support and how they are interrelated within your code. This is restrictive on how you would develop your internal classes by forcing you to make a class structure identical to the libkml structure or you could try to build a conceptual bridge between your internal structure and the libkml structure in order to be compatible. Once you have either one, why would you need an external library just to parse the XML entities.<br /><blockquote>By providing a reference library it allows developers to more easily keep up to date with KML without having to maintain their own library and track standards changes.</blockquote><br />So developers won't have to support any changes in the standard if they are using libkml? I guess it sounds more like it's for the kml content producers.<br />I guess an alternate explanation is that they are trying hard to make it seem like the standard will be truly open. Of course I'll take a look at it when it comes out to see what it's all about, but the whole concept seems like an exercise in futility.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-14023414583905848732007-09-17T10:15:00.000-07:002007-09-17T10:24:16.853-07:00JSON beats XML, some comments on GeoJSONI've been setting up some new data services and after experimenting with formatting my data in <a href="http://json.org/">JSON</a> (Javascript Object Notation) and I'm hooked. Programming mostly in C++ has made XML the easiest data format to use but I'm very unhappy with the hurdles that one must go through to go from XML to the internal representation of the data. I've been doing a lot of Javascript and Python programming lately and am just blown away by how easy it is to create, maintain and share data through the JSON format. <br /><br />For XML, on the server end one would take an internal data representation in Python and create custom classes to format each data item with the appropriate XML tag, convert it to a string and output the XML tree. Not too hard if it is a relatively shallow dataset without too much data nesting. On the client end, you would write classes that would decode the tree structure of the tags with full knowledge of each tag's data type (string, integer, floating point, etc...) and create a new data structure to mirror the server side data.<br /><br />For JSON, you take your data structure, usually a dictionary structure with a name associated with a value, dump it directly to JSON with a single procedure call and save it to a file. On the client end, you load the data directly into a similar data structure with a single call. No special decoding classes needed, no XML tag data types (string, integer, float) to have foreknowledge of.<br /><br />I've been looking at the <a href="http://www.geojson.org/">GeoJSON</a> specification and it looks pretty nice and but with a few caveats. Say you have a LineString feature type, the coordinates are a list of lists which contain 2 coordinate elements (longitude and latitude). This is extremely space and processing time inefficient, which is very important for me with large datasets. I suggest using the standard single list of coordinates like is done in all other formats like GML and KML. Also it would be nice if there were some sort of feature style information specified like color, line width, line style and placemark icons.<br /><br />I'll definitely be using my modified GeoJSON format when I return to C++ programing for EarthBrowser v3 soon. Sorry XML, please don't feel bad. It's not you, it's me. I just feel like we need a little space.Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.comtag:blogger.com,1999:blog-21167013.post-55988813864654010262007-09-11T08:58:00.000-07:002007-09-11T08:59:04.177-07:00The Economist snubs EarthBrowserAmongst <a href="http://www.economist.com/search/displaystory.cfm?story_id=9719045">yet another "gee whiz" article</a> about the "geoweb," it is claimed that: 'Keyhole, an American firm, released the first commercial “geobrowser” in 2001.'<br /><br />I guess it's too much to ask for a magazine to research each claim made in each article, but <a href="http://www.earthbrowser.com/">EarthBrowser</a>, then called <a href="http://web.archive.org/web/19981202223741/www.lunarsoft.com/PlanetEarth.html">Planet Earth</a>, was the first commercial "geobrowser." It predated Keyhole's existence by several years. In fact someone from Keyhole contacted me back then and inquired about purchasing the earthbrowser.com domain name, the EarthBrowser trademark and my customer list. The amount they offered was laughably low considering EarthBrowser had over 2 million downloads and sold over 20,000 copies by then.<br /><br />On a different note, several months ago I alluded to working on a new project that was a bit of a diversion from the next great OpenGL version of EarthBrowser. <a href="http://blog.earthbrowser.com/2007/03/project-kraken-and-earthbrowser-circa.html">Project Kraken</a> is nearing completion now and it has become better than I'd imagined it could be. It's been hard not blabbing all about it on the #worldwind or #planetgeospatial irc rooms to get useful feedback, but I've restrained myself.<br /><br />Here is some newly declassified information about Project Kraken:<br /><ul><li>It will be released within the next 30 days</li><li>There will be a free version</li><li>It is easily customizable</li><li>It will compete for mindshare with Google Earth</li></ul>Matt Gigerhttp://www.blogger.com/profile/08948284981378368476noreply@blogger.com