Documentation Center

  • Trial Software
  • Product Updates

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 follows:

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 follows:

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

See Also

Was this topic helpful?