GRASS logo __________________________________________________________________ ÐÐÐСÐÐÐÐ r.li.daemon provides a support for landscape index calculation on raster maps. It hides the managment of areas, defined using [1]r.li.setup command. It do not have to be used like a standalone program, but its functions are a library used by all r.li.[index] commands. This description is a tutorial for new index definition. The developer has only 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 it members are explained in the source code (doxygen) documentation. To write a new index only two steps are needed: 1. Define a function and insert its declaration on file index.h in r.li.daemon folder, which contains all index declarations. This function must be of this kind: int index(int fd, char ** par, area_des ad, double * result) where: + fd is the raster map descriptor + par is a matrix for special parameter (like argv in main) + ad is the area descriptor + result is where to put the index calculation result This function has to return 1 on success and 0 otherwise. 2. Create a main for command line arguments parsing, and call the function int calculateIndex(char * file, int f(int, char** area_des, double *), char **parameters, char *raster, char *output); from the r.li library, for starting raster analysis. It follows the meaning of parameters: + file name of configuration file created using [2]r.li.setup + f pointer to index function defined above + parameters pointer to index special parameters + raster name of raster to use + output output file name Compile it using a changed Makefile based on the file for r.li.patchdensity. ÐÐ ÐÐÐЧÐÐÐЯ Using GRASS library function to access raster rows can slow down moving windows execution. 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 managment developed to speed up the system. The documentation is in doxygen files. СÐ. ТÐÐÐÐ [3]old r.le manual [4]r.li package overview [5]r.li.patchdensity, [6]r.li.setup ÐÐТÐРЫ Claudio Porta and Lucio Davide Spano, students of Computer Science University of Pisa (Italy). Commission from Faunalia Pontedera (PI) Rebuild of r.le.setup from William L. Baker This program is free software under the GPL (>=v2) Read the COPYING file that comes with GRASS for details. ÐÐÐÐСТÐЫРÐШÐÐÐÐ Pleas send bugs reports to [7]spano@cli.di.unipi.it, [8]porta@cli.di.unipi.it Last changed: $Date: 2007-03-11 12:50:13 -0500 (ÐÑ, 11 Ð¼Ð°Ñ 2007) $ __________________________________________________________________ [9]Main index - [10]raster index - [11]Full index ÐвÑÐ¾Ñ Ð¿ÐµÑевода References 1. file://localhost/root/tmp/2/fin/r.li.setup.html 2. file://localhost/root/tmp/2/fin/r.li.setup.html 3. http://grass.itc.it/gdp/landscape/r_le_manual5.pdf 4. file://localhost/root/tmp/2/fin/r.li.html 5. file://localhost/root/tmp/2/fin/r.li.patchdensity.html 6. file://localhost/root/tmp/2/fin/r.li.setup.html 7. mailto:spano@cli.di.unipi.it 8. mailto:porta@cli.di.unipi.it 9. file://localhost/root/tmp/2/fin/index.html 10. file://localhost/root/tmp/2/fin/raster.html 11. file://localhost/root/tmp/2/fin/full_index.html