I creating home ranges for wolf packs utilizing the kde, isopleth, and cliprasterbypoly tools in GME. I have no problem running through these one at a time; however, I would like to get the process down to just three steps instead of three steps per pack. Right now I create an individual shapefile for each pack's points, and just run everything through GME using the command builder. So, my first stab at trying to get this to work was to try to bring in a shapefile with multiple packs points on it. So, I tried this:

 packs <- c("CC", "CO", "DC", "IC", "PR")

for(i in 1:lengths(packs)){
\Packs.shp", out=("kde_", packs[i], ".img") bandwidth="LSCV", cellsize=100);

In this situation, I would like to be running multiple kde examinations of a single file, but have multiple outputs, based on pack names section (which is in the attribute table as "WolfPack"). However, for the isopleth and cliprasterbypoly sections I would want to run through multiple times in each but with a different input file each time.


You can get GME to select the attributes (such as individuals by year, month, pack or whatever you need) from the file you want to create the shapefile for through creating command text.

The GME manual gives you most of the basics for creating the text, but one tip is that if the data in a column is text you need to put it in inverted columns, while number formats you do not.

Here is an example:

kde(in="J:\\Projects\Fauna\Kangaroos\GPS HR\shps\Male_all_FINAL_NewYear.shp", out="J:\Projects\Fauna\Kangaroos\GME\raster\SCV\HR_season by year_SCV\Acorn\Acorn_kde_summerYear1SCV.img", bandwidth="SCV", cellsize=20, where="Name='Acorn' AND Season='summer' AND Year_No=1")

I don't know how to do it in batch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.