CKLR Logo

CKGR Lion Research Appendix 6 Scripts for clipping and analyzing herbivore density data into lion home ranges.

For ANU Research Thesis entitled : The Ecology and Management of Kalahari Lions in a Conflict Area in Central Botswana.



Here I present the script used in the Geospatial Modelling Environment (GME) software package.

Script 1 - Estimating the density of herbivores in the home range of each study lion.

The purpose of this script is to estimate on a month-by- month basis, the mean density of each herbivore species estimated from Chapter 2 density maps within the home range for each lion for each month. This method takes into account density of herbivore in both major habitat types, at different points across the study area, using all
the information that was deemed important in the Generalised Linear Modelling exercise from Chapter 2, such as NDVI, month and latitude and longitude, as the density on each .TIF image is an estimate based on these variables. For example the mean density of oryx in January 2009 inside the home range for lion SM009 in the same month is the result. The following is an example of the GME code used to estimate this:

isectpolyrst(in="O:\PreyPredict\KDE\mcp_1001.shp", raster="O:\PreyPredict\Raster\ORX13.tif", prefix="ORX", metrics="MN", where=""id" = '13'");
........


where
O:\PreyPredict\KDE\mcp_SM009.shp  is the mcp for lion SM009 in the 13th month of the study (January 2009) for the gemsbok (oryx or ORX) density estimate for the same month. The ESRI shape file contains all the monthly MCP polygons for the lion SM009, identified in the "id" field by a corresponding number and selected with the phrase "where = ""id"= '13'". The mean of these values is requested by the metrics = "MN" phrase.

Code was generated for each combination of lion monthly home range  (each lion x each month x 3 HR types MCP, KDE 50% and KDE 95%) and herbivore species (9 herbivores with sufficient data), which generated values in the animals per square kilometre unit, for use in GLMM analysis found in chapter 4. Three examples can be found in the example file here, namely ORXPan, ORXDune and SPBPan (e.g. Springbok density in the pan habitat). An esimate for the total numbers of groups of all herbivore species was calculated in a similar way and can be found in the DuneHrbGrpSize and PanHrbGrpSize columns (variables) respectively.


www.kalaharilionresearch.org