refineLimits

Class: WMSLayer

Refine search based on geographic limits

Syntax

refineLimits(layers,Name,Value,...)

Description

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

layers — Web map service layersWeb Map Service Layers (WMSLayer) object

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.

'Latlim'

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.

'Lonlim'

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.

Tips

  • 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', [])

Examples

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.

globalElevation.serverTitles'
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'
    'WMS GEOBASE / GEOBASE WMS'
    'NASA WorldWind WMS'
    'World Map'
    'World Map'
    'CubeSERV WMS'

See Also

Was this topic helpful?