am the host of “.NET Rocks”, an Internet audio talk show for .NET developers online at www.dotnetrocks.com and msdn.microsoft.com/dotnetrocks. My co-host Richard Campbell and I interview the movers and shakers in the .NET community. We now have over 100 shows archived online, and we broadcast a new show live toward the end of every week and make them available for download (with podcasting support) on the following Monday.
Show #102 was an interview with a developer team at NASA who created a .NET-based Windows Application called World Wind for visualizing geographic data in a managed DirectX 3-D (heh) World. This was an incredible interview with some very bright people using .NET in an extraordinary way.
Chris Maxwell is a developer at NASA, and the lead on the World Wind project. Randy Kim is a graphics specialist at NASA who developed the user interface for the World Wind project.
Correction! There was a typo in the March/April installment of this series. Spring.NET was incorrectly described as Swing.NET. Swing is a totally separate project from Spring.
Carl Franklin: So for the totally uninitiated, why don’t one of you tell us what this is?
Randy Kim: Okay. World Wind is an educational piece of software that’s designed to be a 3-D visualization tool, so that’s just a fancy word for saying that it’s a 3-D globe. And the idea is that I can go anywhere in the world, zoom up to any place, I can see it at any angle, and if necessary, I can switch to the different data set that’s available out there, so I can see anything that satellites see?aerial photography or many of the other different products that are published by NASA within this tool.
Carl Franklin: Yeah, that is an under statement. This is a sort of an extensible, pluggable viewer. How many different views do you have built into the product?
Randy Kim: I would say maybe eight or ten. The trouble with answering that question is that we’re always hunting for different sources of data and every time we find one, we kind of jump on it and try to find a way to squeeze it into World Wind.
Geoff Maciolek: I have a question. Where is all this data coming from?
Randy Kim: Okay, the majority of this information such as the Land satellite information that we see or the MODIS information, (they are full of acronyms). The majority of it comes from the different centers located across NASA. Sometimes it can come from Goddard, and sometimes it can come from us. The other sources of data that we grab are, for example, the USGS Topographic information and black and white aerial photography. You can grab that. That actually comes from Microsoft’s TerraServer.
Carl Franklin: Interesting.
Richard Campbell: Really, the TerraServer data.
Randy Kim: Yeah, that’s right, the information that comes off there. We can borrow it because they are based on all these established standards and it was almost no effort to actually bring it into World Wind.
Richard Campbell: Wow, fabulous.
Carl Franklin: So, I take it a lot of this data you are pulling down with Web services and first of all we should say this is a .NET application?that’s why we are so fascinated by it.
Richard Campbell: And you’ve got to tell us, C# or VB?
Randy Kim: Okay, I’ll let Chris answer this one.
Chris Maxwell: Definitely C#, I don’t know any VB.
Carl Franklin: Are there any developers besides you, Chris?
Chris Maxwell: I guess I am the only full time programmer behind this, but we do have another part time programmer who spends a little bit of his time on this and now recently, in the last few months, we have quite a few developers from the open source community and they have been contributing quite a lot of code, too.
Geoff Maciolek: So this is an open source project?
Chris Maxwell: Yeah. All open source and we don’t make any real reservations to it.
Carl Franklin: So back to the data question Chris or maybe Randy?I don’t know, but you are utilizing Web services a lot to pull the data. I mean, I know you are doing that with TerraServer, but other sources of data? Is the rest of the world as hip to Web services as Microsoft is?
Randy Kim: Oh, well, lets see. We use a standard called WMS and that is entirely based on the concept of Web services that we have. We get hold of the server, grab the data off it, and import into our application. Because [with] a program like World Wind, even though it’s kind of big right now, it’s totally impossible to fit all of that information on a CD or DVD or even 100 DVDs. We always have to go out and grab the hard information.
Geoff Maciolek: How do you determine like what kind [to grab]? I noticed the download was in excess of 150 MBs. How do you determine what’s included in the application like?what makes up that 160 MBs versus what you pull down over the network?
Randy Kim: That’s a good question. The actual program itself is not that big?[it] may be around a megabyte or so, but we wanted to throw in a lot of default information both for technical reasons and for something to get started off of. For example, when the server was unavailable you wouldn’t see a really fuzzy globe.
Richard Campbell: Like just the Blue Marble set, I imagine is that kind of the minimum data.
Carl Franklin: Chris, do you realize like how God like you are to our listeners? I mean this is just insanely awesome.
Chris Maxwell: That makes me feel good because this is actually my first software project.
Carl Franklin: What?
Geoff Maciolek: What?
Carl Franklin: You got to be kidding me, really?
Geoff Maciolek: Nice start.
Chris Maxwell: I graduated from San Jose State three years ago and this is my first, I guess, “real job,” and then my first real programming job, at least.
Richard Campbell: Well, your biggest problem is going to be topping this.
Chris Maxwell: That’s what my boss keeps telling me.
Carl Franklin: This is incredible. Now you guys have obviously seen Keyhole, right? So Keyhole is like this thing that you pay for and they really only have like one or two sources of data.
Randy Kim: Actually they have whole variety of different data sources, but what they have done is that they have compiled it all together.
Richard Campbell: I’ve always thought it was very predominantly US-oriented, Keyhole. As you know, Google bought them.
Geoff Maciolek: Google bought something, what else is new?
Richard Campbell: Yeah I know.
Carl Franklin: It’s just amazing being able to get a sense of the size of the earth by zooming in at a constant speed and seeing how long it takes to actually recognize something on the ground. It’s really insane. God, I love this program!
Richard Campbell: While you turn on the long lap indicator and you get the altitude meter, you know how high up you are.
Geoff Maciolek: Yeah I have to say that, to put the Keyhole thing to rest, [that] Keyhole, not to say anything bad about Keyhole, [because] their product is very nice. They have this thing that’s geared towards corporations and stuff, but [their] level of flexibility, it’s orders of magnitude below what the World Wind has. And the interface, I think in Keyhole, is a lot more cumbersome.
Carl Franklin: Yeah, the interface is simple.
Randy Kim: I don’t want to get on anyone’s nerves out there.
Carl Franklin: The interface to Keyhole is simple and it’s really made to be model of simplicity, but there is so much stuff behind World Wind that I didn’t get until I actually started playing around with it. Like with Keyhole, all of the data just comes right in when you zoom in and it’s all like aerial photography, and so if you don’t turn on that feature in World Wind, you don’t see it, but that’s because there [are] a lot of other views also, and why pick just one? And then there are animations.
Geoff Maciolek: Yeah that [is] something that I was playing around with earlier. Richard actually found this when he was messing around with the program. He went and looked at the South Pole and was under, what is WMS under? Oh Jeez! I am going to have a heck of a time finding this now.
Richard Campbell: It was a little Cryosphere with the big icebergs sliding around.
Geoff Maciolek: Yeah! There is this phenomenal video of that giant iceberg in Antarctica that detached and it’s been wrecking havoc on the wildlife down there because they are having a harder time getting out to the ocean, and it’s just amazing, because once you play this animation and I guess with a lot of the other layers too, you can adjust the opacity. So you can actually see what everything looked like before and after, with and without this video on top. It overlays the date of everything. The amount of information just in this one layer is mind blowing. And Richard pointed out that when you start playing it, it downloads on the fly, and once it’s got two frames, it plays the two frames, and when it’s three frames and it plays the first three frames, it doesn’t make you wait?it’s almost instant gratification.
Randy Kim: Yeah, this sounds like the feature we have in World Wind called NASA SVS, which is stands for scientific visualization studio. We gave a group over in Goddard and they specialize in actually developing these really cool videos that demonstrate all of this wonderful educational material. And a lot of what they develop is based on animations and different projections and so on. But what we are able to do is borrow their stuff and we can place it in our World Wind, and then we can see it in the context of World Wind.
Richard Campbell: Yeah that’s the big difference here. It visualizes the whole thing in it…I guess that you want to talk about a distinction between Keyhole and World Wind. There is definitely an educational bent to World Wind looking at stuff other than just cities.
Carl Franklin: Right and look, try and find my house on a map.
Geoff Maciolek: Yeah the thing that I think is totally cool?I am watching this video and for the first time I have actually zoomed way, way out. I have the entire southern hemisphere visible on my screen now and you get a sense of scale. That would be impossible, literally impossible to present, with any kind of normal video media. Even if you say this is 15 kilometers long, this is a 150 kilometers long, this is however many square kilometers, or whatever. There is nothing that comes even close to being able to use my mouse wheel [to], scroll in, look at this long island size piece of ice, and scroll out and say, “Oh wow! There is long island. It really is a long island, but this is how big the thing looks relative to all of the Antarctica.”
Carl Franklin: This MODIS thing?let’s talk about that for a minute because this is essentially linking up events?historical events and all kinds of earth-related, weather-related (or what have you) [events] and you can actually see them and watch them. The Tsunami was pretty incredible, that sort of caught me by surprise. I was spinning around the globe and I saw this white thing that looked like a hurricane and, zooming in, I just accidentally right-clicked on it and then I had some more information on a Web page somewhere. I just love that interface. That’s great.
Randy Kim: Yeah, the MODIS project I guess is called the Moderate Resolution Imaging Spectroradiometer. It’s actually what we refer to as two different satellites called Terra and Aqua and what they do [is] revolve around the earth every day. And what’s neat about it is that they transmit more than just visual images of the earth every single time. They can see in spectrums that we might not normally be able to see such as the infrared spectrum and so on. What happens is that they archive all of this wonderful information on their site at Rapid Fire MODIS. And what we have been able to do is write a wrapper to actually grab that information and place it within World Wind.
Richard Campbell: When we were looking at Vancouver in close detail and Geoff suggested [that we] flip to the false color bands, and suddenly there is a whole other set of data there. We could see the dredging in the rivers. It came out very clearly?I don’t know how else you could ever see something like that.
Randy Kim: We are able to play around with the colors. It brings different features out of the earth such as vegetation, and we [could] see the temperature and the altitude. We can see different things and consistencies throughout, depending what we are looking at.
Carl Franklin: Okay, so can we start talking about the program? I have just got a couple of things to throw out there and this is an open-ended question, but I want to know how you deal with large blobs of memory and garbage collection. I mean, are you using the standard dispose/finalize patterns or do you have something else up your sleeve? Because obviously you are dealing with a lot of data coming and going very quickly.
Chris Maxwell: Yes. I guess it’s kind of like two categories of memory in terms of what World Wind uses. There is, I guess, the RAM for the system and then there is a RAM on the graphics card, and in both categories we use the dispose method in the Framework.
Carl Franklin: So this is managed DirectX?
Chris Maxwell: Yeah, managed DirectX.
Geoff Maciolek: So that’s interesting. I’d actually never thought about that before when you are dealing with managed DirectX and you are doing 3D rendering like this. You actually have to take into account what textures you have loaded in to the memory on your video card, [plus] unloading that stuff and handling stuff like that?
Chris Maxwell: Yeah, actually you have to?I guess when you like allocate your normal array of objects just as in a normal application, generally you don’t have to call Dispose or anything like that on the edge. It’s just kind of automatically freed by the Framework. For the managed DirectX stuff, as far as textures are concerned, I guess they get loaded onto the graphics card and then you have to call Dispose in order to get them off, otherwise they stay there.
Carl Franklin: Now do you ever invoke the garbage collector Collect method yourself, or do you just let the GC do its thing?
Chris Maxwell: I never specifically called that.
Carl Franklin: Yeah, I mean, I don’t see any kind of bonks with the GC sort of slowing down anything, although I wouldn’t know if it was the GC. But Richard, have you experienced [this], because I know that was an issue with the first framework.
Richard Campbell: No, not really, because the machine I am running it on is a horsepower monster too, so it just loves this.
For more information, listen to the entire interview.