Forest Fragmentation index using GRASS GIS

Forest fragmentation index map

Worldwide, forests have been changed dramatically by humans, particularly during the last decades. The loss of old forest stands causes threads to biodiversity and life-important ecosystem services. Loss of forests does not necessarily mean a total clearing, but it starts with ‘forest degradation’, which is in many cases caused by fragmentation processes.

In order to measure the degree of global forest fragmentation, an approach was developed by Riitters et al. (2000). This approach can easily be implemented on any scale using a selection of tools provided by GRASS GIS, one of the most powerful Open Source GIS platforms. To perform a complete forest fragmentation calculation in one step, these tools were put together into one shell-script, that you can download from the GRASS-addons page: r.forestfrag.sh.

Update: Thanks to Ecostudies, the script was further developed and can now also be used in GRASS 7.

 

How to use r.forestfrag.sh

The only input you need to perform this automated forest fragmentation calculation is a forest/non-forest raster-map. r.forestfrag.sh assumes that forest-pixels have the value ‘1’, non-forest pixels the value ‘0’.

After you downloaded the script, open the GRASS-mapset where your forest map is located.  From within the GRASS-shell, navigate to the folder of the r.forestfrag.sh script. Make sure that the script is executable, then you should be able to start it as follows:

 

   ./r.forestfrag.sh <name_of_forest_map>

 

Like for other GRASS-tools, you can also get help by typing

 

   ./r.forestfrag.sh --help

 

What the script is doing

To calculate the forest fragmentation, Riiters et al. (2000) define two variables that are derived from neighbourhood-relations between forest- and non-forest pixels. The first variable is ‘pf’, which represents the number of forest-pixels devided by the total number of pixels within the moving window (in our case, the shell-script provides for a 3×3 moving-window). This calculation of pf is performed using the ‘r.neighbors’ and ‘r.mapcalc’ tools.

More complex is the calculation of pff, the second variable that is defined by the number of forest-forest pairs devided by the number of pairs that include at least one forest-pixel within the moving window. Here, we cannot use the r.neighbors tool any more, as it does not provide for considering pairs. So we have to move to r.mapcalc, which is more flexible.

The number of forest-forest pairs is calculated using the r.mapcalc neighborhood modifier. Here we can specify the offset from the original pixel to the pixel of consideration and perform calculations on it:

 

   r.mapcalc "F1=(A[1,-1]*A[1,0])+(A[1,0]*A[1,1])+...

 

The upper left pixel becomes ‘1’, if the pixel itself and its neighboring pixel to the right both have the value ‘1’, meaning they are both forested. If one or both of the pixels are ‘0’, then the calculated value becomes also ‘0’. This is performed for any pixel in the 3×3 moving window. The sum of all values becomes the new value assigned to the center pixel.

The same principle applies for the calculation of pairs that include at least one forest pixel, only that the r.mapcalc expression becomes even more complex:

 

   r.mapcalc "F2=if((A[ 1,-1]+A[ 1, 0])>0,1)+if((A[ 1, 0]+A[ 1, 1])>0,1)+ ...

 

If one or both pixel(s) of the pair have the value ‘1’, the result will be >0 and the new value assigned will be ‘1’. Only if both pixels have have the value ‘0’, the new value becomes ‘0’.

After pf and pff are calculated, the whole map can be indexed using the rules provided by Riiters et al. (2000)

patch: pf < 0.4
transitional: 0.4 < pf < 0.6
edge: pf > 0.6 and pf – pff < 0
perforated: pf > 0.6 and pf – pff > 0
interior: pf = 1.0
undetermined: pf > 0.6 and pf = pff

Finally, r.forestfrag.sh generates colors and a final report showing the areas (in ha) for each fragmentation class.

From forest-/non-forest (left) to forest fragmentation map (right)

Tags: , , , ,