The Mapping Toolbox™ contains a database of over 1,000 stored WMS servers and over 100,000 layers. MathWorks® creates this database, called the WMS 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. Servers can go down or become unavailable.
wmsfind
is the only WMS function that
accesses the stored WMS Database. By default, wmsfind
searches
the WMS database installed with the product. Using the Version
parameter, you can also search a version of the WMS database hosted on the
MathWorks website or a WMS database from a previous release. The information
found in the database installed with the product is static and is not automatically
updated—it was validated at the time of the software release. The web-hosted
database is updated regularly.
Note
Searching the web-hosted version of the WMS database requires a connection to the Internet. If you encounter problems, refer to Troubleshoot Access to the Hosted WMS Database for tips.
The WMS Database contains the following fields.
Field Name | Data Type | Field Content |
---|---|---|
ServerTitle | Character vector | Title of the WMS server, descriptive information about the server |
ServerURL | Character vector | URL of the WMS server |
LayerTitle | Character vector | Title of the layer, descriptive information about the layer |
LayerName | Character vector | Name of the layer, keyword the server uses to retrieve the layer |
Latlim | Two-element vector | Southern and northern latitude limits of the layer |
Lonlim | Two-element vector | Western 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
.
For an example of searching the WMS database, see Find Temperature Data in the WMS Database.
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.
Search the WMS Database for temperature data. By default, wmsfind
searches the WMS
database installed with the product. You can also search a version of the
WMS database hosted on the MathWorks website, or a database from a previous release. Searching the
web-hosted database requires a connection to the
Internet.
layers = wmsfind('temperature');
wmsfind
searches both the
LayerName
and LayerTitle
fields of
the WMS Database for partial matches. The function returns an array of
WMSLayer
objects, which contains
one object for each layer whose name or title partially matches
'temperature'
.Click layers
in the Workspace browser and then click
one of the objects labeled <1x1 WMSLayer>
.
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 Update Your Layer in the Mapping Toolbox User's Guide.)
Note
WMSLayer
is one of several objects related to WMS. If you
are new to object-oriented programming, you can learn more about objects,
methods, and properties in Classes.