CARIS HPD : Command Reference : O : Open Connection : Open Connection Wizard : Filter expression
 
Filter expression

If you select parent layer, or schema, the Select Feature Type dialog box is displayed.

Option

Description

Feature Type

A list of all the feature types in the selected schema.

1. Select one or more feature types and click OK.

Once you have selected feature type, either in the wizard or in the Select Feature Type dialog box, you can build and view the filter expression using the Filter dialog box.

There are two ways to build a filter:

Graphical: different panes are provided to select attributes, define properties for the attributes and graphically build the filter expression.

Advanced: the filter expression is manually typed into the expression field, with auto-complete options provided based on feature types in the data source.

Graphical

Option

Description

Feature Types

The feature types to be included in the filtered layer. By default, it contains the type selected in the Open Connection wizard.

To change the feature type or to select more than one feature type:

1. Click the down arrow.

A list of all feature types in the source data is displayed.

2. Enable each feature type you want to include.

Functions and attributes

Functions and attributes, if any, related to the selected feature types are listed. These can be used to build a filter expression.

If multiple feature types are selected, only common attributes are listed.

The Search Attributes field can be used to filter the list of functions and attributes. Only the functions and attributes that contain the search term are displayed

Click the X button to clear the filter and display the full list.

Functions are used to determine how the filter expression is applied to the source data. Some functions are:

BBOX: Applies the filtering to all data relative to the coordinate extents of the bounding box.

NOT: Applies the filtering to all data that does not meet the specified criteria.

ID: Applies filtering to all data with specified feature object IDs.

Attributes are specific to the feature type.

Expression map

An expression map is a graphical representation of a filter expression. Functions and attributes are displayed here, along with the values defined using the Properties option.

To add items to the filter expression, do one of the following:

double-click on an attribute or function to add it to the end of the expression

drag an attribute or function and drop it at a specific position within the expression

Each function or attribute is placed within a bubble. Operators are placed between the bubbles and bubbles associated with the operators are added around the expression.

When you select a bubble, it is highlighted in blue and its selected or potential value is displayed in the Properties area.

To remove an attribute or function from the expression, select its bubble and press <Delete>.

Properties

Define the values of the currently selected bubble in the expression map. The bubble can contain a function, and attribute, or an operator.

For each bubble, select the operator and manually enter the value.

Advanced

Option

Description

Feature Types

All feature types in the layer that was active when the command was initiated.

If features types were selected in the Select Feature Types dialog box, they will be selected here. This can be changed if needed.

The Search Feature Types field can be used to filter the list. Only features types that contain the search term are displayed. Note that the search term is case sensitive.

Feature types with a check mark will be included in the filter expression.

Expression statement

Here you can view and build an expression statement, which is a textual representation of the filter expression.

If you built an expression in the Graphical tab, it will be displayed here.

When you click in the statement area, lists are displayed with auto-complete options for function, attributes and operators based on the feature types selected. Only the attributes that are common to all selected feature types will be available. As the expression is built, the options in the list will change to reflect the current state of the expression and the location of the cursor in the statement. Text can also be entered manually wherever the cursor is placed within the Expression statement.

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

Commands

Command

Description

Save As

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

1. Click Save As.

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 list or click Load and navigate to an existing file.

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