Update Your Layer

After you find your specific layer of interest, you can leave the local WMS Database and work with a WMS server. In this section, you learn how to synchronize your layer with the WMS source server.

    Note:   When working with the Internet, you may have to wait several minutes for information to download, or servers can become unavailable. If you encounter problems, refer to Troubleshoot WMS Servers for tips.

Use the wmsupdate function to synchronize a WMSLayer object with the corresponding WMS server. This synchronization populates the Abstract, CoordRefSysCodes, and Details fields.

  1. Find all layers in the WMS Database with the title "Global Sea Surface Temperature."

    global_sst = wmsfind ('Global Sea Surface Temperature', ...
       'SearchField', 'LayerTitle');
  2. Use the WMSLayer.servers method to determine the number of unique servers.

  3. If your search returns more than one server, consider setting the wmsupdate 'AllowMultipleServers' property to true. (However, be aware that if you have many servers, updating them could take a long time.)

    global_sst = wmsupdate(global_sst, 'AllowMultipleServers', true);
  4. Now that you have updated all the fields in your WMSLayer objects, you can search by the Abstract field.

    el_nino = global_sst.refine ('El Nino', 'SearchField', ...

    Type el_nino(1).Abstract at the command line to view the abstract of the first layer.

    Sample Output:

    The temperature of the surface of the world's oceans provides 
    a clear indication of the state of the Earth's climate and 
    weather....In this visualization of the anomaly covering the 
    period from June, 2002, to September, 2003, the most obvious 
    effects are a successive warming and cooling along the equator 
    to the west of Peru, the signature of an El Nino/La Nina cycle....
  5. Type el_nino(1).CoordRefSysCodes at the command line to view the coordinate reference system codes associated with this layer. For more information, see Understand Coordinate Reference System Codes in the Mapping Toolbox™ User's Guide.

  6. To view the contents of the Details field, type el_nino(1).Details at the command line.

    Sample Output:

    ans = 
         MetadataURL: '
          Attributes: [1x1 struct]
         BoundingBox: [1x1 struct]
           Dimension: [1x1 struct]
        ImageFormats: {'image/png'}
         ScaleLimits: [1x1 struct]
               Style: [1x2 struct]
             Version: '1.1.1'

    The Style field covers a wide range of information, such as the line styles used to render vector data, the background color, the numeric format of data, the month of data collection, or the dimensional units.

Was this topic helpful?