First glimpse of a new QGIS plugin. Land cover statistics for classified raster shapes
Since last week i spend my evenings in order to code a new plugin for the QGIS community. It deals with Land cover analysis of classified raster shapes such as the CORINE dataset.
The plugin is named LecoS, which stands for Landscape Ecology Statistics, and is able to compute some of the often used FRAGSTAT metrics directly in QGIS (FRAGSTAT is only available for Windows and don’t work on many Linux machines without major reconfigurations). This includes for example the mean patch area or the number of identified patches per class (like the number of forest patches in an agricultural matrix). More metrics will be added in the feature. The user can choose if he wants to compute a single or several metrics in a row. Additionally i want to include the possibility to define a custom metric for special calculations in order to add flexibility.

Displays the graphical surface of my new plugin and a classified forest cover raster in the background.
I will release the plugin in the near future. Although it is already running and basically working there are a lot of little bugs and the majority of metrics still needs to be implemented.
Things to be done
- Adding more metrics (for instance total edge length or the landscape division index)
- Designing the GUI surface for the Custom metric calculation (will be awesome)
- Ugly Bug hunting
- Adding a batch processor for features of masked vector shapes
- …
Stay tuned!

Cool, looking forwards to the release of this plugin. Will it (eventuallly) have similar functions as in the r.li – Landscape structure analysis package for GRASS?
Yes it will and if i have the time even more. R.li only computes some metrics and there are so many more exciting indices for quantifying landscape structures (such as the aggregation index for clumped structures). I also believe that a QGIS-gui will benefit many users not familiar with GRASS.
I also want to add an option to define an own metric by combining several raster outputs. Furthermore i will implement a cover analysis snippet for masked polygons in the future (initially triggered by my question in stackexchange http://tinyurl.com/8scquev ). But i am exaggerating. There is still a lot to do and some things don’t work as they should 🙂
I was mostly asking because last time I tried, I couldn’t really get r.li to work, so I would be very happy with an alternative :-).
mhhh, up to now i usually use R and the package “SDMTools” with the function “classstat”. If you’re familiar with R this is also a nice and fast way to calculate fragstat metrics.
Concerning your question on SE, I just posted a possible answer using GRASS. I hope I understood your question alright.
I already solved the problem.
Nevertheless thanks for providing a new way to calculate these values. +1
I know R reasonably well, but my problem is that is runs into problems with very large raster layers. Even the raster package can become very slow when data sets are very large in my experience.
this is indeed a problem. I haven’t tested or compared calculation speeds of my plugin, but don’t expect a miracle 🙂 Python isn’t the best way to calculate CPU-intensive operations (but i don’t know any c++, so i will stick with it) and i assume that the speed will also drop with increasing raster size.