Main Content

Update Your Layer

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


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', ...
  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. View the abstract of the first layer.

    el_nino = global_sst.refine ('El Nino','SearchField', ...
    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. View the coordinate reference system codes associated with this layer. For more information, see Understand Coordinate Reference System Codes.

  6. View the contents of the Details field.

    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.

See Also

| |

Related Topics