Minimum Convex Polygon
Last updated
Last updated
Create Minimum Convex Polygon (MCP) of the movement data using Minimum Bounding Geometry tool and R. These are the simplest defined areas; polygons defined by the outside extent of the data points. The MCP is probably the most widely used estimation method. This method consists in the calculation of the smallest convex polygon enclosing all the relocations of the animal. Convex polygons do tend to overestimate home ranges and may include a lot of area not utilized or occupied
In the processing tool box, search for Minimum Bounding Geometry
Select your input layer, and Convex Hull as the geometry type. Alternatively you could select concave, however this will encompass fewer regions of space not used by the animal when compared to convex geometry. *Extreme outlier points will impact the shape, area, perimeter or centroid of this output.
Your map should look something like this:
Alternatively, we can use a SQL statement to create a convex hull.
Navigate to Database
> DB manager
Select Virtual Layers
> points
Select SQL Window
and enter the following Query:
SELECT row_number() OVER () As tag_ident, ST_ConvexHull(ST_Collect(geometry)) FROM points;
Toggle on Load as Layer
Select Load
Looks like there's a lot of unused space. Is the area calculated normally used by these individuals? We can see how MCP home range size changes by excluding a certain percentage of points using the MCP function in the R Provider.
In this next part we will run an R script to specify the percentage of coordinates to be included. You need R and the adehabitatHR package installed to run the script in QGIS.
The package adehabitatHR contains functions dealing with home-range analysis. See this link for more information.
Being able to interface from R to QGIS has multiple benefits to the R user community. It is a special feature of QGIS that it acts as an umbrella integrating various other GIS power houses under its hood.
When you downloaded GIS resources there are already some shared R scripts that can be used without having to write any code. Navigate to your processing tool > R > Home Range Analysis
Right click on this script and select Edit. You can now see exactly what the tool will be doing using R.
If you want to group it by a field copy and paste this code in your script editor
Every R Script in QGIS must specify some parameters before the script body:
The name of the group in which you want to put your script (if the group does not exist, it will be created):
You have to tell Processing that you want to display a vector
You also need to tell Processing about your input data. In this example we want to create a MCP from a field of a vector layer:
Processing now knows that the input is a vector. The name Layer is not important, what matters is the vector parameter.
You also have to specify the input field of the vector layer (using the name you have provided above - Layer):
Processing now knows that you need a field of Layer, and that you will call it X.
Finally you have to specify output type
To run the R script, double click it from the processing tool box and a GUI will appear. Fill in the parameters and click Run.
One problem with Convex Hulls is they don't account for different densities of points in different areas of the home range. Kernel density estimates the probability of finding a point within every area of the study region and maps those probabilities as a continuous surface. Let's run a KDE next!