Products & Services Solutions Academia Support User Community Company

Learn more about Mapping Toolbox   

refine - Class: WMSLayer

Refine search

Syntax

layers.refine(querystr, param, val, ...)

Description

layers.refine(querystr, param, val, ...) searches for elements of layers in which values of the Layer or LayerName properties match the string querystr. Use the 'MatchType' property to control whether the method uses partial or exact matching. The default is partial matching.

Inputs

querystr

Specifies the search string

Data Type: string

param, val

Modifies the search by specifying any of the following optional parameters. Parameter names can be abbreviated and case does not matter.

Parameter Data TypeValueDefault
'SearchFields'Case-insensitive string or cell array of strings

Valid strings are 'abstract', 'layer', 'layertitle', 'layername', 'server', 'serverurl', 'servertitle', or 'any'.

The method searches the entries in the 'SearchFields' properties of layers for a partial match of the entry with querystr. The layer information is returned if any supplied 'SearchFields' match. If 'layer' is supplied then both the 'LayerTitle' and 'LayerName' properties are searched. If 'server' is supplied, then both the 'ServerURL' and 'ServerTitle' fields are searched. If 'any' is supplied, then the properties 'Abstract', 'LayerTitle', 'LayerName', 'ServerURL', and 'ServerTitle' are searched.

{'layer'}
'MatchType'Case-insensitive string with value 'partial' or 'exact'

If 'MatchType' is 'partial', then a match is determined if the query string is found in the property value. If 'MatchType' is 'exact', then a match is determined only if the query string exactly matches the property value. If 'MatchType' is 'exact' and querystr is '*', a match is found if the property value matches the character '*'.

'partial'
'IgnoreCase'LogicalIf 'IgnoreCase' is true, then case is ignored when performing string comparisons.true

Example

Refine a search of temperature layers to find two different sets of layers: (1) layers containing only annual sea surface temperatures, and (2) layers containing annual temperatures or sea surface temperatures.

temperature = wmsfind('temperature');
annual = temperature.refine('annual');
sst = temperature.refine('sea surface');
annual_and_sst = sst.refine('annual');
annual_or_sst = [sst;annual];

See Also

wmsfind

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS