1r.grow.distance(1)            Grass User's Manual           r.grow.distance(1)
2
3
4

NAME

6       r.grow.distance  - Generates a raster map containing distances to near‐
7       est raster features.
8

KEYWORDS

10       raster, distance, proximity
11

SYNOPSIS

13       r.grow.distance
14       r.grow.distance --help
15       r.grow.distance  [-mn]   input=name    [distance=name]     [value=name]
16       [metric=string]     [--overwrite]    [--help]   [--verbose]   [--quiet]
17       [--ui]
18
19   Flags:
20       -m
21           Output distances in meters instead of map units
22
23       -n
24           Calculate distance to nearest NULL cell
25
26       --overwrite
27           Allow output files to overwrite existing files
28
29       --help
30           Print usage summary
31
32       --verbose
33           Verbose module output
34
35       --quiet
36           Quiet module output
37
38       --ui
39           Force launching GUI dialog
40
41   Parameters:
42       input=name [required]
43           Name of input raster map
44
45       distance=name
46           Name for distance output raster map
47
48       value=name
49           Name for value output raster map
50
51       metric=string
52           Metric
53           Options: euclidean, squared, maximum, manhattan, geodesic
54           Default: euclidean
55

DESCRIPTION

57       r.grow.distance generates raster maps representing the distance to  the
58       nearest  non-null cell in the input map and/or the value of the nearest
59       non-null cell.
60

NOTES

62       The flag -n calculates the respective pixel distances  to  the  nearest
63       NULL cell.
64
65       The user has the option of specifying five different metrics which con‐
66       trol the geometry in which grown cells are created, (controlled by  the
67       metric  parameter): Euclidean, Squared, Manhattan, Maximum, and Geodes‐
68       ic.
69
70       The Euclidean distance or Euclidean metric is the  "ordinary"  distance
71       between  two  points  that one would measure with a ruler, which can be
72       proven by repeated application of the Pythagorean theorem.  The formula
73       is given by:
74       d(dx,dy) = sqrt(dx^2 + dy^2)
75       Cells  grown using this metric would form isolines of distance that are
76       circular from a given point, with the distance given by the radius.
77
78       The Squared metric is the Euclidean distance squared,  i.e.  it  simply
79       omits  the  square-root  calculation. This may be faster, and is suffi‐
80       cient if only relative values are required.
81
82       The Manhattan metric, or Taxicab geometry, is a  form  of  geometry  in
83       which  the usual metric of Euclidean geometry is replaced by a new met‐
84       ric in which the distance between two points is the sum of  the  (abso‐
85       lute)  differences  of  their coordinates. The name alludes to the grid
86       layout of most streets on the island of  Manhattan,  which  causes  the
87       shortest  path  a car could take between two points in the city to have
88       length equal to the points’ distance in taxicab geometry.  The  formula
89       is given by:
90       d(dx,dy) = abs(dx) + abs(dy)
91       where  cells  grown  using  this metric would form isolines of distance
92       that are rhombus-shaped from a given point.
93
94       The Maximum metric is given by the formula
95       d(dx,dy) = max(abs(dx),abs(dy))
96       where the isolines of distance from a point are squares.
97
98       The Geodesic metric is calculated as geodesic distance, to be used only
99       in latitude-longitude locations. It is recommended to use it along with
100       the -m flag in order to output  distances  in  meters  instead  of  map
101       units.
102

EXAMPLES

104   Distance from the streams network
105       North Carolina sample dataset:
106       g.region raster=streams_derived -p
107       r.grow.distance input=streams_derived distance=dist_from_streams
108       Euclidean distance from the streams network in meters (map subset)
109       Euclidean  distance from the streams network in meters (detail, numbers
110       shown with d.rast.num)
111
112   Distance from sea in meters in latitude-longitude location
113       g.region raster=sea -p
114       r.grow.distance -m input=sea distance=dist_from_sea_geodetic metric=geodesic
115
116       Geodesic distances to sea in meters
117

SEE ALSO

119        r.grow, r.distance, r.buffer, r.cost, r.patch
120
121        Wikipedia Entry: Euclidean Metric
122       Wikipedia Entry: Manhattan Metric
123

AUTHORS

125       Glynn Clements
126
127       Last changed: $Date: 2016-01-21 14:23:39 +0100 (Thu, 21 Jan 2016) $
128

SOURCE CODE

130       Available at: r.grow.distance source code (history)
131
132       Main index | Raster index | Topics index | Keywords index  |  Graphical
133       index | Full index
134
135       © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
136
137
138
139GRASS 7.4.4                                                 r.grow.distance(1)
Impressum