The application of DEM occupies a very important position in the three-dimensional performance of WW, which is as important as image data. Fortunately, the image and DEM loading and processing principles are almost consistent, for the WW GIS three-dimensional development is a good thing to understand any one, another kind of analogy! The previous article, mainly from the function of a simple introduction, this article will be from the code level analysis of WW built in the Srtm DEM data loading and application, the next story from two development perspective on how to deal with, configure their own image and DEM data. Oh, because the DEM part is very important, and is the vacation period I also have the time, strives for the article to be splendid!
Two abbreviations: Because these two abbreviations often appear, know is what abbreviation, don't feel mysterious!
Srtm:the Shuttle Radar Topography Mission (SRTM) obtained elevation data on a near-global scale to generate the most compl ETE high-resolution digital topographic database of Earth. SRTM consisted of a specially modified radar system that flew onboard the spaces shuttle Endeavour during an 11-day mission In February of 2000.
Nlt:nasa Learning Technologies.
I start from BMNG.cs as an example to study the use of DEM, of course, the study of tile image should start from, but today's image is not our focus. Now officially into the theme, with me to analyze and learn the code bar!
The code in the BMNG.cs class 144 row constructor,
Worldwind.nltimagestore imagestore = new Worldwind.nltimagestore (String.Format ("Bmng.topo.2004{0:d2}", I + 1 ), "http://worldwind25.arc.nasa.gov/tile/tile.aspx");
Imagestore.datadirectory = null;
Imagestore.levelzerotilesizedegrees = 36.0;
Imagestore.levelcount = 5;
Imagestore.imageextension = "jpg";
Imagestore.cachedirectory = String.Format ("{0}\\bmng\\{1}", M_WorldWindow.Cache.CacheDirectory, Stri Ng. Format ("bmng (Shaded) tiled-{0}.2004", I + 1));
IAS = new WORLDWIND.IMAGESTORE[1];
Ias[0] = Imagestore;
M_quadtilelayers[0, I] = new WorldWind.Renderable.QuadTileSet (
String.forma T ("tiled-{0}.2004", I + 1),
M_worldwindow.currentworld,
0,
-90, -180, 180,
True,
IAS);
The NltImageStore.cs, Quadtileset class in Bmng. This is the object of our attention.
Quadtileset inherits from Renderableobject, is the object class to draw the render.
Focus on its 562-line update () method, 517 line Initialize () method, and 701 line render () method.