1r.grow(1)                   GRASS GIS User's Manual                  r.grow(1)
2
3
4

NAME

6       r.grow   -  Generates a raster map layer with contiguous areas grown by
7       one cell.
8

KEYWORDS

10       raster, distance, proximity
11

SYNOPSIS

13       r.grow
14       r.grow --help
15       r.grow [-m] input=name  output=name   [radius=float]    [metric=string]
16       [old=integer]    [new=integer]    [--overwrite]   [--help]  [--verbose]
17       [--quiet]  [--ui]
18
19   Flags:
20       -m
21           Radius is in map units rather than cells
22
23       --overwrite
24           Allow output files to overwrite existing files
25
26       --help
27           Print usage summary
28
29       --verbose
30           Verbose module output
31
32       --quiet
33           Quiet module output
34
35       --ui
36           Force launching GUI dialog
37
38   Parameters:
39       input=name [required]
40           Name of input raster map
41
42       output=name [required]
43           Name for output raster map
44
45       radius=float
46           Radius of buffer in raster cells
47           Default: 1.01
48
49       metric=string
50           Metric
51           Options: euclidean, maximum, manhattan
52           Default: euclidean
53
54       old=integer
55           Value to write for input cells which are non-NULL (-1 => NULL)
56
57       new=integer
58           Value to write for "grown" cells
59

DESCRIPTION

61       r.grow adds cells around the perimeters of all areas in  a  user-speci‐
62       fied  raster map layer and stores the output in a new raster map layer.
63       The user can use it to grow by one or more than one  cell  (by  varying
64       the  size  of  the  radius  parameter),  or like r.buffer, but with the
65       option of preserving the original cells (similar to combining  r.buffer
66       and r.patch).
67
68       If radius is negative,r.grow shrinks areas by removing cells around the
69       perimeters of all areas.
70

NOTES

72       The user has the option of specifying  three  different  metrics  which
73       control  the  geometry in which grown cells are created, (controlled by
74       the metric parameter): Euclidean, Manhattan, and Maximum.
75
76       The Euclidean distance or Euclidean metric is the  "ordinary"  distance
77       between  two  points  that one would measure with a ruler, which can be
78       proven by repeated application of the Pythagorean theorem.  The formula
79       is given by:
80       d(dx,dy) = sqrt(dx^2 + dy^2)
81       Cells  grown using this metric would form isolines of distance that are
82       circular from a given point, with the distance given by the radius.
83
84       The Manhattan metric, or Taxicab geometry, is a  form  of  geometry  in
85       which  the usual metric of Euclidean geometry is replaced by a new met‐
86       ric in which the distance between two points is the sum of  the  (abso‐
87       lute)  differences  of  their coordinates. The name alludes to the grid
88       layout of most streets on the island of  Manhattan,  which  causes  the
89       shortest  path  a car could take between two points in the city to have
90       length equal to the points’ distance in taxicab geometry.  The  formula
91       is given by:
92       d(dx,dy) = abs(dx) + abs(dy)
93       where  cells  grown  using  this metric would form isolines of distance
94       that are rhombus-shaped from a given point.
95
96       The Maximum metric is given by the formula
97       d(dx,dy) = max(abs(dx),abs(dy))
98       where the isolines of distance from a point are squares.
99
100       If there are two cells which are equal candidates to grow into an empty
101       space, r.grow will choose the northernmost candidate; if there are mul‐
102       tiple candidates with the same northing, the westernmost is chosen.
103

EXAMPLE

105       In this example, the lakes map in the  North  Carolina  sample  dataset
106       location is buffered:
107       g.region raster=lakes -p
108       # the lake raster map pixel resolution is 10m
109       r.grow input=lakes output=lakes_grown_100m radius=10
110       Shrinking instead of growing:
111       g.region raster=lakes -p
112       # the lake raster map pixel resolution is 10m
113       r.grow input=lakes output=lakes_shrunk_100m radius=-10
114

SEE ALSO

116        r.buffer, r.grow.distance, r.patch
117
118       Wikipedia Entry: Euclidean Metric
119       Wikipedia Entry: Manhattan Metric
120

AUTHORS

122       Marjorie Larson, U.S. Army Construction Engineering Research Laboratory
123
124       Glynn Clements
125

SOURCE CODE

127       Available at: r.grow source code (history)
128
129       Main  index  | Raster index | Topics index | Keywords index | Graphical
130       index | Full index
131
132       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
133
134
135
136GRASS 7.8.5                                                          r.grow(1)
Impressum