CARIS : Commands : Filter
 

Filter

 

Menu

Select > By Filter > Attribute Value

Pop-up

feature layer > Add Layer(s) > Filter

The Filter dialog box is used by various commands to either create a new filtered layer or perform a selection based on a user-specified filter expression. The filter expression is generated based on the feature object types and attributes present in the active data source. When creating a new layer, only data found in the input dataset that meets the filter criteria will be displayed. When performing a selection, data found in the input dataset that meets the filter criteria will be selected.

The filter functionality can be used with data in several vector formats, such Shapefiles, GML, GeoPackage, AutoCAD and CARIS DES. It also works with database object layers. It is not currently compatible with HOB and S-57 ENC data.

The dialog box can be launched from any of the following locations:

the Add Layers command in the context menu from the Layers - Show sources window

Filter property in the properties window when a supported data format is selected in the Layers window.

the Select > By Filter > Attribute Value command

Related commands:

Classification

Style

Interface

The Filter command uses the following dialog box.

Option

Description

Feature Types

The feature types to include in the filtered layer. This list is populated with all feature object acronyms present in the catalogue of the source data.

1. Expand the drop-down list.

2. Click to populate the check box of each feature type to be included.

Attributes

The Attributes list is automatically populated with attributes based on the selected feature object types. This list determines the attributes that can be used to build the filter expression.

In addition to attributes, there is a set of Functions that is used to determine how the filter expression is applied to the source data. Some of the functions available are:

BBOX: This function applies the filtering to all data relative to a set of coordinate extents.

NOT: This function applies the filtering to all data that does not meet the specified criteria.

ID: This function applies filtering to all data with a specified feature object IDs.

If the list of attributes is extensive, the Search Attributes field can be used to limit the attributes displayed. As text is entered into the field, the list will be reduced to include only the attributes that match the search term. Clicking the X button will clear the search and display the full list.

Expression map

This field is used to build the expression map, which is a graphical representation of the filter expression. To add items to the filter expression, you can either double-click an item in the Attributes list, or click and drag an item from the list to the Expression map area. A bubble is added to the map for each item selected. As multiple items are added, operators are automatically added between each of the bubbles and additional bubbles are added to encompass the entire expression. If an item is double-clicked, it is automatically added to the end of the expression. If it is added through click-and-drag, it can be dropped in any position in the filter expression.

Properties

The properties for the currently selected attribute or operator bubble in the Expression map. These properties are used to define the attribute values to use for the filter expression. The properties are displayed by clicking a bubble in the Expression map area. For each bubble, you must select the operator and manually enter the value to use when filtering.

Expression statement

The textual version of the filter expression. Each time that a bubble is added to the Expression map, it is displayed in the Expression statement. As the properties for the bubbles are altered, the statement is automatically updated to reflect the changes. The information displayed in the Expression statement is based on the bubble that is currently selected in the Expression map. If an inner bubble is selected, only that part of the expression is displayed; if the outer-most bubble is selected, the entire expression is displayed.

This field can also be used to enter the filter expression rather than using the Properties. Text can be entered manually wherever the cursor is placed within the statement, with auto-complete options provided where available. As changes are made in the statement, the Expression map is updated to reflect the changes, including the deletion of entire bubbles.

Validation is performed on the syntax of the expression as it is built. If the Expression statement has a red boarder around the field, there is an error in the syntax; If the boarder is green, the expression is valid.

Save As

Save the current filter expression as a .filter file for future use.

1. Click the Save As button.

2. Specify a name and location for the file.

3. Click Save.

Load

Load a previously saved .filter file to edit and/or apply the filter expression to the current source data. The drop-down list beside the button provides a list of recently used .filter files.

1. Select an option from the drop-down list or click the Load button and navigate to an existing file.

2. Alter the expression as needed and/or click OK to apply it.

Procedure

1. View the Show sources mode of the Layers window.

2. Select a vector data layer.

3. Right-click the layer and select the Filter command.

4. Add attributes to the Expression map and define their values either using the Properties box or the by manually entereing the operators and values in the Expression statement.

5. Click OK.

A new layer is added to the Layers window, named according to the filter applied. The layer can be renamed if needed. See Layers Window for more information. If needed, the filter can be altered by selecting the filtered layer and then selecting the Filter command again. When the Filter dialog box is displayed, it will be populated with the expression that was used to create the filtered layer.