Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:using_local_saturation [2013/07/24 15:23]
juliana
tutorial:using_local_saturation [2013/07/24 17:18]
juliana
Line 8: Line 8:
 P2 = 0, case Li < Oc P2 = 0, case Li < Oc
 ** **
 +
 +where P2 is the new probability,​ P1 is the original probability,​ Li is the maximum number of cells of a particular class that is allowed to occur within a certain map neighborhood and Oc is the number of cells of that class within that neighborhood.
 +In this example, deforestation must stop in a local region (in this case a window size of 59.25 hectares or 9 cells  - 3x3 window) when 50% of this region is deforested. ​
 +For each model step, the amount of deforested cells is calculated in every 3x3 window of the landscape map. In this case, the threshold consists of five cells as follows: ​
 +
 +**P2 = P1 * (5 - Oc) / (5 + Oc),  case Li >= Oc\\
 +P2 = 0, case 5 < Oc**
 +
 +
 +[{{ :​tutorial:​advanced_21.jpg |Two landscapes without and with local saturation effect}}]
 +
 +Three //Calculate Map// functors are added to a deforestation simulation model in order to incorporate the saturation effect. Open them to see their equations. The first one assigns “1” to deforested cells and “0” to forest. The second counts the amount of cells deforested within a window size 3x3. It uses a neighborhood operator as follows: ​
 +
 +**nbCount(i1,​ 3, 3)**
 +
 +where nbCount is the neighborhood counting operator, i1 is map # 1, and 3,3 is the window size in cells. You could easily increase the neighborhood size, changing these values. Then, a third //Calculate Map// is added to apply the local saturation rule on the probability map as follows:
 +
 +**if v1 - i1 >= 0 then i2 * (v1 - i1) / (v1 + i1) else  0**
 +
 +Where v1 is the saturation value in number of cells (in this case equal to 5).
 +
 +{{ :​tutorial:​advanced_22.jpg |}}
 +
 +
 +As a result, deforestation will cease in local regions as they reach a saturation threshold and move to new areas with lower probability of deforestation,​ simulating therefore the diffusion of deforestation. ​