NAME

r.grow - Generates an output raster map layer with contiguous areas grown by one cell (pixel).

SYNOPSIS

r.grow
r.grow help
r.grow [-bq] input=string output=string

Flags:

-b
Binary map output
-q
Quiet

Parameters:

input=string
Name of existing input raster file
output=string
Name of output raster file

DESCRIPTION

r.grow adds one cell around the perimeters of all areas in a user-specified raster map layer and stores the output in a new raster map layer.

An area consists of any contiguous clump of cells with non-zero category values. No distinction is made between differing category values within an area. Rather, a border is grown around the outside of each entire contiguous set of non-zero cells.

The output raster map layer will not go outside the boundaries set in the current geographic region. Thus, if a contiguous area in the input raster map layer extends to the geographic edge of the current map layer, no new border cells can be added to that side of the area.

Growth around a rectangular area in the input raster map layer will occur straight out from each edge, but not diagonally from the corners of the rectangle. Thus, the "grown" border area will contain lines along the edge of the original rectangle, but the corners of the border will not be squared off. Instead, the lines of the border which go along each side of the original rectangle will touch only at the corners of the cells at the end of each line.

With -b flag the output will be a binary raster map layer having only zero-one category values, regardless of the category values in the input map layer. In this case, all cells with a non-zero category value in the input map layer are assigned to category 1 in the output map layer. If the -b flag is not used, these cells will retain their original non-zero category values. In either case, all cells whose category value is changed from 0 during the growing process are assigned a category value of 1 in the output map.

NOTES

The r.grow command can be used to represent the boundary of one or more areas. In this case, the zero-one (binary) output option should NOT be used. Then the input map layer can be subtracted from the output map layer using the r.mapcalc command. All original non-zero category values will be subtracted out, leaving the boundary areas only. This resulting zero-one boundary depiction can be displayed over other related raster map layers using the overlay option of d.rast.

If the resolution of the current geographic region does not agree with the resolution of the input raster map layer, unintended resampling of the original raster map layer may occur. The user should be sure that the current geographic region is set properly.

SEE ALSO

d.rast, g.region, r.mapcalc, r.poly

AUTHOR

Marjorie Larson, U.S. Army Construction Engineering Research Laboratory

Last changed: $Date: 2003/05/06 13:22:34 $


Help Index