Provided by: grass-doc_7.6.0-1_all

**NAME**

r3.neighbors- Makes each voxel value a function of the values assigned to the voxels around it, and stores new voxel values in an output 3D raster map

**KEYWORDS**

raster3d, algebra, voxel, statistics, aggregation, neighbor, focal statistics, filter

**SYNOPSIS**

r3.neighborsr3.neighbors--helpr3.neighborsinput=nameoutput=namemethod=string[quantile=float]window=x,y,z[--overwrite] [--help] [--verbose] [--quiet] [--ui]Flags:--overwriteAllow output files to overwrite existing files--helpPrint usage summary--verboseVerbose module output--quietQuiet module output--uiForce launching GUI dialogParameters:input=name[required]Name of input 3D raster mapoutput=name[required]Name for output 3D raster mapmethod=string[required]Aggregate operation Options:average,median,mode,minimum,maximum,range,stddev,sum,count,variance,diversity,interspersion,quart1,quart3,perc90,quantilequantile=floatQuantile to calculate for method=quantile Options:0.0-1.0window=x,y,z[required]The size of the window in x, y and z direction, values must be odd integer numbers, eg: 3,3,3

**DESCRIPTION**

r3.neighborslooks at each voxel in a 3D raster input map layer, and examines the values assigned to the voxel in a user-defined "neighborhood" around it. It outputs a new 3D raster map in which each voxel is assigned a value that is a (user-specified) function of the values in that voxel’s neighborhood. For example, each voxel in the output map might be assigned a value equal to the average of the values appearing in its 3 x 3 x 3 voxel "neighborhood" in the input map layer.OPTIONSThe user must specify the names of the 3D raster map layers to be used forinputandoutput, themethodused to analyze neighborhood values (i.e., the neighborhood function or operation to be performed), and the movingwindowof the neighborhood.NeighborhoodOperationMethods:Theneighborhoodoperators determine what new value a center voxel in a neighborhood will have after examining values inside its neighboring voxels. Each voxel in a 3D raster map layer becomes the center voxel of a neighborhood as the neighborhood window moves from voxel to voxel throughout the map layer.r3.neighborscan perform the following operations:averageThe average value within the neighborhood.medianThe value found half-way through a list of the neighborhood’s values, when these are ranged in numerical order.modeThe most frequently occurring value in the neighborhood.minimumThe minimum value within the neighborhood.maximumThe maximum value within the neighborhood.rangeThe range value within the neighborhood.stddevThe statistical standard deviation of values within the neighborhood.sumThe sum of values within the neighborhood.varianceThe statistical variance of values within the neighborhood.diversityThe number of different values within the neighborhood.interspersionThe percentage of voxels containing values which differ from the values assigned to the center voxel in the neighborhood, plus 1.NeighborhoodSize:The neighborhood movingwindowspecifies which voxel surrounding any given voxel fall into the neighborhood for that voxel. Thewindowmust be three comma separated odd integers. The dimension order is: x,y,z. For example: the parameter window=3,3,3 specifies a moving window (a cube) with 27 voxel.

**NOTES**

Ther3.neighborsprogram works in the current geographic region. It is recommended, but not required, that the 3D resolution of the geographic region be the same as that of the 3D raster map layer.r3.neighborsdoesn’t propagate NULLs, but computes the aggregation over the non-NULL voxels in the neighborhood.

**SEE** **ALSO**

g.regionr.neighborsr3.mapcalcr3.statsr3.support

**AUTHOR**

Soeren GebbertLastchanged:$Date:2013-07-0109:35:50+0200(Mon,01Jul2013)$

**SOURCE** **CODE**

Available at: r3.neighbors source code (history) Main index | 3D raster index | Topics index | Keywords index | Graphical index | Full index © 2003-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual