Macroecology for QGIS, the new QSDM plugin

This is just a quick posting informing all the QGIS interested readers of this blog that I am about to release a new QGIS plugin. It’s name is QSDM (QGIS Species Distribution Modelling) and similar as with LecoS it is particular suited for the practicing ecologists out there. This time i had no plan and interest of coding a graphical interface and thus the whole plugin can only be executed from within the Processing Toolbox (QGIS version > 2.0 ). In my opinion this will be the future of most advanced QGIS plugins anyway.

So what is the idea? Basically QSDM is a plugin taking statistical models for species distribution modeling to QGIS. For now only the famous Maxent is enabled and working, but the ambitious plan is to enable other modeling techniques such as RandomForests and LogisticRegression as well if the user has the necessary libraries enabled.

You might ask what is the advantage of running Maxent from within QGIS? First, you can immediately see the output so it is nice for visual exploration. Second, the QSDM plugin helps you with the formating of your layers and occurrence files. For instance all input raster layers are automatically unified to a common resolution and exported as ESRI .asc files. You simply need to load in your layers and let the tool do the rest. For those of you who want more control (and I really insist that you want to), I also enabled functions to generate a custom parameter file for Maxent and enabled an option to start the Maxent GUI in a new process.

–> I recognize that the easiness of this tool might tempt more people to execute tools without really understanding what they do and how they work. Please be sure what you do and always (!!!) validate the outputs of the tools you use (this includes QSDM). For understanding Maxent parameters I highly recommend reading the attached literature list and this publication!

Other things i implemented in the initial release of QSDM

  • Create Species Richness grid
    • Creates a new raster containing Species Richness or Endemism of input occurence layer
  • Calculate Niche Overlap Statistics
    • Can calculate Schoener’s D or Warren’s I based on Hellinger distances for all input layers.
  • Range Shift
    • Shows the difference between two input prediction layers. For instance for current and likely future conditions.
  • Data Transformations
    • Makes quick transformations of input raster layers

More is planned, but this depends entirely on my inclination to do so, the time I have available and if it can be useful for my own research as well.

Please remember that the plugin is still experimental. So please don’t be angry if it doesn’t work for you. testing was conducted on QGIS 2.2 stable on my Debian Linux machine and it should hopefully work for Windows as well. But similar as with LecoS i have no opportunity to test the plugin on Mac OS based systems and I also don’t really intend to :-p. Sorry Apple.


  • Steven J. Phillips, Robert P. Anderson and Robert E. Schapire, (2006) “Maximum entropy modeling of species geographic distributions” Ecological Modelling, Vol 190/3-4 pp 231-259
  • Steven J. Phillips and Miroslav Dudik, (2008) “Modeling of species distributions with Maxent: new extensions and a comprehensive evaluation.” Ecography, Vol 31, pp 161-175
  • Jane Elith et al. (2011) “A statistical explanation of MaxEnt for ecologists” Diversity and Distributions, 17, 43–57 DOI: 10.1111/j.1472-4642.2010.00725.x


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'

5 responses to “Macroecology for QGIS, the new QSDM plugin”

  1. pvanb says :

    Good work! What libraries you are thinking to use for e.g. randomforest?

    • Curlew says :

      Scikit learn.
      It is sort of the most powerful library/package outside R for machine-learning procedures. As soon as I can get it to work within a GIS framework there are many thinks that could be implemented like adaboost, SVMs or cluster algorithms.
      I also tried to recode your r.mess modul in python, but it is a bit harder than I expected (there is no apply function per row in python).

      • pvanb says :

        I was just going to propose that library to you (I found it yesterday after I wrote my previous comment).

        I started a while ago with an attempt to recod r.mess in Python, but for GRASS.. didn’t succeed yet either.. in my case because I have no experiencei in Python :-/. I had thought it would be easy if you have such experience though.

        I would love to utilize the Scikit in GRASS, but again, my lack of experience in Python makes that a no-go for now. Perhaps if you manage to get it to work with a GIS framework, it can be utilized in GRASS too.. keep me posted!

        I haven’t tried the Maxent yet, but I did try some other functions, like the niche overlap tool (wanted to see if the result is the same as my r.niche.similarity addon ( It is (well, almost, some deviation after the 5th decimal). Your implementation seems much faster.

        Btw, I can’t seem to select GRASS raster layers. If they are loaded, your tool doesn’t show them in the selection box. Selecting tif layers works without problem.

        • Curlew says :

          After all your GRASS code for the r.niche-similarity tool formed the basis for this little function. Calculations on Numpy arrays is indeed quite fast. I read somewhere that grass 7.0 also has numpy-integration, maybe you can improve your script?

          Uhh, have no idea about the selection. This might be a possible bug-report for the Processing tool. The command allows only RasterLayers as input ( self.addParameter(ParameterMultipleInput(self.ENV,’Environmental layers’,ParameterMultipleInput.TYPE_RASTER, False))
          ), thus GRASS layers are not considered raster layers by Processing?

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: