(Other useful links:
http://www.worldwindcentral.com/wiki/Dstile_howto
http://www.worldwindcentral.com/wiki/Making_Layers
http://www.worldwindcentral.com/wiki/Creating_add-ons
edited by m_k)
With World Wind you got your hands on a pretty powerful and flexible map viewer. It is also very open which means that you can create your own maps, add detail to existing maps and even create entire new worlds. I found there was very little information for newbies such as me so I decided to write this document after I was helped by some of the more experienced members on this board.
This document is designed to explain how you can create your own custom data in World Wind 1.3.
World Wind structure
Let’s first have a look at how World Wind organizes its data.
World Wind Worlds
World Wind organizes it’s data in separate "Worlds" The world provided when you do a new install is "Earth" but you can download other worlds such as the Moon, Mars and even the Starwars "Death Star". World Wind can be told to load a specific world when it starts up.
World Wind can be started with the following command line parameter:
"C:\Program Files\NASA\World Wind 1.3\WorldWind.exe" worldwind://goto/world=MyWorld
This instruction will start World Wind and make it load the MyWorld world (That is of course if you created one. More about this later)
The "worldwind://goto/world=MyWorld" part is in fact a URL. You can write a webpage with a hyperlink like:
Start MyWorld If you would click on that link World Wind would start and load MyWorld.
On you own PC it is easier to create a shortcut to WorldWind.exe and add "worldwind://goto/world=MyWorld" as a parameter.
World Wind can only show one world at a time.
The World Wind file system
Open the World Wind 1.3 folder. You can find it on your hard disk under Program Files\NASA\World Wind 1.3.
In this folder you should see several sub folders.
Add-ons Contains Add ons for various worlds
Cache Holds a copy of all data downloaded from the Map servers so it doesn’t need to be downloaded every time.
Config Holds configuration data for the worlds stored on your PC
Data Holds local data for various worlds
Each of these folders has a sub folder for the various worlds you may have downloaded.
How to create a new world
Let’s create a brand new world of our own and do some experimenting. Every world starts as an XML file in the Config folder. It is common that all other config files for a world are stored in a sub-folder under Config with the same name as the world name. When World Wind is started with the "worldwind://goto/world=MyWorld" parameter then it will try to find the MyWorld folder under Config.
Let’s create the World XML file for MyWorld called MyWorld.xml (This file must be placed in the config folder)
Create a file called MyWorld.xml in the Config folder with the content as below (Use Notepad to create it)
<?xml version="1.0" encoding="UTF-8" ?> <!– edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Patrick Hogan (private) –>
<World Name="MyWorld" EquatorialRadius="1737400" LayerDirectory="MyWorld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="WorldXmlD escriptor.xsd">
<TerrainAccessor Name="MyWorld">
<TerrainTileService>
<ServerUrl></ServerUrl>
<DataSetName></DataSetName>
<LevelZeroTileSizeDegrees></LevelZeroTileSizeDegrees>
<NumberLevels></NumberLevels>
<SamplesPerTile></SamplesPerTile>
<DataFormat></DataFormat>
<FileExtension></FileExtension>
<CompressonType></CompressonType>
</TerrainTileService>
<LatLonBoundingBox>
<North>
<Value>90.0</Value>
</North>
<South>
<Value>-90.0</Value>
</South>
<West>
<Value>-180.0</Value>
</West>
<East>
<Value>180.0</Value>
</East>
</LatLonBoundingBox>
<TileResolution>129</TileResolution>
</TerrainAccessor>
</World>
Not a clue what most stuff is for and I will add information as I find out. Just accept that you need this stuff. Let’s see, the significant tag is <World> it contains a "Name" attribute where you can enter the name of your world. "MyWorld" in our example case. The next attribute is "EquatorialRadius" it is expressed in meters (I think) and defines the size of the world. The "LayerDirectory" contains a reference to the folder that will contain the layer instructions. Set this value to "MyWorld" because we want to create a "MyWorld" folder under the config folder.
Now, to be perfectly blunt, I have no idea what the rest of the tags are for. I tried to dump them but World Wind doesn’t like that so I keep them as they are. It works so why tinker with a good thing.
Create a new folder called "MyWorld" under Config
Now we need to create a text file containing instructions on what is to be displayed in MyWorld. The format of this file is XML. This is a notation similar to HTML used for web pages. World Wind has a range of tags in XML that will allow you to control how layers of maps are displayed on your globe.
Let’s dive straight in and look at a simple instruction file called mine1.xml
Create a file called mine1.xml in the MyWorld folder with the content as below (Use Notepad to create it)
<?xml version="1.0" encoding="UTF-8"?>
<LayerSet Name="mine1" ShowOnlyOneLayer="false" ShowAtStartup="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\WorldW ind\bin\Debug\Configuration\EarthLayers\ LayerSet.xsd">
<ImageLayer ShowAtStartup="true">
<Name>MyLayer1</Name>
<DistanceAboveSurface>0</DistanceAboveSurface>
<BoundingBox>
<North>
<Value>90</Value>
</North>
<South>
<Value>-90</Value>
</South>
<West>
<Value>-180</Value>
</West>
<East>
<Value>180</Value>
</East>
</BoundingBox>
<TexturePath>C:\MyFile.jpg</TexturePath>
<Opacity>255</Opacity>
<TerrainMapped>false</TerrainMapped>
</ImageLayer>
<ExtendedInformation>
<ToolBarImage>Data\Icons\Interface\MyWor ld.png</ToolBarImage>
</ExtendedInformation>
</LayerSet>
Dont worry about the first line. Just make sure it is the first line of your XML instruction file.
The Layerset
The first significant tag is the "LayerSet" this is a grouping mechanism that allow you to place several layers under one layer set. Layersets are significant because they can be turned on or off via the layer manager. The "Name" attribute allows you to name your layerset. This name will appear in the World Wind layer manager where you can turn the layerset on or off. The "ShowOnlyOneLayer" attribute is set to false. I have no idea what this tag does and once I find out I will update this section. For now just leave it set to false. "ShowAtStartup" defines the default state. Is this layerset going to be on or off when you load this world. Typically this is set to true.
At the end of the layerset you can find the <ExtendedInformation> tag. LOOK OUT! if you are running version 1.3 then you will need a <ExtendedInfomation> tag. This has a spelling error because the "r" is missing. Subsequent version have this spelling error corrected. I know only one thing you can do with this tag and that is the addition of a toolbar icon. The <ToolBarImage> tag contains a reference to a png image that represents your toolbar icon. Clicking the icon will toggle the visible state of the layerset. The bitmap must be in PNG format. I tried BMP but that doesn’t work.
The Layer
Layerset’s are nothing unless they contain layers. The layer is the thing that does the actual work. The Layer is identified by the <ImageLayer> tag. Again you find a "ShowAtStartup" attribute. I have no idea how a layer inside a LayerSet is turned on or off so just set this value to true. Next the Name Tag. I suppose this name is used somewhere but I still need to find out what the significance is of this name. Now the fun bit <DistanceAboveSurface> defines how high your layer is shown above the globe surface defined in MyWorld.xml under the "EquatorialRadius" attribute. This offset is defined in meters (I think) and can be positive and negative. This enables you to have cool stuff like cloud layers floating above the surface. In this example I set the offset to because I want my bitmap to go right onto the globe’s surface.
Latitude Longitude explained
Basically the Equator is the belt around the fattest part of our globe. This is Latitude of 0 degrees. Moving closer towards the North pole increases the Latitude value reaching 90 when smack bang on top of the North Pole. You can’t go higher. Going south of the Equator the Latitude decreases to -90 when you reach the South Pole.Further South is not possible. The Longitude is a bit more arbitrary. Some dudes in the past decided that a imaginary line drawn from the North Pole to the South pole crossing a certain spot in Greenwich was considered the 0 degree Longitude. The longitude increases when traveling east and decreases when traveling west. Since the globe is only 360 degrees to go around it you can figure that you can only go half of that West and half of 360 East before you reach the other side of the globe. Therefore a Longitude can not be greater than 180 or less than -180. Any location on the world can be pin pointed by a combination of Latitude and Longitude value.
The <BoundingBox> section defines where on the globe your layer is displayed. It uses Latitude and Longitude parameters. North and East are positive values while South and West are negative values. Basically following a standard YX grid where top and right are positive. you will need some knowledge about Latitude and Longitude concepts and what values they can be. The Bounding box contains North, South, East and West values that define the outer limits of the Layer. These values can be expressed in Decimal degrees (Such as 34.5234256) and therefore allow very accurate placement of a layer. The bitmap that is used for the layer will be stretched to fit the given layer area. The bounding box values above will wrap your layer all the way around the globe.
The <TexturePath> tag identifies the bitmap file that is used for the layer. This bitmap can be a JPG, BMP file or DDS file (Whatever that is). I know it won’t do GIF files but maybe it does other common file formats as well. It is a pretty good renderer because it managed to handle JPG files of 8000 x 8000 pixels in my experiments. Just pick a JPG file that happens to be lying around on your system. Unfortunately the program doesn’t let you link to on-line bitmap resources directly like: http://www.oera.net/How2/PlanetTexs/…_2500x1250.jpg
The <Opacity> tag is a pretty useful one. You could create a cloud layer and place it above the globe surface (<DistanceAboveSurface>4000</DistanceAboveSurface>) and make it 50% transparent by setting the value to 128. A value of 0 is fully transparent and 255 makes the layer opaque. I found the Opacity very useful when lining up layers with other layers because you can see other references through the layer.
<TerrainMapped> can be set to true or false. Apparently Wo
rld Wind would render your layer on top of the elevated terrain when set to true. So far I have not been able to make this work. I would imagine that the <DistanceAboveSurface> tag is ignored when <TerrainMapped> is set to true.
So there it is. If you run World Wind with the worldwind://goto/world=MyWorld parameter as in:
run the program like: C:\Program Files\NASA\World Wind 1.3\WorldWind.exe worldwind://goto/world=MyWorld
Now you should see your chosen bitmap wrapped around the globe. You can have multiple layers in a layerset each with their own bitmap so it is possible to arrange Orthophoto’s that way or even your digital photo collection. How’s that for a fancy photo album!
Based upon this knowledge it should be a lot easier to start tinkering with the existing Earth worlds. Make sure you backup your files before mutilating them.

Reply With Quote
