Page 1 of 4 1234 LastLast
Results 1 to 10 of 31
  1. #1
    Junior Member
    Join Date
    Mar 2005
    Location
    New Zealand
    Posts
    12

    Default

    (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.
    Last edited by m_k; 08-16-2006 at 09:45 PM.

  2. #2
    God. Root. What is difference? TomServo's Avatar
    Join Date
    Sep 2004
    Location
    Eastern Pennsylvania
    Posts
    2,823

    Default

    Impressive. You should add this to the wiki USers Doc to the "creating add-ons" section.


    Earth is Square blog

    PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this forum post, in any manner whatsoever, will increase the amount of disorder in the universe. Although no liability is implied herein, the consumer is warned that this process will ultimately lead to the heat death of the universe.

  3. #3
    Cosmic laser
    Join Date
    Sep 2004
    Posts
    2,984

    Default

    Have a pin, nice topic, thanks.
    Donate to support your community!
    Please donate if you can – every donation helps improve World Wind

    World Wind Central – FAQs, Hotspots, Wiki and more…READ before posting!


    Need to upload files? Use my free 50Mb uploader!
    Or, how about some web hosting or web design?

  4. #4
    Cosmic Overlord bull's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    2,344

    Default

    Very nice, you have made the rest of us add-on developers look lazy though 😛 Once its on the wiki I'm sure some of us will add to it.
    Bull_[UK]

    ooo00 Bullsworld.net 00ooo

    ooo00 Fighting for my Rights 00ooo


  5. #5
    Junior Member
    Join Date
    Mar 2005
    Location
    New Zealand
    Posts
    12

    Default

    Originally posted by bull@Mar 26 2005, 10:45 AM
    Once its on the wiki I'm sure some of us will add to it.

    Where is the wiki? Can you post a link?

  6. #6
    God. Root. What is difference? TomServo's Avatar
    Join Date
    Sep 2004
    Location
    Eastern Pennsylvania
    Posts
    2,823

    Default

    wiki.worldwindcentral.com


    Earth is Square blog

    PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this forum post, in any manner whatsoever, will increase the amount of disorder in the universe. Although no liability is implied herein, the consumer is warned that this process will ultimately lead to the heat death of the universe.

  7. #7
    Senior Member
    Join Date
    Dec 2004
    Posts
    327

    Default

    [
    This document is designed to explain how you can create your own custom data in World Wind 1.3.

    Using your method, I managed to construct MY world, by downloading the earth map
    you indicated.
    This was a great vehicle to test any new layers I made, before moving the xml files
    to the "real" worldwind. Any jpeg or png can be layered this way.

    The screenshot shows a CMAP layer of Seattle, stretched on top of the NLT image.
    We need some sort of utility to stretch the ortho layers, accurately and simply.
    I think they do it in the Keyhole program.

  8. #8
    Senior Member
    Join Date
    Mar 2005
    Posts
    111

    Default

    Don't suppose anyone has figured out how to get the terrain mapping to work?

    Without Terrain Mapping, is it possible to overlay an image over existing WW imagery?? See attachment.

    In this case I have a 1950 aerial of Oakland and set the DistanceAboveSurface to 20. Wherever the elevation is above 20, the underlying WW imagery overrides my 1950 aerial.

    And…even if we could get Terrain Mapping to work, would we be able to overlay a high resolution image over an existing WW high resolution image?? Doesn't look like WW handles multiple high resolution images loading at the same time too well. I think what it's lacking is some kind of layer priority that can be manually assigned so that one layer will have priority over another. Right now they kind of mix together showing bits and pieces of both.

    Matt
    Attached Images Attached Images

  9. #9

    Default

    Was asking myself how to add a custom image layer like Blue Marble but home made with my own data. Do you think that it would be possible to integrate my orthophoto database as it's tiles by 1kmx1km with a resolution of 1000×1000? Each tile corresponds to a 1km² in Lambert II etendu (French projection). Will I have to rebuild a complete set of images?

  10. #10
    Senior Member
    Join Date
    Mar 2005
    Posts
    111

    Default

    Originally posted by Gaby@Mar 31 2005, 10:30 AM
    Was asking myself how to add a custom image layer like Blue Marble but home made with my own data. Do you think that it would be possible to integrate my orthophoto database as it's tiles by 1kmx1km with a resolution of 1000×1000? Each tile corresponds to a 1km² in Lambert II etendu (French projection). Will I have to rebuild a complete set of images?
    You'd just have to manually enter all the information in the XML file for each image. Also, not sure what effect the different projection would have. WW only uses the lat/lon of the four corners so I assume images need to be in a geographic projection?? Or maybe WW has a default projection that it uses. Not really sure. At 1km x 1km images, the error might not be that noticeable. The image I imported above of 1950 Oakland was reprojected into Geographic coordinates and seems to have worked.

    Matt

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. WW mentioned in article
    By KoS in forum WorldWind General
    Replies: 5
    Last Post: 01-18-2006, 04:23 PM
  2. Georeffed data layers – how?
    By radhock in forum Power Users & Educators
    Replies: 9
    Last Post: 01-09-2006, 01:19 AM
  3. Share your cached LandSat7 data HERE!
    By Deckard in forum WorldWind General
    Replies: 68
    Last Post: 07-24-2005, 01:52 PM
  4. How to prevent downloads of bad data?
    By Matthias Basler in forum Technical Support
    Replies: 4
    Last Post: 04-16-2005, 09:42 PM
  5. Unofficial FAQ
    By Llynix in forum WorldWind General
    Replies: 12
    Last Post: 09-27-2004, 01:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •