1. Geoinformatics FCE CTU 2011
Prague, Czech Republic, 19-20 May 2011
Application of GRASS fuzzy modeling
system:
estimation of prone risk in Arno River Area
Jarosław Jasiewicz Margherita Di Leo
Adam Mickiewicz University, Geoecology and Department of Environmental Engineering
Geoinformation Institute and Physics (DIFA),
Dzięgielowa 27, 60-680 Poznań, Poland University of Basilicata
& via dell'Ateneo Lucano, 10, 85100 Potenza
University of Cincinnati, Department of Geography, Italy
Space Informatics Lab
401 Braunstain Hall, 45221 Cincinnati OH
2. Fuzzy system
● Fuzzy logic belongs to multiple-valued logic and deals
with approximate reasoning rather than exact results.
● In contrast with "Boolean logic", where binary sets
have two-values: true or false, fuzzy logic variables
may deal with partial truth with membership degree
between 0 and 1, where the truth value may range
between completely true and completely false.
● Fuzzy logic uses linguistic variables (TERMS) which
may be managed by specific functions.
● Fuzzy systems steam from fuzzy set theory by Lotfi
Zadeh.
4. What is the inference process?
● Fuzzy inference systems are applied in numerous
fields such as automatic control, data classification,
decision analysis, expert systems, or computer
vision.
● The most common fuzzy inference method is based
on Mamdani's methodology (1975).
● Fuzzy inference is a mapping process from a given
input to an output. The process of fuzzy inference
involves following steps:
5. Fuzzy inference process
parameters
DATA
IMPLICATION
from
FUZZYFICATION FUZZY LOGIC
antecedent AGGREGATION DEFUZZYFICATION
(membership grades) OPERATION
to
consequent
RESULT
Fuzzy map Fuzzy map
Fuzzy rules
definition definition
6. GRASS Fuzzy System
Fuzzy system is powerful and easy-to-use modeling
system for GRASS GIS.
It consists of three modules:
✔ r.fuzzy.set: modeling membership in the fuzzy set
✔ r.fuzzy.logic: fuzzy logic operation
✔ r.fuzzy.system: fuzzy inference system
7. When this approach can be useful?
● Every time there are no transparent rules of
reasoning (use heuristics instead of procedures)
● Where data are incomplete or of poor quality
● Where boundaries in data clusters are uncertain or
fuzzy
● When we want to improve simple overlay models
based on binary logic
8. The main difference between boolean and
fuzzy reasoning:
If elevation_above_river is <5m and
distance_to_river is <400m then flood_risk is 95%
We assume here we know the rules of river behavior
according long term monitoring or precise modeling.
If not, we still can use heuristic:
If elevation_above_river is “low” and
distance_to_river is “near” then flood_risk is “high”
9. What does it mean?
● We do not know precise notion of TERM LOW but
we can assume that it is something below 3m
(absolutely yes) between 3m and 5m (maybe) and
above 5m (absolutely no)
1.2
1
0.8
MEMBERSHIP
NO
0.6 fuzzy
boolean
0.4
YES
0.2
0
0 1 2 3 4 5 6 7 8
ELEVATION ABOVE STREAM
10. Study area: Arno river basin
Digital elevation model of
Arno area
Area = 8830 km2
Elev. Range = 0 ~ 1650 m a.s.l.
11. DEM derivatives
A
A)Elevation above water courses
B)Distance to streams
C)Modified topographic index
D)Minimum curvature
C
B D
12. River Network
● Created with r.stream.extract using Montgomery's
approach with exponent=2 accumulation
threshold=30000 and deleting streams shorter than
15 cells
r.stream.extract elevation=DEM40 accumulation=ACCUM threshold=30000
mexp=2 stream_length=10 stream_rast=STREAMS stream_vect=streamsM direction=DIRSM
● Elevation above and distance to streams have been
calculated with following line command:
r.stream.distance stream=STREAMS dirs=DIRSM elevation=DEM40
method=downstream distance=DISTANCESTREAMS difference=ELEVATIONDIFF
14. Minimal curvature
● Minimal curvature (suitable to detect channels)
was calculated as follows:
r.param.scale input="DEM40" output="MINCURV"
s_tol=1.0 c_tol=0.0001 size=5 param="maxic"
15. MTI Topographic Index
● MTI has been calculated according Manfreda 2007
((acc+1)⋅cellsize)n
MTI=log
tan(slope+0.001)
● MTI has been proven (Manfreda et al. 2011) to be
strongly related to flood prone areas
r.param.scale input=DEM40 output=SLOPE size=5 param=slope
r.watershed -a -b elevation=DEM40 accumulation=ACCUM convergence=2
r.mapcalc MTI = log((exp(((ACCUM+1)*40),0.087))/(tan(SLOPE+0.001)))
16. Fuzzyfication
● Fuzzyfication is a process which in most fuzzy
logic systems creates a lot of intermediate or even
resulting maps
● GRASS fuzzy system can use r.fuzzy.set to
visualize/analyze results of fuzzyfication process
(however this stage is not necessary)
22. Definition of fuzzy sets (MAP file)
%MTI
● $ low {right; 3,5; sshaped; 0; 1} Output map defines the values for output
resulting map.
● $ moderate {both; 3,5,7,9; sshaped; 0; 1}
● $ high {left; 7,9; sshaped; 0; 1} THIS IS NOT PROBABILITY
%ELEVATIONSTREAMS (in percentage). This is only a number defining
the membership in following set. For example
● $ low {right; 2,4; sshaped; 0; 1} value 71 means that it is both normal and high
● $ moderate {both; 2,3,5,6; sshaped; 0; 1} risk
● $ high {both; 5,6,7,8; sshaped; 0; 1}
● $ veryhigh {left; 7,8; sshaped; 0; 1} #output map
%_OUTPUT_
%DISTANCESTREAMS
● $ near {right; 100,300; sshaped; 0; 1}
● $ none {both; 0,20,20,40; linear; 0;1}
● $ far {both; 100,300,500,600; sshaped; 0; 1} ● $ low {both; 20,40,40,60; linear; 0;1}
● $ veryfar {left; 500,600; sshaped; 0; 1}
● $ normal {both; 40,60,60,80; linear; 0;1}
%CURVMIN ● $ high {both; 60,80,80,100; linear; 0;1}
● $ concave {right; -0.007,-0.003; sshaped; 0; 1}
● $ flat {both; -0.007,-0.003,0,0.0001; sshaped; 0; 1}
● $ convex {left; 0,0.0001; sshaped; 0; 1}
23. Definition of fuzzy rules (RUL file)
There are four rules which determine flood risk:
they are stored in separate file arno.rul
● $ none {(CURVMIN=convex & ELEVATIONSTREAMS=high) |
ELEVATIONSTREAMS=veryhigh}
areas where is no risk are defined as: all convex areas lying high above watercourses OR
lying very high above watercourses
● $ low {MTI=low & ELEVATIONSTREAMS~veryhigh}
the area of low probability are defined as area of low values of topographic index AND
(but) not very high. It usually means higher areas in deeply dissected mountain valleys
● $ normal {MTI = moderate | ELEVATIONSTREAMS=moderate | CURVMIN = concave}
two types of areas has been qualified as area of moderate risk: area with moderate MTI OR
lying not very high above watercourses (lowlands) OR in concave valleys (mountains)
● $ high {(ELEVATIONSTREAMS = low & MTI = high) | (ELEVATIONSTREAMS = low
& DISTANCESTREAMS = near)}
also two type of areas: low lying with high MTI for flats like Arno delta and low lying and
nearby watercourses for rest of areas
24. Other parameters
● Fuzzy logic family
several fuzzy logic family (es. Zadeh, Lukasiewicz, Fodor, Hamacher etc.)
● Implication method
product or maximum
● Universe resolution (precision of analysis)
● Defuzzyfication method
several methods including centroid and bisector
25. Final result : flood risk map
Flood risk:
High
Normal
Low
None
26. Validation of results
Risk map obtained by
Risk map obtained by accurate hydrological-
fuzzy logic model hydraulic models (by
Arno River Basin
Authority)
27. Validation of results
Underestimation (area of no risk inside ARNO
RISK area according to our model in yellow)
Overlay of the two risk maps
Overestimation (area of low and higher risk
outside ARNO RISK area according to our
model in yellow)
28. Conclusions
✔ The model is suitable to detect flood prone areas
only on the basis of DEM derivatives.
✔ Thanks to fuzzy logic it was possible to build the
model without quantify all the variables involved
in the process, only using linguistic variables.
✔ The approach can be applied to many other
different contests
✔ r.fuzzy.system is very easy to apply without
advanced knowledge on fuzzy logic.
29. License of this document
This work is licensed under a Creative Commons License.
http://creativecommons.org/licenses/by-sa/3.0/
2011, Margherita Di Leo, Italy
dileomargherita@gmail.com
License details: Attribution-ShareAlike 3.0:
You are free:
* to Share — to copy, distribute and transmit the work
* to Remix — to adapt the work
Under the following conditions:
* Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any
way that suggests that they endorse you or your use of the work).
*Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only
under the same, similar or a compatible license.
With the understanding that:
* Waiver — Any of the above conditions can be waived if you get permission from the copyright holder.
* Other Rights — In no way are any of the following rights affected by the license:
o Your fair dealing or fair use rights;
o The author's moral rights;
o Rights other persons may have either in the work itself or in how the work is used, such as publicity or
privacy rights.