Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

GRASS logo

NAME

r.diversity - Calculate diversity indices based on a moving window using r.li packages

KEYWORDS

raster

SYNOPSIS

r.diversity
r.diversity --help
r.diversity [-t] input=name prefix=name [alpha=alpha value for Renyi entropy[,alpha value for Renyi entropy,...]] [size=moving window[,moving window,...]] [method=method[,method,...]] [exclude=exclude method[,exclude method,...]] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-t
Preserve configuration files
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

input=name [required]
Name of input raster map
prefix=name [required]
Prefix for output raster map(s)
alpha=alpha value for Renyi entropy[,alpha value for Renyi entropy,...]
Order of generalized entropy (> 0.0; undefined for 1.0)
size=moving window[,moving window,...]
Size of processing window (odd number only)
Default: 3
method=method[,method,...]
Name of methods to use
Options: simpson, shannon, pielou, renyi
Default: simpson,shannon,pielou,renyi
exclude=exclude method[,exclude method,...]
Exclude methods
Options: simpson, shannon, pielou, renyi

Table of contents

DESCRIPTION

r.diversity calculates selected diversity indices by calling various r.li commands.

This script uses the Pielou, Renyi, Shannon and Simpson indices. The output is a map for each index.

NOTES

The user does not need to create a "conf" file with r.li.setup because this file will be created automatically by the script.
In size option it is possible use more values: the user can set more values with comma (,) and a range with minus (-).
If you calculate Renyi entropy remember to add the alpha option. Alpha option support single and multi values but not a range.
If the input raster contains NULL value cells, r.diversity returns -1 for these cells.
If the user wants to keep NULL values instead, run subsequently on the resulting map:
r.null map=my_map setnull=-1

EXAMPLES

To calculate the set of indices from a NDVI map, with a moving window of 3 x 3 pixel, run:
r.diversity input=ndvi_map prefix=diversity alpha=0.5
To calculate the set of indices from a NDVI map, with a moving window of 7 x 7 pixel, run:
r.diversity input=ndvi_map prefix=diversity alpha=0.5 size=7
To calculate only Pielou and Simpson indices from a NDVI map, with several moving window (3 x 3, 5 x 5, 7 x 7, 9 x 9), run:
r.diversity input=ndvi_map prefix=diversity size=3-9 method=pielou,simpson
To calculate all methods excluding Pielou from a NDVI map, with two moving window (3 x 3, 9 x 9), run:
r.diversity input=ndvi_map prefix=diversity size=3,9 exclude=pielou alpha=3

SEE ALSO

r.li, r.li.pielou, r.li.renyi, r.li.shannon, r.li.simpson

AUTHORS

Luca Delucchi and Duccio Rocchini, Fondazione E. Mach (Italy)

SOURCE CODE

Available at: r.diversity source code (history)

Latest change: Monday Jan 30 19:52:26 2023 in commit: cac8d9d848299297977d1315b7e90cc3f7698730


Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2024 GRASS Development Team, GRASS GIS 8.3.3dev Reference Manual