All properties considered above and concerned with area and length of intersections have numerical values. Thus, comparison relations and relations of diapasons/intervals are applicable for them (see chapter 26 “Searching records in a table”, table 26-2 and table 26-3). For comparison relations it is also required to specify one numerical operand with which intersection area or length will be compared, and for relations of diapasons/intervals two operands are required (diapason limits).
In contrast to Area and Length properties considered above, to define properties concerned with intersections it is also required to specify a relation variant clarifying the sense of the relation on matching the given (tested) feature with a set of argument features. Relation variants which can be used with properties of intersection area and length are shown in the table 35-1.
Relation variant | Simple condition truth terms |
Any | The given relation is satisfied at least for one argument feature. |
Each | The given relation is satisfied for each argument feature. |
Sum | Sum of areas (or lengths) of intersections of the tested feature with all argument features is evaluated, and the given relation is checked for this sum. |
Average | The evaluated sum is divided by total number of argument features, and the given relation is checked for this average value. |
Minimum | Minimum value of intersection area (or length) of the tested feature with each argument feature is evaluated, and the given relation is checked for this minimum. |
Maximum | Maximum value of intersection area (or length) of the tested feature with each argument feature is evaluated, and the given relation is checked for this minimum. |
Any (%) | Same as in previous cases but the relation operand is specified, instead of map units, in percents from overall area or length of the tested feature. |
Table 35-1. Relation variants for intersection area and length relations
The effect of these relation variants in filters is demonstrated in the following examples.
Let a simple condition “Intersection area > 3” is set for the feature T on the figure 35-1, i.e. one has chosen the Intersection Area property and relation “>”, and relation operand equals 3. As it was mentioned, values of intersection areas of the feature T with argument feature in this example equals 3 for feature A1, 4 for feature A2 and 0 for feature A3. If the relation variant Any is chosen then the condition is true because the intersection area of feature T with argument feature A2 is 4, which is greater than 3 units. But if the relation variant Each is used then the condition is false because for argument feature A1 the intersection area equals 3 exactly, i.e. it is not greater than 3, and argument feature A3 does not intersect the tested feature at all (their intersection area is 0).
To evaluate a simple condition with a chosen relation variant Sum, Average, Minimum or Maximum, it is necessary to calculate the corresponding value. In the given example it is supposed that the corresponding layer does not contain any other features except A1, A2 and A3. Then the sum of intersection areas of tested feature T with argument features A1, A2 and A3 equals 7 units, average area is 7/3, minimum value of intersection area is 0 (for the feature A3), and maximum value is 4 (for the feature A2).
Now let simple condition “Area out of intersection >= 15” be specified for features shown in the figure 35-1, i.e. one has chosen the Area Out of Intersection property, the relation “>=”, and relation operand 15. It is not difficult to calculate that the area of those parts of tested feature T which lies outside intersections with argument features A1, A2 and A3 equals, correspondingly, 15, 14 and 18. It follows that relation variant Any is true (the relation is satisfied for A1 and A3), but the variant Each is false (the relation is not satisfied for A2).
It is also easy to calculate values used in other relation variants. The sum value of tested feature areas out of its intersection with argument features equals 15 + 14 + 18 = 47, the average area is 47/3, minimum is 14, and maximum is 18.