NOMBRE
r.grow - Genera un mapa con las areas distintas de cero del
mapa de entrada, engordadas una celdilla
(GRASS Raster Program)
USO
r.grow
r.grow help
r.grow [-bq] input=name output=name
DESCRIPCION
Añade una celdilla alrededor del perímetro de todas las areas
en un mapa raster especificado por el usuario. El resultado se alamacena
en el mapa de salida.
Un area consiste en una agrupación de celdillas contiguas con
valor distinto de cero. No se hacen por tanto distinciones entre valores
diferentes dentro de una misma areaof 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.
OPTIONS
The user can run r.grow either interactively or non-interactively.
The program is run interactively if the user types r.grow without
specifying flag settings and parameter values on the command line. In this
case, the user will be prompted for input.
Alternately, the user can run r.grow non-interactively, by specifying
the names of an input and output map layer, and including
any desired flags, on the command line.
Flags:
-
-b
-
Output 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.
-
-q
-
Run quietly, supressing printing of information about program progress
to standard output.
Parameters:
-
input=name
-
Name of an existing raster map layer in the user's current mapset search
path containing areas to be "grown".
-
output=name
-
Name of the new raster map layer to contain program output. This map will
be binary if the user sets the -b flag. Otherwise, input map cells
having non-zero category values will retain their original values. In either
case, all cells whose values changed during growth will be assigned category
value 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