I am trying to calculate the shannon diversity index (r.li.shannon) for a landscape using the r.li tool in GRASS GIS 7.8.7. My input file is a raster of my different land covers with an assigned number for each class (similar to Corine Land Cover). I work with Windows 10.

However, it seems like I'm missing a "Configuration file" (cf. image below) which would enable me to do a "moving window" analysis (or at least, that's what I got from my QGIS (3.28.4) error message ["Your configuration needs to be a "moving window" configuration !"]. Or some values that I could also write up ("ou entrer les valeurs manuellement") but I've got no idea what I'm supposed to write there.

enter image description here

I read that I should be able to find that configuration file in "C:\Users\userxy\AppData\Roaming\GRASS7\r.li", however the r.li folder doesn't appear for me.

I don't find any way to open the "g.gui.rlisetup" window in GRASS 7.8.7 either, and I've looked everywhere.

What am I missing here?


2 Answers 2


I also suggest that you do this directly in GRASS GIS. Run the g.gui.rlisetup module and it creates the the config file for you (based on your choice of sampling regime). See: the manpage for details.

  • thank you for yor answer ! i couldn't find what you were referring to, but somebody helped me find the menu to create the configuration file so all is good.
    – erdbee
    Commented May 15, 2023 at 10:50

In GRASS (GUI) use the Raster -> Landscape patch analysis -> Set up sampling and analysis framework menu:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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