This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Class: WMSLayer

Refine search based on geographic limits




refineLimits(layers,Name,Value,...) searches for elements of layers, a Web Map Service Layers object, that match specific latitude or longitude limits. The results include a given layer only if the quadrangle specified by the optional 'Latlim' and 'Lonlim' parameters fully contains the boundary quadrangle, as defined by the Latlim and Lonlim properties. Partial overlap does not result in a match. All angles are in units of degrees.

Input Arguments

expand all

Web map service layers, specified as a Web Map Service Layers (WMSLayer) object

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.


A two-element vector of latitude values specifying the latitudinal limits of the search in the form [southern_limit northern_limit] or a scalar value representing the latitude of a single point.


A two-element vector of longitude values specifying the longitudinal limits of the search in the form [western_limit eastern_limit] or a scalar value representing the longitude of a single point.


Find layers containing global elevation data.

 elevation = wmsfind('elevation');
 latlim = [-90, 90];
 lonlim = [-180, 180];
 globalElevation = ...
    refineLimits(elevation,'Latlim', latlim, 'Lonlim', lonlim);

Print out the server titles from the unique servers.

ans = 

    'Ceoware2 WMS'
    'CubeSERV WMS'
    'CubeSERV Demo WMS'
    'deegree wms'
    'NASA Earth Observations (NEO) WMS'
    'JPL Planetary Map Service'
    'LMMP Tiled Web Map Service'
    'MicroImages TNTserver 7.3'
    'CubeSERV WMS'
    'ORNL DAAC WMS Server'
    'NASA WorldWind WMS'
    'World Map'
    'World Map'
    'CubeSERV WMS'


  • The default value of [] for either 'Latlim' or 'Lonlim' implies that all layers match the criteria. For example, if you specify the following, then the results include all the layers that cover the northern hemisphere.

    refineLimits(layer,'Latlim', [0 90], 'Lonlim', [])

See Also

Was this topic helpful?