Products & Services Solutions Academia Support User Community Company

Learn more about Mapping Toolbox   

servers - Class: WMSLayer

Return URLs of unique servers

Syntax

servers = layers.servers()

Description

servers = layers.servers() returns a cell array of URLs of unique servers.

Examples

Find all unique URLs of government servers.

layers = wmsfind('*.gov*','SearchField', 'serverurl');
servers = layers.servers;
sprintf('%s\n', servers{:})  

Sample Output

http://www.ga.gov.au/bin/getmap.pl?dataset=national
http://www.geoportaligm.gov.ec/nacional/wms?
http://www.geoportaligm.gov.ec/regional/wms?       
 

For each server that contains a temperature layer, list the server URL and the number of temperature layers.

temperature = wmsfind('temperature');
servers = temperature.servers;
for k=1:numel(servers)
   querystr = servers{k};
   layers = temperature.refine(querystr, ...
      'SearchFields', 'serverurl');
   fprintf('Server URL\n%s\n', layers(1).ServerURL);
   fprintf('Number of layers: %d\n\n', numel(layers));
end

Sample Output

Server URL
http://svs.gsfc.nasa.gov/cgi-bin/wms?
Number of layers: 36

See Also

wmsfind

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS