[GRASS-user] [GRASSLIST:270] Fwd: Developing a forest fragmentation index
Markus Neteler
neteler at osgeo.org
Sat Dec 27 05:38:17 PST 2014
On Sat, Dec 27, 2014 at 12:53 PM, anusheema <anusheema at gmail.com> wrote:
> Dear list members,
>
> I am also interested in implementing Dr. Kurt Ritters forest fragmentation
> model. I was, however, attempting this in R Statistical software, although I
> am pretty new to both R and GRASS.
Which GRASS version do you use?
> While reading forums on this model, I came across this post. I see that Mr.
> Maning Sambale and Mr. Stefan Sylla have developed an AddOn for GRASS:
> r.forestfrag (http://grasswiki.osgeo.org/wiki/GRASS_AddOns#r.forestfrag).
> But while trying to attempt this model on GRASS, it keeps showing an error
> (AddOn not found).
If you are using GRASS 6: the script has been written for GRASS 7. You
can install both 6 and 7 in parallel on the same computer. However, I
see a link to a GRASS 6 version of the script in the Wiki page.
If you are using GRASS 7: The reason is that it has not been
implemented as Python script but as Shell script. To my knowledge
g.extention (the extension manager) is not capable to deal with shell
scripts.
> If you could please share the script? I was trying to implement the script
> mentioned in this post, but without much luck. In R, with the help of this
> script, replicating Pf is easier, however, for Pff, implementing the code in
> cardinal direction only, is more complex.
You can simply download the script from here:
http://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.forestfrag/r.forestfrag?format=txt
and put it into the search path in your GRASS session. Be sure to set
the "executable" flag.
Please let us know how it goes.
Markus
More information about the grass-user
mailing list