GRASS logo

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.


r.pi.export - Export of patch based information.


raster, landscape structure analysis, patch index


r.pi.export --help
r.pi.export [-a] input=name output=string [values=string] [id_raster=string] [patch_raster=string] stats=string[,string,...] [title="phrase"] [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Set for 8 cell-neighbors. 4 cell-neighbors are default
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


input=name [required]
Name of input raster map
output=string [required]
Name for the output ASCII-file
Name for the output ASCII-file with patch values
Name for the ID raster map
Name for the patch raster map
stats=string[,string,...] [required]
Statistical method to perform on the values
Options: average, variance, standard deviation, median, min, max
Title for resultant raster map

Table of contents


This module exports raster patch values (no single pixels, but single individual patch values), which can be used for subsequent analysis in R and later import into GRASS again, using r.pi.import.


This module...


An example for the North Carolina sample dataset: generating a patch index map for later export:
r.pi.index input=landclass96 output=landclass96_forestclass5_area keyval=5 method=area
export this resulting map:
r.pi.export input=landclass96_forestclass5_area output=patch_area_out values=patch_area_values id_raster=forestclass5_ID stats=average,variance,min
various resulting files are generated:
patch_area_out: a text file with the average, variance and minimum statistics as defined above and additionally informaton about the percentage coverage (landcover) and the number of fragments (number) of the analysed landcover.
patch_area_values: a text file with the actual patch values not the statistics. The first column is providing the corresponding patch ID, which is also existing in the forestclass5_ID raster map (here:0-878). The second column is providing the percentage cover of each patch (sum is equal the overall coverage: 0.506). The third column is holding the actual patch index value (here area; e.g. patch 0: 12).


r.pi.corearea,,, r.pi.graph, r.pi.graph.dec,,, r.pi.grow, r.pi.import, r.pi.index, r.pi.lm, r.pi.odc,, r.pi.rectangle, r.pi


Programming: Elshad Shirinov
Scientific concept: Dr. Martin Wegmann
Department of Remote Sensing
Remote Sensing and Biodiversity Unit
University of Wuerzburg, Germany

Port to GRASS GIS 7: Markus Metz


Available at: r.pi.export source code (history)

Latest change: Tuesday Sep 19 09:59:22 2023 in commit: e76c325998c8cd9053ce012a5adbb79f33ab0779

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.

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

© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual