Main Content

Explore Layers on Same Server

You might find a layer you like in the WMS Database and want to find other layers on the same server. You can explore other layers by using a capabilities document.

Specify the URL of the NASA SVS Image Server. Use the wmsinfo function to return the contents of the capabilities document as a WMSCapabilities object. A capabilities document is an XML document containing metadata that describes the geographic content a server offers.

serverURL = '';
capabilities = wmsinfo(serverURL)
capabilities = 

         ServerTitle: 'NASA SVS Image Server'
           ServerURL: ''
         ServiceName: 'WMS'
             Version: '1.3.0'
            Abstract: 'Web Map Server maintained by the Scientific Visualization Studio at NASA's Goddard Space Flight Center'
      OnlineResource: ''
  ContactInformation: [1x1 struct]
   AccessConstraints: 'none'
                Fees: 'none'
         KeywordList: {}
        ImageFormats: {'image/png'}
          LayerNames: {326x1 cell}
               Layer: [326x1 WMSLayer]
          AccessDate: '08-Apr-2021'


Set the layer titles to a variable. View the first ten titles.

layerTitles = {capabilities.Layer.LayerTitle}';
ans = 10×1 cell
    {'African Fires During 2002 (1024x1024 Animation)'                                   }
    {'Background Image for African Fires During 2002 (WMS)'                              }
    {'Aurora over the North Pole on April 17, 1999 (360x100 Animation)'                  }
    {'Background Image for Aurora over the North Pole on April 17, 1999 (WMS)'           }
    {'Satellite Imagery of Hurricane Dennis (512x512 Animation)'                         }
    {'Cumulative Earthquake Activity from 1980 through 1995 (1024x512 Animation)'        }
    {'Background Image for Cumulative Earthquake Activity from 1980 through 1995 (WMS)'  }
    {'Global Infrared Cloud Cover, September 2001 (2852x1009 Animation)'                 }
    {'Foreground Image for Global Infrared Cloud Cover, September 2001 (WMS)'            }
    {'Infrared Cloud Cover over the Atlantic Ocean, September 2001 (1024x1009 Animation)'}

Read the layer containing tropospheric ozone impacts. Display the map.

layerTitle = 'Tropospheric Ozone Impacts Global Climate Warming';
layer = refine(capabilities.Layer,layerTitle);
[A,R] = wmsread(layer);


This layer contains data from different years. You can examine the available data by accessing the layer.Details.Dimension structure.

ans = struct with fields:
              Name: 'time'
             Units: 'ISO8601'
        UnitSymbol: ''
           Default: '1994-'
    MultipleValues: 0
      NearestValue: 0
           Current: 0
            Extent: '1884-/1994-/P1Y'

Display the map for the year 1884 and compare it with the map for 1994, the default year (displayed previously).

year = '1884';
[A2,R] = wmsread(layer,'Time',year);

See Also

| |

Related Topics