XTools Website

 

Note: this tool is updated in XTools Pro 16.1

 

Find Features

 

 

Purpose

 

The new Find Features tool allows searching for features in the specified layer and combining multiple attribute and spatial expressions in one search query.

 

 

Description

 

Find features is used to find features in the input layer based on a query. A query may consist of one or more expressions, both attribute and spatial.

An example of an attribute expression in the query below is that a country is Russia (where CNTRY_NAME = 'Russia'). An example of a spatial expression is cities should be located within a certain distance of rivers (CITIES within a distance of 100 Meters from RIVERS).

 

A number of output options are provided for saving search results.

 

Usage

 

Select a layer from the current map where you want to find features. Then run the tool to build a search query, which will be used to find features. Then select what you wish to do with the found features.

 

 

The tool provides a simplified text-styled dialog where you can specify all required attribute and spatial expressions for the search query:

 

 

Attribute expressions

 

Attribute expressions are represented with the WHERE clause, all other expressions in the list are spatial expressions. For attribute expressions there is a number of operators provided:

 

  • contains / does not contain

  • ends with / does not end with

  • equal / not equal

  • greater or equal

  • greater than

  • includes values / does not include values

  • is above average

  • is below average

  • is between / is not between

  • is null / is not null

  • less or equal

  • less than

  • starts with / does not start with

 

Fields or values can be used in the attribute expressions with the operators above.

 

Note:

Search is case sensitive, if a city name is "Houston" in the attribute table you won't find it searching for "houston".

 

Spatial expressions

 

Spatial expressions are all other expressions except the where clause on top. Spatial expressions are based on the relations between two layers. At that, this can be the same layer, i.e. you can search for RIVERS intersecting RIVERS. Besides, referencing another layer in the spatial expression you can bind it with another expression. For example, searching for CITIES within RIVERS you can work only with RIVERS with a certain name or belonging to a certain basin.

 

Adding expressions

 

When you first run the tool the dialog comes up with the first default expression added. By default it's an attribute expression applied to the selected layer or to the first applicable layer in the TOC window. A display expression field (primary display field) is selected by default. Feel free to modify the default expression as you need. To add another expression press on the "and" button below the expression. "and" is the default logical operator

 

Added expressions can be grouped, ungrouped, moved up or down and deleted.

 

Note:

If there are any selected features in the input layer then they will be used by default. Make sure to change "selected" to "all" if you wish to search among all features.

 

Logical operators

 

Expressions are linked using logical operators "and" and "or". "and" is the default operator, click on it to change to "or" and vice versa.

 

Grouping expressions

 

Two and more expressions can be grouped. For that select the required expressions using the Shift button and clicking on the grey bar in front of the expression, then choose Group from the context menu:

 

 

 

Each group of expressions represents a sub-query whose results are combined with other expressions. Grouped expressions are indented in the dialog.

Grouping expressions may be required when you need to create two or more distinct sets of features from the same input layer. Instead of grouping expressions you could query the same layer twice or more times and the combine search results which is not convenient.

 

Note:

Grouping option is not available if you have only two expressions in the query as there is no need in a group in this case.

 

Ordering expressions

 

Added expressions and groups of expressions can be moved up or down in the list of expressions. Both order and groups define the order in which expressions are processed and applied to the input layer. In some case different order may result in different search results, but sometimes ordering can be used for more convenient work with expressions and does not have impact on the search results.

 

Saving search results

 

Here is the list of what can be done with the found features:

 

  • Add features to current selection

  • Create selection layer

  • Create symmetrical difference with current query

  • Make a new selection

  • Remove features from current selection

  • Save features as a new feature class

  • Select subset from current selection

 

After running the specified query, no matter if it was successful or not, you can select to get back to it and modify as required.

 

---

 

 

Table of Contents

-Search-

Back