Documentation

Searching the WMS Database

Introduction to the WMS Database

The Mapping Toolbox™ contains a database of over 1,000 stored WMS servers and over 100,000 layers. This database, called the WMS Database, updates at the time of the software release and includes a subset of available WMS servers. MathWorks created the database by conducting a series of Internet searches and qualifying the search results.

    Note:   MathWorks cannot guarantee the stability and accuracy of WMS data, as the servers listed in the WMS Database are located on the Internet and are independent from MathWorks. Occasionally, you may receive error messages from servers experiencing difficulties. The WMS Database changes at the beginning of each new software release. Servers can go down or become unavailable.

The WMS Database contains the following fields.

Field NameData TypeField Content
ServerTitleStringTitle of the WMS server, descriptive information about the server
ServerURLStringURL of the WMS server
LayerTitle StringTitle of the layer, descriptive information about the layer
LayerNameStringName of the layer, keyword the server uses to retrieve the layer
LatlimTwo-element vectorSouthern and northern latitude limits of the layer
LonlimTwo-element vectorWestern and eastern longitude limits of the layer

The LayerTitle and LayerName fields sometimes have the same values. The LayerName indicates a code used by the servers, such as '29:2', while the LayerTitle provides more descriptive information. For instance, 'Elevation and Rivers with Backdrop' is a LayerTitle.

wmsfind is the only WMS function that accesses the stored WMS Database. The following example illustrates how to use wmsfind to find a layer.

Finding Temperature Data

For this example, assume that you work as a research scientist and study the relationship between global warming and plankton growth. Increased plankton growth leads to increased carbon dioxide absorption and reduced global warming. The sea surface temperature is already rising, however, which may reduce plankton growth in some areas. You begin investigating this complex relationship by mapping sea surface temperature.

  1. Search the WMS Database for temperature data.

        layers = wmsfind('temperature');

    By default, wmsfind searches both the LayerName and LayerTitle fields of the WMS Database for partial matches. The function returns a WMSLayer array, which contains one WMSLayer object for each layer whose name or title partially matches 'temperature'.

  2. Click layers in the Workspace browser and then click one of the objects labeled <1x1 WMSLayer>.

    Sample Output:

         ServerTitle: 'NASA SVS Image Server'
           ServerURL: 'http://svs.gsfc.nasa.gov/cgi-bin/wms?'
          LayerTitle: 'Background Image for Global Sea Surface ...
                      Temperature from June, 2002 to September,
                      2003 (WMS)'
           LayerName: '2905_17492_bg'
              Latlim: [-90.0000 90.0000]
              Lonlim: [-180.0000 180.0000]
            Abstract: '<Update using WMSUPDATE>'
    CoordRefSysCodes: '<Update using WMSUPDATE>'
             Details: '<Update using WMSUPDATE>'

    A WMSLayer object contains three fields that do not appear in the WMS Database—Abstract, CoordRefSysCodes, and Details. (By default, these fields do not display in the command window if they are not populated with wmsupdate. For more information, see Updating Your Layer in the Mapping Toolbox User's Guide.)

    Note:   WMSLayer is one of several classes related to WMS. If you are new to object-oriented programming, you can learn more about classes, methods, and properties in the Object-Oriented Programming section of the MATLAB® documentation.

Was this topic helpful?