NAS Installation and Configuration

These instructions describe how to install, configure and run a World Wind WMS server to serve World Wind’s basic imagery and elevations from a network attached storage device. Such a device loaded with World Wind’s basic imagery can be obtained by contacting the NASA World Wind Program Manager, Patrick Hogan, at [email protected].

  1. Connect the Device

  2. Unpack the NAS device and attach it to your network. Follow the manufacturer’s instructions to connect the device to the host computer. Note the mount point of the device. You’ll need to enter this into a WMS server configuration file in step 3 below. The default mount point when connected to an OS X computer is /Volumes/data. On Windows the mount point will be the letter drive you associated with the NAS device followed by “data”, as in “Y:\data”.

  3. Install the WMS Server

  4. See the WMS server installation instructions to learn how to install the server. Those instructions also describe how to run the server, but do not start the server now. The server must be configured first.

  5. Configure the WMS Server

  6. Before the server runs, it must be configured with two essential pieces of information: the mount point of the NAS box and its data, and the URL that clients will use to access the WMS server.

    Configure the Data Location

    The server’s WEB-INF directory contains a file named wms.DataFileStore.xml. This file indicates data locations to the server. It’s consulted only at start-up, so if it’s ever changed, the server needs to be stopped and re-started in order to detect the changes.

    Edit the wms.DataFileStore.xml file to indicate the data location on the NAS box using a path on the host computer by entering a line similar to the following after the comment in the file that says, “You can install your own read locations here”:

    location property="" wwDir="/Volumes/data" isInstall="true" isMarkWhenUsed="false"

    The emboldened text above must be replaced with the path to the NAS mount point on the host machine. The one given above is typical for OS X. On Windows it might be something like Y:data. The actual mount point is the one configured in step 1 above.

    Save the edited wms.DataFileStore.xml file.

    Configure the WMS Server Location

    The server’s WEB-INF directory also contains a file named wms.config.xml. This file indicates many properties of the WMS server, but the only ones that must be changed are the “OnlineResource” entries, which identify the server’s base URL.

    Edit the web.xml file to indicate the server URLS. There are two entries:

    property name="gov.nasa.worldwind.avkey.Server.Capabilities.OnlineResource" value="http://localhost:8000/wms?"

    and

    property name="gov.nasa.worldwind.avkey.Server.RedirectTo" value="http://localhost:8000/wms?REQUEST=GetCapabilities"

    Set the host component of the URLs of these properties to the URL of the WMS server’s host. This URL is the one that clients will use to access the server. An example is:

    http://myhost.com:8000

    Be sure to change the host name in both properties listed above.

    The “8000″ in the name is the default port number for the WMS server. You can change this number via the property:

    property name="gov.nasa.worldwind.avkey.Server.Port" value="8000"

    in the web.xml configuration file.

    You can change other properties in web.xml, but we recommend that you leave them at their default values unless you are absolutely sure of their effect.

  7. Start and Test the Server

  8. Follow the WMS server installation instructions to start the server.

    Test the server by entering into a web browser a URL requesting the server’s WMS capabilities document, as follows but replacing “myhost.com” with the newly installed server’s host name:

    http://myhost.com:8000/wms?service=WMS&request=GetCapabilities

    If the test is successful, the web browser will present an XML document entitled:

    WMT_MS_Capabilities version=”1.3.0″

    If it does not, then stop here and fix the problem before going on to configure the clients. Check that the host is truly accessible, and that the mount point is indicated correctly in the wms.DataFileStore.xml file.

    Once the test is successful, verify that the capabilities document indicates the correct host name in its two “OnlineResource” entries.

  9. Configure the Clients

  10. The World Wind client library uses configuration files to identify the WMS server URL. These files must be changed to reflect the location of the newly installed and configured server. The configuration file for each image layer and each elevation model must be configured. The configuration files are located in the World Wind source code in the src/config/Earth directory.

    For imagery, edit the following files to include the newly installed server’s URL:

    BMNGWMSLayer.xml
    LandsatI3WMSLayer.xml
    USGSTopoHighResLayer.xml
    USGSTopoMedResLayer.xml
    USGSTopoLowResLayer.xml

    There are two entries in each file that must be changed:

    <GetCapabilitiesURL>http://data.worldwind.arc.nasa.gov/wms</GetCapabilitiesURL>
    <GetMapURL>http://data.worldwind.arc.nasa.gov/wms</GetMapURL>

    Replace the emboldened host names above with that of the newly installed WMS server. For example, if the host is myhost.com and port number is 8000, change them as follows:

    http://myhost.com:8000/wms

    There is only one file to change for elevations, EarthElevationModelAsBil16.xml. Change the same two host name entries in that file identically to the changes made in the imagery configuration files.

  11. Clear the World Wind Cache

  12. If you’ve previously run World Wind applications on your client computer, it will have cached imagery and elevation data in the World Wind data cache, which is located in C:/ProgramData/WorldWindData on Windows and /Library/Caches/WorldWindData on OS X.

    Clear the directories corresponding to the image layers and elevation models above, which are:

    WorldWindData/Earth/BMNGWMS
    WorldWindData/Earth/NASA LandSat i3 WMS
    WorldWindData/Earth/USGS Topographic Maps 24k Scale
    WorldWindData/Earth/USGS Topographic Maps 100k Scale
    WorldWindData/Earth/USGS Topographic Maps 250k Scale
    WorldWindData/Earth/EarthElevationModel.bil16

  13. Test the Installation

  14. Rebuild your application so that the newly modified client configuration files are used. In step 4 above you started the server, so it should be running and waiting for requests. Start your application and zoom into an area. You should see World Wind applying the imagery and elevations from the newly installed server. If this is the case, then you have successfully installed and configured your World Wind WMS server.

In addition to using the data on the NAS device, the WMS server by default is configured to make available any data in the World Wind data installation directory when it starts. See Importing Data for the details of this.