| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Mapping Toolbox |
| Contents | Index |
| Learn more about Mapping Toolbox |
Refine search
layers.refine(querystr, param, val,
...)
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.
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 Type | Value | Default |
|---|---|---|---|
| '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' | Logical | If 'IgnoreCase' is true, then case is ignored when performing string comparisons. | true |
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];![]() | disp (WMSLayer) | refineLimits (WMSLayer) | ![]() |

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 |