Update of r.forestfrag addon

I just updated the r.forestfrag addon for GRASS GIS. The addon, which I described before, was developed based on an script by Sylla consult,  and can be used to characterizes the degree of fragmentation following the approach proposed by Riiters et al. (2000). It identifies six categories of fragmentation, viz., interior, perforated, edge, transitional, patch, and undetermined, based on the amount of forest and its occurrence as adjacent forest pixels within a user-defined distance (i.e., the user sets the size of moving window used to compute the index). 

The addon assumed that the input map had only two values, viz., 1 (forest) or no-forest (0). It did therefore not handle properly no-data areas. This meant that for example rivers or other water bodies had to be classified as no-forest. The possibly unintended results was that forest areas adjacent to these rivers or coastal lines would be classified as perforated or edge, while in reality these should be considered as forest interior. With the new update, no-data (NULL) raster cells are ignored. Thus, if one wants e.g., rivers to be excluded, one can mask them out (classify them as no-data) in the input layer.

In the example below, I am creating a forest fragmentation map for south America. As input I use the IGBP Land Cover map from the South America Land Cover Characteristics Data Base Version 2.0.

IGBP LUCC
IGBP Land Cover Classification map of south America, from the South America Land Cover Characteristics Data Base Version 2.0.

First I reclassified this map into a binary map with forest – non-forest, whereby I masked out all water areas. Next, I ran the r.forestfrag with moving window size of 9. With the ‘s’ flag set, the addon also generates a report showing the areas (in ha) for each fragmentation class.

MAP="saigbpl20@PERMANENT"
r.reclass input=saigbpl20 output=forest << EOF
0 = 0
1 thru 5 = 1
6 thru 16 = 0
* = NULL
EOF
r.mapcalc "forest = forest" --overwrite
r.forestfrag -s input=forest output=frag window=9

The resulting maps shows the six fragmentation categories and the water bodies (darkblue). In the inset, you can see that there are areas classified as ‘interior’ up to the water body, i.e., these rivers are ignored when the fragmentation index is computed.

fragmentation map
Map of south America with six categories depicting the forest fragmentation

The user can opt to print out the summary area statistics for this map by setting the ‘s’ flag. All this does is to run r.stats so you can of course do this afterwards yourself as well.

report
Area statistic of the fragmentation map

You can install the addon using the extension manager (g.extension). For the manual page, see here. For questions or comments, leave a message below or send an email tot the GRASS GIS email list.

 

 

Advertisements

3 thoughts on “Update of r.forestfrag addon

  1. Pingback: Update of r.forestfrag addon for GRASS GIS. – GeoNe.ws

  2. Robert Ross Wardrup

    I can ask via the GRASS email list if necessary but I thought you might have an idea. I’m using r.forestrag for a study but can’t figure out a good method of determine which window size to use. Do you know if anyone has established any sort of framework, other than arbitrarily choosing the size?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s