Fuzzy logic and GIS (2/2): from transformation to aggregation of spatial data

In the first part of this series, we saw how fuzzy logic allows us to go beyond rigid thresholds by assigning each spatial entity a degree of membership between 0 and 1.
We explored several membership functions, from simple linear to Gaussian, to translate a raw variable into a fuzzy indicator.

But a fuzzy map alone is not always enough.
In spatial analysis, we often want to cross-reference several criteria: for example, combining access to drinking water, terrain slope, and vegetation density to identify areas suitable for development.
This is where fuzzy aggregation comes in—a key step that allows us to merge several layers of information while preserving the nuances of membership degrees.

In this article, we will look at:

  • the main principles of fuzzy aggregation,
  • the main aggregation functions (min, max, average, t-norms, etc.),
  • and how they are applied in practice in a GIS.



Introduction

Let’s imagine that we have a set Ω of objects to be classified according to a number of criteria C.

The number of objects is limited and, for each criterion, the possible values are clearly identifiable.

To simplify matters, each criterion can be viewed as a “fuzzy filter” that defines which values of a criterion are considered acceptable. In other words, each criterion imposes a certain order of preference on the set Ω.

In our study, Ω represents all the pixels in the area we wish to analyze in order to assess their potential for aquaculture sites.

The criteria C correspond to the available data layers: bathymetry, slope, substrate type, productivity, etc.

Each layer takes on values that are easy to interpret: favorable, not very favorable, unfavorable, etc.

For each of these layers, an objective is set.

For example:

  • for bathymetry → “at least favorable”
  • for productivity → “at least not very favorable”

In practice, the objective corresponds to the subset of values accepted for this criterion.

Finally, we assume that, for each layer, it is possible to classify all pixels according to this objective—in other words, we know how to determine the exact value corresponding to the layer for each pixel.


Principle of the approach

For each criterion (or layer of information), the objective is described as a fuzzy set.

  • The values of the pixels located in the kernel are perfectly compatible with the objective.
  • Those outside the kernel are totally incompatible.

For example, if only two categories are used (favorable and unfavorable), bathymetry can be represented as follows:seulement deux catégories (favorable et défavorable), la bathymétrie pourra être représentée ainsi :

Figure 1 – Fuzzy representation of the “bathymetry” criterion with two degrees of satisfaction

In reality, it is rarely possible to accurately estimate a mathematical function that links depth to the suitability of a site for oyster farming.
On the other hand, the shape of the fuzzy curve makes it possible to translate the preferences or behavior of the decision-maker.

This is why, instead of limiting ourselves to two levels, we often use a discrete scale of 5 to 7 levels, which corresponds to the generally accepted level of perception.
A simple method consists of expressing these levels of compatibility in natural language (very good, good, fairly good, etc.), then converting them into standardized numerical values between 0 and 1, as in the following table:

Linguistic assessment Objective-consequence compatibility Numerical value [0,1] Ordinal code
Very good Totally compatible 1,00 A
Good Fairly compatible 0,75 B
Fairly good Moderately compatible 0,50 C
Poor Weakly compatible 0,25 D
Very poor Incompatible 0,00 E

Table 1 – Conventions for expressing levels of compatibility of objectives

The advantage of representing a criterion by a fuzzy interval is that it provides a description that is both more flexible and richer.

The decision-maker does not have to choose between a pessimistic (wide limits) or optimistic (narrow limits) view:

  • the fuzzy set support corresponds to the pessimistic interval,
  • the core corresponds to the optimistic interval.

For example:

If we consider that it is impossible to farm oysters at depths of less than 4 m or more than 25 m, but that the ideal conditions are between 8 m and 12 m, we obtain the following objective:

Figure 2 – Fuzzy representation of the “bathymetry” criterion with five degrees of satisfaction


Aggregation of criteria

Procedure for determining the aggregation operation.

When aggregating two objectives, there is a simple procedure for determining the type of operation to be performed. It consists of presenting the decision-maker with three typical situations and asking them to evaluate them. Based on the three responses given, a catalog of functions is searched to find the one that best matches the decision-maker’s wishes.

