r.li.daemon(1)
β¨ r.li.daemon β¨
okay bestie, buckle up β this is the manual page for r.li.daemon, part of the GRASS GIS User's Manual, and it's literally the backstage pass to landscape index calculations on raster maps. π¦
π NAME π
Support for landscape index calculations on raster</purl> β yep, that's the whole vibe. π
πΈ DESCRIPTION πΈ
okay so, this documentation? It's focused on scientists and developers who want to implement a new landscape index computation. If you're just here to use the thing, go peek at the r.li modules overview and the g.gui.rlisetup module β that's the user-focused documentation, and it's giving very approachable. π
r.li.daemon provides support for landscape index calculations on raster maps. It hides all the management of areas β the ones defined using the g.gui.rlisetup command. And no cap: it is not used like a standalone program. Its functions are a library used by all r.li.[index] commands. periodt.
This description is a tutorial for new index definition. So the developer only has to focus on a unique area, like in mathematical definitions, and has to write a C implementation of it. The areas are defined using a struct called area_des, and its members are explained in the source code (doxygen) documentation. π
To write a new index, literally only two steps are needed:
- Define a function and insert its declaration on file
index.hinr.li.daemonfolder, which contains all index declarations. This function must be of this kind:
int index(int fd, char ** par, area_des ad, double * result)
where:
fdis the raster map descriptorparis a matrix for special parameter (likeargvinmain)adis the area descriptorresultis where to put the index calculation result
This function has to return 1 on success and 0 otherwise. This function type is defined using typedef named rli_func.
- Create a main for command line arguments parsing, and call the function
int calculateIndex(char *file, rli_func *f,
char **parameters, char *raster, char *output);
from the r.li library, for starting raster analysis. It follows the meaning of parameters:
filename of configuration file created usingg.gui.rlisetupfpointer to index function defined aboveparameterspointer to index special parametersrastername of raster to useoutputoutput file name
Compile it using a changed Makefile based on the file for r.li.patchdensity. π₯
Refer to the r.li library documentation in the source code and implementation of r.li modules for details and examples. π
π NOTES π
ngl, using GRASS library function to access raster rows can slow down moving windows execution. So it is recommended to use
RLI_get_cell_row(int, int, area_des)
RLI_get_fcell_row(int, int, area_des)
RLI_get_dcell_row(int, int, area_des)
to use an ad hoc build memory management developed to speed up the system. The documentation is in doxygen files. β¨
π¦ SEE ALSO π¦
- old
r.lemanual r.li- package overviewg.gui.rlisetup
π REFERENCES π
McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern analysis program for quantifying landscape structure. USDA For. Serv. Gen. Tech. Rep. PNW-351. (PDF)
π AUTHORS π
Claudio Porta and Lucio Davide Spano, students of Computer Science University of Pisa (Italy). Commission from Faunalia Pontedera (PI) Rewritten from "r.le.setup" by William L. Baker Various bug fixes by Markus Metz
π SOURCE CODE π
Available at: Support for landscape index calculations on raster source code (history)
Accessed: Saturday Jan 17 05:40:48 2026
Main index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie π«Ά β written for GRASS 8.4.2, from the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, accessed Saturday Jan 17 05:40:48 2026. go forth and compute some landscape indices, you icon π
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms