This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Information about WMS server from capabilities document


[capabilities, infoRequestURL] = wmsinfo(serverURL)
[capabilities, infoRequestURL] = wmsinfo(infoRequestURL)
[capabilities, infoRequestURL] = wmsinfo(___,Name,Value)


[capabilities, infoRequestURL] = wmsinfo(serverURL) accesses the Internet to read a capabilities document from a Web Map Service (WMS) server. A capabilities document is an XML document that contains metadata describing the geographic content offered by the server. The wmsinfo function returns the contents of the capabilities document into capabilities, a WMSCapabilities object. The WMS server URL serverURL contains the protocol 'http://' or 'https://' and additional WMS or access keywords. You can insert the URL character vector infoRequestURL, composed of the serverURL with additional WMS parameters, into a browser or urlread to return the XML capabilities document. The wmsinfo function requires an Internet connection. Periodically, the WMS server is unavailable. Retrieving the map can take several minutes.

[capabilities, infoRequestURL] = wmsinfo(infoRequestURL) reads the capabilities document from a WMS infoRequestURL and returns the contents into capabilities.

[capabilities, infoRequestURL] = wmsinfo(___,Name,Value) specifies a parameter-value pair that modifies the request to the server.

Input Arguments


WMS server URL that contains the protocol 'http://' or 'https://' and additional WMS or access keywords.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

You can abbreviate the parameter name, which is case-insensitive.


Integer-valued, scalar double that indicates the number of seconds to elapse before a server times out. A value of 0 causes the time-out mechanism to be ignored.

Default: 60 seconds

Output Arguments


WMSCapabilities object.


URL composed of the serverURL with additional WMS parameters, returned as a character vector.


Use wmsinfo to read a capabilities document and display the abstract of the first layer.

% Read the capabilities document from the NASA Goddard
% Space Flight Center WMS server.
serverURL = ''; 
capabilities = wmsinfo(serverURL);
% Display the layer information in the command window.

Sample output follows:

        Index: 304 
     ServerTitle: 'NASA SVS Image Server' 
       ServerURL: '' 
      LayerTitle: '(4096x2048 Animation)' 
       LayerName: '3348_27724' 
          Latlim: [-90.0000 90.0000] 
          Lonlim: [-180.0000 180.0000] 
        Abstract: 'NASA's Aqua satellite was launched ... 
CoordRefSysCodes: {'CRS:84'} 
         Details: [1x1 struct] 
% Refine the list to include only layers with the term 
% "glacier retreat" in the LayerTitle.
glaciers = capabilities.Layer.refine('glacier retreat', ...
   'SearchFields', 'LayerTitle');
% Display the abstract of the first layer.

Sample output follows:

Since measurements of Jakobshavn Isbrae were first taken....


  • To specify a proxy server to connect to the Internet, select File>Preferences>Web and enter your proxy information. Use this feature if you have a firewall.

  • wmsinfo communicates with the server using a WebMapServer object representing an implementation of a WMS specification. The object acts as a proxy to a WMS server and resides physically on the client side. The object accesses the server's capabilities document. The object supports multiple WMS versions and negotiates with the server to use the highest known version that the server can support. The object automatically times-out after 60 seconds if a connection is not made to the server.

See Also


Using Objects

Introduced in R2009b

Was this topic helpful?