The three typical situations (S1, S2, S3) are chosen based on the two criteria (C1, C2) so that:

  • – S1 is incompatible (grade E or 0) with C1, but fully compatible (grade A or 1) with C2;
  • – S2 is moderately compatible (grade C or 0.5) with both objectives C1 and C2;
  • – S3 is moderately compatible (grade C or 0.5) with C1 and fully compatible (grade A or 1) with C2.

Three responses (R1, R2, R3) are obtained, from which the aggregation operation is sought.

First, we consider the case of a pair of criteria, then we study the generalization to the case of n criteria where n>2.

Two situations are to be studied:

  • a) two criteria of equal importance;
  • b) two criteria of unequal importance.


A) Criteria of equal importance.

Two criteria of equal importance can be combined according to the all-or-nothing principle or by introducing nuances. The all-or-nothing principle excludes any compromise between the two criteria and results in two aggregation operations: conjunction or disjunction. Conjunction is used when both criteria must be satisfied simultaneously (the logical “and”). In other words, the overall evaluation cannot be better than the worst of the partial evaluations.

Example: aggregation of the substrate and productivity criteria. If the decision-maker’s attitude implies the simultaneous satisfaction of both criteria, this means that if the substrate is moderately favorable and productivity is very favorable, the result of the aggregation of the two criteria will be the least favorable of the two, i.e., moderately favorable.

Disjunction is used in cases where criteria are redundant (the logical “or”). This means that the overall assessment will be equal to the best of the partial assessments. Example: aggregation of the “water quality” and “productivity” criteria. If the decision-maker’s attitude implies redundancy between these two criteria, this means that if water quality is average and productivity is very good, the result of the aggregation will be the most favorable of the two, i.e., “very good.”

A third approach taken by decision-makers leaves aside the all-or-nothing approach and introduces nuances into the aggregation. If the objectives become nuanced, compromise between the two criteria becomes one of the natural approaches taken by decision-makers.

Compromise means that the overall assessment is somewhere between the partial assessments. Returning to the example of water quality and productivity, if we have average quality and excellent productivity, the result will be, for example, “good.”

On fuzzy sets, this type of set operation is performed using two families of aggregation operations: symmetric sums and parameterized medians.

Among the parameterized medians, we find the harmonic mean \(\frac{2xy}{x+y}\),

the geometric mean \(\sqrt{xy}\), the arithmetic mean \(\frac{x+y}{2}\), etc.

Symmetric sums are of the type: \(\sigma_0 = \frac{xy}{1 – x – y + 2xy}\) ,\(\sigma_+ = \frac{x + y – xy}{1 – x – y – 2xy}\) , etc.


Two criteria are equally important if the aggregation function is symmetric, i.e. if the answer to the three evaluation questions is the same when the order of the criteria is reversed.

In this case, based on the three answers (A1, A2, A3), the aggregation operation is sought in the following table:


Importance and discrimination of a criterion

Unequal importance should not be confused with the discrimination threshold of a criterion.

The discrimination threshold refers to the relationship between the interval corresponding to a criterion and the overall range of variation in values.

For example, if depths vary between 0 and 30 m, setting the fuzzy number (4, 10, 20, 26) as a criterion is less selective than (11, 12, 14, 15). It can be observed that, in general, the more important a decision-maker considers an objective to be, the more they will tend to define narrow supports and cores and, conversely, the less important they consider a criterion to be, the more they will tend to establish distant limits.

This is one way of expressing a certain idea of the importance of criteria, but it remains within the realm of what we call criteria of equal importance. Another very common way of expressing the unequal importance of criteria is to weight the objectives: a weight is assigned to each objective and this weight is incorporated into the aggregation operation. This method has the disadvantage of not being applicable if anything other than numbers is being manipulated, and the a priori evaluation of weights is problematic.

B) Criteria of unequal importance.

The solution implemented in the plugin consists of adding a fourth question. We have S1(E,A), S2(C,C), S3(C,A). We add S4(A,E), i.e. the question symmetrical to S1, which includes a proposition that is totally compatible with criterion C1 and another that is totally incompatible with criterion C2. All responses forming a pair S1,S4 (AA,BB,CC,DD,EE) refer to the processing of criteria of equal importance.

When a user defines a fuzzy aggregation function based on non-symmetrical responses (for example, certain criteria deemed more important than others, or combinations deemed atypical), the plugin uses an approximation method to automatically generate a custom aggregation function.

The generate_asymmetric_function(code) function:

  • Key points defined by the user

    • The user chooses four aggregation values corresponding to reference situations:

      • (1, 0): criterion A completely true, criterion B completely false->vA1B0
      • (0.5, 0.5): both criteria average->vA05B05
      • (0.5, 1): criterion A average, criterion B completely true->vA05B1
      • (0, 1): criterion A completely false, criterion B completely true->vA0B1

    • These values are encoded as a 4-digit code (each digit from 0 to 4 corresponds to a degree of satisfaction between 1.0 and 0.0).

  • Construction of the fuzzy function

    • For the four key points, the values are assigned directly.
    • Construction of the fuzzy function
    • For the four key points, the values are assigned directly.
    • For all other combinations (x, y), the value is calculated by weighted bilinear interpolation, using the formula:

      • vA05B05⋅x⋅y+vA05B1⋅x⋅∣x−y∣+vA0B1⋅(1−x)⋅y

    • This formula produces a continuous surface that remains consistent with the defined key points.

  • Result

    • The returned function can be applied to any pair (x, y) of fuzzy values.
    • A parameter dictionary is also returned, documenting the type, code, key points, and approximation formula.


Adjustment method for unusual symmetrical criteria

The triplets presented in the function table above comply with the following constraints:

1) R3 >= max( R1,R2), the evaluation of a situation that completely satisfies criterion 2 and moderately satisfies criterion 1 must be at least equal to the best evaluation of the other two situations (R1 and R2), one of which does not satisfy the first criterion at all and the other of which only moderately satisfies both criteria;

2) R3 >= grade C or 0.5, full satisfaction of the second criterion cannot cause the overall satisfaction to fall below the level of satisfaction of the first criterion.

However, although this logic is used in most applications, it may not be appropriate in very specific situations. In this case, the plugin uses the generate_fuzzy_function(code) function to automatically generate a suitable aggregation function.

A warning message indicates that an unusual combination of responses has been encountered.

  1. Key points defined by the user

    • The user defines three reference situations, coded with three digits (from 0 to 4) representing a degree of aggregation between 1.0 and 0.0:

      • (1, 0) or (0, 1): one criterion is completely true, the other completely false. -> v1
      • (0.5, 0.5): both criteria are average. ->v2
      • (0.5, 1) or (1, 0.5): one criterion is average, the other is completely true. ->v3

  2. Construction of the symmetric fuzzy function

    • The values of the three key points are assigned directly according to the code provided.
    • For all other pairs (x, y), the value is estimated by continuous interpolation using the formula:

      • v2⋅x⋅y+v3⋅∣x−y∣

    • Symmetry is respected because the formula and key points are identical if x and y are swapped.

  3. Result

    • The returned function can be applied to any pair (x, y) of fuzzy values.
    • A parameter dictionary is also returned, documenting the type, code, key points, and approximation formula.


Conclusion and outlook

The integration of fuzzy logic into GIS opens up new possibilities for representing geographical reality in a more nuanced way. With FuzzyAttributes, users are no longer limited to arbitrary thresholds or binary approaches: they can model the gradation of a phenomenon, combine several criteria, and explore scenarios that more closely reflect the complexity of the terrain.

Beyond the individual analysis of criteria, the fuzzy aggregation function allows heterogeneous information to be synthesized, while taking into account priorities and asymmetries between criteria. This makes it a particularly relevant tool for fields such as land use planning, environmental assessment, or risk management.

Future developments of the plugin could include:

  • the addition of new families of fuzzy and aggregation functions,
  • more interactive visualization tools for membership functions,
  • the integration of optimization methods to automatically adjust parameters,
  • better compatibility with batch processing and QGIS models.

This plugin is and will remain free and open: all contributions are welcome, whether they are code improvements, translations, usage examples, or feedback.

By exploring these approaches together, we can continue to evolve GIS into tools capable of representing complexity, uncertainty, and uncertainty.


Si cet article vous a intéressé et que vous pensez qu'il pourrait bénéficier à d'autres personnes, n'hésitez pas à le partager sur vos réseaux sociaux en utilisant les boutons ci-dessous. Votre partage est apprécié !

Leave a Reply

Your email address will not be published. Required fields are marked *