Point Group Queries Reference

You can use the query builder more effectively if you understand the components of a query.

A query consists of expressions that are combined using set operators.

Expressions

An expression consists of the following three components:

Use properties, comparison operators, and values to create expressions such as the following:

Set Operators (AND, OR, and NOT)

Use set operators to combine or negate expressions.

For example, if you combine the first two expressions above with the OR set operator, the resulting query is:

(Point Number = 1-100) OR (Point Elevation > 1200)

The above query adds to the point group any point with either a point number between 1 and 100 or an elevation greater than 1200.

If you combine the first two expressions above with the AND set operator, the resulting query is:

(Point Number = 1-100) AND (Point Elevation > 1200)

The above query adds to the point group any point that has both a point number between 1 and 100 and an elevation greater than 1200.

The NOT operator allows you to exclude points using specified criteria. For example, if you preceded the first expression above with the NOT operator, the resulting query is:

NOT (Point Number = 1-100)

The above query excludes points from the point group if the point number falls between 1 and 100.

Using Parentheses to Combine Expressions

You can use parentheses to combine expressions. Expressions that fall within parentheses are evaluated before they are combined with other expressions.

The following query uses parentheses to combine expressions:

(Raw Description = MON OR Raw Description = IP) AND (Point Elevation > 200)

Because the previous query is evaluated according to the parentheses, first (Raw Description = MON OR Raw Description = IP) is evaluated and then (Point Elevation > 200) is evaluated, then the two results are evaluated together using the AND set operator. The query adds to the point list only points with a raw description of MON or IP that have elevations greater than 200.

Precedence of Operators

When parentheses are not used to combine expressions, the query is evaluated using only the following precedence of operators. The following lists the precedence of the operators from highest to lowest:

The following query does not use parentheses to combine expressions:

Raw Description = MON OR Raw Description = IP AND Point Elevation > 200

Because the query is evaluated according to the precedence above, Raw Description = IP AND Elevation > 200 is evaluated first, then the results are evaluated with Raw Description = MON. The query adds to the point list any point that has a raw description of IP and an elevation > 200. It also adds to the point list any point with a raw description of MON, regardless of its elevation.