# Fuzzy memberships with trapezoid shape in ArcMap

I would like to combine two raster data (temperature and precipitation) using fuzzy modeling in ArcMap. Each raster is defined by three membership functions with trapezoid shape (e.g. cold, warm, and hot for temperature). I am wondering how I can create the membership functions (Fuzzification) for each raster in ArcMap. The problem is that looking to the ArcGIS documentation, I do not see any option for the case of trapezoid shape. The possible membership functions in ArcGIS are: Gaussian, Large, Linear, MSLarge, MSSmall, Near and Small (see the link below).

How can I solve this? Should I use another package, for instance Python NumPy?

Python NumPy: http://resources.arcgis.com/en/help/main/10.1/index.html#//002z00000028000000

I edit my post in order to give better idea about my question. Here I show an example of how is defined the membership functions for precipitation. Each trapezoid function is define by its four vertices:
Dry (300, 350, 470, 515),
Medium (470, 515, 540, 568),
Wet (540, 568, 580, 665).

And also for the temperature data:
Cold (6, 7, 8.1, 8.3),
Warm (8.1, 8.3, 8.5, 8.6),
Hot (8.5, 8.6, 8.8, 10).

Then I assign the output values for the total combination of all membership functions of the inputs. Because there are 2 inputs (temperature and precipitation) with 3 membership functions each, there are in total 9 combinations.

IF temperature = ‘cold’ AND precipitation= ‘dry’ THEN output = 0.35
IF temperature = ‘cold’ AND precipitation= ‘medium’ THEN output = 0.15
...
IF temperature = ‘hot’ AND precipitation =’wet’ THEN output = 0.85

After defining the membership functions and the output value for each combination, it should be a way to get the ‘truth value’. For instance, when temperature is 7.8 and precipitation is 501, there is an overlapping of the membership functions in precipitation. Therefore there are two ‘truth values’:

IF temperature = ‘cold’ AND precipitation = ‘medium’ THEN output = 0.15
IF temperature = ‘cold’ AND precipitation = ‘dry’ THEN output = 0.35

The ‘truth value’ for the case of ‘dry’ precipitation is 0.317 and for ‘medium’ is 0.683. Thus, in order to get my ‘entire output’, the ‘output’ values are multiplied by their ‘truth values’ and then the two new values are added up.

Case for ‘dry’ precipitation: 0.35*0.317 = 0.111
Case for ‘medium’ precipitation: 0.15*0.683 = 0.102
Sum both cases: 0.111 + 0.102 = 0.213

0.213 is my ‘entire output’, this means the output value that I should have when the temperature is 7.8 and precipitation is 501.

You can calculate member using field calculator.

INPUT: 1st out of 3 rasters to be mosaicked later:  I used

``````Con("rain" >= 340,-0.0104167 * "rain"+4.54167)
``````

to compute 2nd raster and

``````Con(IsNull("ge340") & IsNull("le152"),1)
``````

to compute 3rd.

MOSAIC RESULT Alternatively just reclass your rasters into say 0.5, 1.0, 0.5

• Hi FelixIP. I added some more information in my question because I do not know how I can get the ‘truth values’ when there is the case of overlapping two membership functions using only the Raster Calculator. Maybe I do not understand completely your answer due to I am a beginner with this topic. – Florestal Jan 25 '16 at 17:57
• @Florestal if you have a good look I also used trapezoidal function [(20,0),(152,1), (340,1), (436,0)] described by 4 points to convert precipitation range into something in range 0..1. I don't understand you approach, but I guess you have to produce 6 members using calcs similar to shown in my answer – FelixIP Jan 25 '16 at 19:08
• Thanks @FelixIP for the explanation. I have tried to understand the calculations, but there is one value that I do not see it yet. For example, in the 1st raster I see: 0.00776*"rain"-0.151515 where 0.00776 is the slope1 of the trapezoid, but from where it comes the -0.151515 – Florestal Jan 26 '16 at 11:01
• It is intersect. Plotting 1st 2 points I used in Excel might help – FelixIP Jan 26 '16 at 19:08
• thanks for all the fast and clear answers. I was a bit lost, but I think this will be a good approach to follow. – Florestal Jan 26 '16 at 23:20