Documentation Center

  • Trial Software
  • Product Updates


Class: WMSLayer

Refine search based on geographic limits




layers.refineLimits(Name,Value,...) searches for elements of layers 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.


  • 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.

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

Input Arguments

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.

You can abbreviate 'Latlim' and 'Lonlim'. Case does not matter. All angles are in units of degrees.


A two-element vector of latitude 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 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 = ...
    elevation.refineLimits('Latlim', latlim, 'Lonlim', lonlim);

 % Print out the server titles from the unique servers.

Sample output follows:

ans = 

    'NRL GIDB Portal: Missouri CARES Maps'
    'NRL GIDB Portal: NOAA NGDC Maps'

See Also

Was this topic helpful?