servers

Class: WMSLayer

Return URLs of unique servers

Syntax

serverURLs = servers(layers)

Description

serverURLs = servers(layers) returns a cell array of URLs of unique servers. layers is a Web Map Service Layers (WMSLayer) object.

Examples

expand all

Find all unique URLs of government servers

Find the URLs for government servers.

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

http://atlas.resources.ca.gov/ArcGIS/Services/Atmosphere_Climate/CaliforniaWeatherForecasts/MapServer/WMSServer?
http://atlas.resources.ca.gov/ArcGIS/Services/Atmosphere_Climate/RIDGE-345min/MapServer/WMSServer?
http://atlas.resources.ca.gov/ArcGIS/Services/Atmosphere_Climate/RIDGE_Precip_Radar/MapServer/WMSServer?
http://atlas.resources.ca.gov/ArcGIS/Services/Atmosphere_Climate/RIDGE_Radar_TimeSeries/MapServer/WMSServer?
http://atlas.resources.ca.gov/ArcGIS/Services/Atmosphere_Climate/USCityWeatherForecast/MapServer/WMSServer?
http://atlas.resources.ca.gov/ArcGIS/Services/Base_Maps/JacksonStForest/MapServer/WMSServer?
http://atlas.resources.ca.gov/ArcGIS/Services/Base_Maps/Topo_GrayScale/MapServer/WMSServer?
http://atlas.resources.ca.gov/ArcGIS/Services/Base_Maps/Topo_Hillshade/MapServer/WMSServer?
http://atlas.resources.ca.gov/ArcGIS/Services/Base_Maps/Topo_Regular/MapServer/WMSServer?
.
.
.     

List server URLs that contain a temperature layer along with the number of temperature layers

Find server URLs that contain temperature layers and return them in a Web Map Service Layers (WMSLayer) object.

temperature = wmsfind('temperature');
serverURLs = servers(temperature);
for k=1:numel(serverURLs)
   querystr = serverURLs{k};
   layers = refine(temperature,querystr, ...
      'SearchFields', 'serverurl');
   fprintf('Server URL\n%s\n', layers(1).ServerURL);
   fprintf('Number of layers: %d\n\n', numel(layers));
end
Server URL
http://www.ifremer.fr/thredds/wms/METEOFRANCE-EUR-SST_L3MONOSENSOR_NRT-OBS_SEVIRI_1_1H_SST-EUR-MYOCEAN_FULL_TIME_SERIE
Number of layers: 2

Server URL
http://www.ifremer.fr/thredds/wms/METEOFRANCE-EUR-SST_L3MONOSENSOR_NRT-OBS_SEVIRI_1_1H_SST-REUNION-MYOCEAN_FULL_TIME_SERIE
Number of layers: 2

Server URL
http://www.ifremer.fr/thredds/wms/METEOFRANCE-EUR-SST_L3MONOSENSOR_NRT-OBS_TMI-EUR-MYOCEAN_FULL_TIME_SERIE
Number of layers: 2
.
.
.

See Also

Was this topic helpful?