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.

LecoS - Landscape Ecology Statistics

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!


Tags: , , , , ,

About Martin Jung

PhD researcher at the University of Sussex. Interested in nature conservation, ecology and biodiversity as well as statistics, GIS and 'big data'

8 responses to “First glimpse of a new QGIS plugin. Land cover statistics for classified raster shapes”

  1. pvanb says :

    Cool, looking forwards to the release of this plugin. Will it (eventuallly) have similar functions as in the – Landscape structure analysis package for GRASS?

  2. Curlew says :

    Yes it will and if i have the time even more. 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 ). But i am exaggerating. There is still a lot to do and some things don’t work as they should 🙂

    • pvanb says :

      I was mostly asking because last time I tried, I couldn’t really get to work, so I would be very happy with an alternative :-).

      • Curlew says :

        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.

    • pvanb says :

      Concerning your question on SE, I just posted a possible answer using GRASS. I hope I understood your question alright.

  3. pvanb says :

    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.

    • Curlew says :

      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.

Sussex Research Hive

Supporting the research community at the University of Sussex

Small Pond Science

Research, teaching, and mentorship in the sciences

Landscape Ecology 2.0

intersecting landscape ecology, open science, and R


The Research Blog of IIASA

Jörg Steinkamps Blog

Mainly things about R, Linux and vegetation modeling

Amy Whitehead's Research

the ecological musings of a conservation biologist

Michael McCarthy's Research

School of BioSciences, The University of Melbourne

The Rostrum

science, statistics, policy and more


Environmental Change - Understand, Predict, Adapt

Dynamic Ecology

Multa novit vulpes


METeorological Visualisation Utilities using R for Science and Teaching

A Birder´s Blog

"Everybody loves what they know"


A new metric to quantify biodiversity response to fragmentation

Trust Me, I'm a Geographer

Using Technology to Explore Our World

Duncan Golicher's weblog

Research, scripts and life in Chiapas

%d bloggers like this: