.TH r.clump 1grass "" "GRASS 7.2.0" "Grass User's Manual" .SH NAME \fI\fBr.clump\fR\fR \- Recategorizes data in a raster map by grouping cells that form physically discrete areas into unique categories. .SH KEYWORDS raster, statistics, reclass, clumps .SH SYNOPSIS \fBr.clump\fR .br \fBr.clump \-\-help\fR .br \fBr.clump\fR [\-\fBdg\fR] \fBinput\fR=\fIname\fR [\fBoutput\fR=\fIname\fR] [\fBtitle\fR=\fIstring\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-d\fR" 4m .br Clump also diagonal cells .br Clumps are also traced along diagonal neighboring cells .IP "\fB\-g\fR" 4m .br Print only the number of clumps in shell script style .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBinput\fR=\fIname\fR \fB[required]\fR" 4m .br Name of input raster map .IP "\fBoutput\fR=\fIname\fR" 4m .br Name for output raster map .IP "\fBtitle\fR=\fIstring\fR" 4m .br Title for output raster map .SH DESCRIPTION \fIr.clump\fR finds all areas of contiguous cell category values in the input raster map. NULL values in the input are ignored. It assigns a unique category value to each such area (\(dqclump\(dq) in the resulting output raster map. .PP Category distinctions in the input raster map are preserved. This means that if distinct category values are adjacent, they will NOT be clumped together. The user can run \fIr.reclass\fR prior to \fIr.clump\fR to recategorize cells and reassign cell category values. .SH NOTES By default, the resulting clumps are connected only by their four direct neighbors (left, right, top, bottom). The \fI\-d\fR flag activates also diagonal clump tracing. .PP \fIr.clump\fR works properly with raster map that contains only \(dqfat\(dq areas (more than a single cell in width). Linear elements (lines that are a single cell wide) may or may not be clumped together depending on the direction of the line \- horizontal and vertical lines of cells are considered to be contiguous, but diagonal lines of cells are not considered to be contiguous and are broken up into separate clumps unless the \fI\-d\fR flag is used. .PP A random color table and other support files are generated for the output raster map. .SH EXAMPLES Perform clumping on \(dqlakes\(dq map (North Carolina sample dataset) and report area sizes for each lake individually rather by waterbody type: .br .nf \fC g.region raster=lakes \-p # report sizes by waterbody type r.report lakes units=h # clump per raster polygon r.clump lakes out=lakes_individual # report sizes by individual waterbody r.report lakes_individual units=h \fR .fi .SH SEE ALSO \fI r.average, r.buffer, r.distance, r.grow r.mapcalc, r.mfilter, r.neighbors, r.to.vect, r.reclass, r.statistics, r.support \fR .SH AUTHOR Michael Shapiro, U.S. Army Construction Engineering Research Laboratory .br Markus Metz (diagonal clump tracing) .PP \fILast changed: $Date: 2014\-12\-19 22:17:36 +0100 (Fri, 19 Dec 2014) $\fR .SH SOURCE CODE .PP Available at: r.clump source code (history) .PP Main index | Raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2016 GRASS Development Team, GRASS GIS 7.2.0 Reference Manual