Fuzzy logic and GIS (1/2): an alternative to all-or-nothing for geographic analysis

Modeling uncertainty and gradual transitions in QGIS using the FuzzyAttributes plugin.


Not everything in geography is black and white. However, GIS tools often impose binary choices. What about transition zones? What about criteria that are partially met? With fuzzy logic, you can represent more subtle realities by assigning degrees of membership to geographic objects. The FuzzyAttributes plugin allows you to apply these concepts in QGIS with ease. This is a valuable advance for environmental analysis, land use planning, and vulnerability studies.


Why use fuzzy values in spatial analysis?

In our daily work with GIS (Geographic Information Systems), we often have to work with precise numerical data: a rate, a distance, a percentage. But in many situations, reality is not so clear-cut. It is vague, uncertain, or subjective. And that’s where fuzzy values come in.


The world is not binary

Let’s take a simple example: is soil “acidic”? If we rely solely on a pH threshold, we could say:

  • Yes, if it is below 5.5
  • No, if it is above

But what about soil with a pH of 5.6? Is it really that different from soil with a pH of 5.4?

In reality, the transition is gradual. It is more accurate to say that the soil is slightly acidic, or moderately acidic. It is this nuance that fuzzy logic allows for.


What are fuzzy values?

A fuzzy value does not simply say “yes” or “no.” It expresses a degree of belonging to a category. For example:

pH degree of belonging to “acidic soil”
4.5 1.0 (very acidic)
5.0 0.8
5.5 0.5
6.0 0.2
7.0 0.0 (neutral)

This type of representation makes it easier to translate continuous phenomena into decision-making processes.


The value of multi-criteria analysis

When multiple criteria come into play—for example, to determine a site’s suitability for agriculture or a territory’s vulnerability—it is often difficult to combine rigid thresholds.

Fuzzy functions allow you to:

  • Take into account the uncertainty or subjectivity of thresholds,
  • Translate expert judgments such as “slightly acidic soil is acceptable,”
  • Weight criteria with unequal weights or asymmetric responses.


In summary

Without fuzzy logic With fuzzy logic
Fixed and arbitrary thresholds Gradual transitions
0 or 1 Degree of membership (e.g., 0.7)
Abrupt decisions Subtle nuances and weightings
Risk of excluding too much Better analytical inclusivity


Real-world case: assessing a risk area

Let’s imagine that we want to assess the vulnerability of a watershed to erosion by combining:

  • Slope,
  • Soil type,
  • Vegetation cover.

Each of these factors can be blurred:

  • A gentle slope → low vulnerability (0.2),
  • Loamy soil → medium vulnerability (0.6),
  • Bare soil → high vulnerability (0.9).

A fuzzy aggregation function combines these scores while taking into account their relative importance (slope being more critical than soil, for example) to produce a fuzzy risk map, which is much more informative than a simple “Risk/No risk” classification.


The FuzzyAttributes plugin: a tool for nuance

The FuzzyAttributes plugin was designed to convert numerical attributes into fuzzy values and combine them using custom aggregation functions.

It offers:

  • Classic fuzzy functions (linear, triangular, Gaussian, sigmoid, etc.),
  • A visual tool for configuring functions,
  • The ability to aggregate multiple criteria according to asymmetric logic,
  • Export to a ready-to-use GeoPackage field.

With this tool, you can move from a rigid view of the world to a more flexible analysis that better reflects the complexity of reality.


Membership functions: transforming data into fuzzy judgments

Here are the main functions available in the FuzzyAttributes plugin, with concrete examples:

1. Linear increasing

  • Used when “the bigger, the better.”
  • Example: altitude for a mountain species, where fitness increases gradually from 800 m to 1800 m.
  • Parameters: a (minimum value) and b (maximum value).

    • Formula:

      • 0 if x ≤ a
      • (x − a) / (b − a) if a < x < b
      • 1 if x ≥ b


2. Decreasing linear

  • Opposite case: “the smaller, the better.”
  • Example: pollution levels, where a high value is bad.
  • Parameters: a, b as above, but reversed.


3. Trapezoidal

  • Represents an area of “full membership” surrounded by transitions.
  • Example: an ideal temperature between 64°F and 72°F, acceptable between 59°F and 75°F.
  • Parameters: a (transition start), b (ideal zone start), c (ideal zone end), d (transition end).


4. Triangular

  • Simplified variant of the trapezoidal curve.
  • Example: note an “ideal” humidity at a specific point (e.g., 65%), but tolerate some uncertainty around it.
  • Parameters: a (start of rise), b (peak), c (end of fall).


5. Increasing sigmoid (S)

  • Represents slow growth, then rapid growth, then stabilization.
  • Example: acceptability of a river flow for irrigation.
  • Parameters: c (central value), α (slope).


6. Decreasing sigmoid (Z)

  • “Inverted Z” curve: slow decrease → rapid decrease → plateau.
  • Example: soil salinity tolerance for a crop..

.


7. Gaussian

  • Bell curve.
  • Example: optimal sensitivity of a plant to a specific pH.
  • Parameters: c (center), σ (standard deviation controlling width).

.


Normalization vs. Fuzzy Transformation: What’s the Difference?

Classic Linear Normalization

Min-max normalization involves converting a raw numerical value x to a normalized scale ranging from 0 to 1.
This is done by subtracting the minimum value from the set, then dividing by the interval max⁡(x)−min⁡(x) according to the formula:

xnorm=x−min⁡(x) / max⁡(x)−min⁡(x)

  • Advantage: fast, universal, intuitive.
  • Disadvantage: does not take into account the meaning of the values. Everything is treated as proportional.

Example:
For a temperature between 10°C and 30°C, 20°C becomes 0.5… but that does not necessarily mean that 20°C is “moderately favorable.” It is just in the middle of the range.


Fuzzy transformation (membership function)

Fuzzy transformation does not simply “rescale”: it expresses a degree of satisfaction, preference, or membership in a category.

For example, a temperature of 20°C can be:

  • perfect (membership = 1) for a species,
  • acceptable (membership = 0.6),
  • insufficient (membership = 0.2),
    depending on a function defined by the expert or the model.

This makes it possible to:

  • model human or biological preferences,
  • make the system more robust to extreme variations,
  • introduce areas of uncertainty or transition (e.g., “neither good nor bad”).


Visual comparison

Gross value Normalized (linear) Fuzzy (triangular centered on 20°C)
10 °C 0.0 0.0
15 °C 0.25 0.5
20 °C 0.5 1.0 (optimum)
25 °C 0.75 0.5
30 °C 1.0 0.0


Conclusion

  • Normalization is useful for making data comparable.
  • Fuzzy transformation is essential when modeling preferences, uncertainties, or qualitative judgments.

In summary:
Normalization = scaling
Fuzzy = interpretation of meaning


Here is a graph comparing two methods of transforming a numerical attribute:

  • Linear normalization (min-max): linearly transforms a variable between 0 and 1. Each value is proportionally converted according to its limits.
  • Fuzzy transformation (triangular function): gives maximum importance to a central value (here 20°C) and decreases symmetrically towards 0.

Key difference:

  • Normalization gives no preference: 30 is considered as important (1) as 20.
  • Fuzzy transformation incorporates an area of maximum relevance (the peak of the function) and reflects the idea of values that are more or less compatible with an ideal criterion.

This principle is fundamental for modeling human preferences, fuzzy thresholds, or areas of uncertainty.


To be continued…

In the second part, we will see how to combine several fuzzy maps or indicators using aggregation functions. This step will allow us to move from isolated analyses to a global synthesis, taking into account the uncertainty and preferences specific to each project.


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 *