The filter tab is very useful to isolate or exclude certain entities from your map.
The Filter tab allows you to display only certain features from a map file rather than all of the features.
- Definition,
- RegEx Filter,
WARNING - The Filter tab of the Layer properties is ONLY available while using some local geographic layers
Definition
This is the Filter tab:
Filter Property
Enabled: When enabled, the filter will be applied to the map file. The icon representing the type of map layer in the layer control will change to indicate a filter is applied.
String Comparison Rules
The filter column value is compared character by character to the user entered value until either all characters are determined to be identical, or a difference is found, using the following rules:
- Space < Everything
- A < B, a < b
- Uppercase < Lowercase
- Number < Alphabet
Be careful comparing numeric values this way. Because each number is compared one digit at a time, the result can be counter-intuitive. For example, “80” is greater than “1000” because the first digit comparison sets the result for the whole comparison. If you need to do numeric comparisons outside of EQUAL, use expression filters.
Simple Filter
The Simple Filter compares a feature's value to a string value.
Simple Filter Properties
Filter Column: Selects the data column in the source file that will be used in the filter.
Operation: Selects the operator that will be used in the comparison between the feature's value and the user-entered value. If the comparison returns TRUE, then the feature will be displayed.
Value: Sets the string value that will be compared to the feature's value.
RegEx Filter
The RegEx Filter matches a feature's value with a regular expression.
RegEx Filter Properties
Filter Column: Selects the data column in the source file that will be used in the filter.
RegEx: Sets the regular expression to match against the feature's value.
Regular Expression (RegEx)
A regular expression provides a concise and flexible means for matching strings of text, such as particular characters, words, or patterns of characters. It is often more concise to specify a set's members by such an expression than by a list.
More information on additional RegEx options can be found on the Web. As a good start, we recommend --> http://en.wikipedia.org/wiki/Regular_expression.
Expression Filter
Expression Filter Properties
Expression: The expression to evaluate for each feature.
Expression
An expression has two values and an operator that determines the type of comparison. Expressions can be enclosed in parentheses and then combined with AND, OR and NOT operators.
Example: ("[Entity_Type_EN]" eq "Provincial Capital") AND ([Class] = 4)
String Expression
In the example "[Entity_Type_EN]" eq "Provincial Capital":
- "[Entity_Type_EN]": The value enclosed within square brackets inside double quotes references a data column name.
- "Provincial Capital": The value enclosed in double quotes references a feature's value.
Numeric Expression
In the example [Class] = 4:
- [Class]: The values enclosed within square brackets reference a data column name.
The following operations can be performed with numbers. They do not return a TRUE/FALSE value but can be used to create a number for use in a numeric expression.