.TH r.grow.distance 1grass "" "GRASS 6.4.2" "Grass User's Manual" .SH NAME \fI\fBr.grow.distance\fR\fR - Generates a raster map layer of distance to features in input layer. .SH KEYWORDS raster, geometry .SH SYNOPSIS \fBr.grow.distance\fR .br \fBr.grow.distance help\fR .br \fBr.grow.distance input\fR=\fIname\fR [\fBdistance\fR=\fIname\fR] [\fBvalue\fR=\fIname\fR] [\fBmetric\fR=\fIstring\fR] [--\fBoverwrite\fR] [--\fBverbose\fR] [--\fBquiet\fR] .SS Flags: .IP "\fB--overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB--verbose\fR" 4m .br Verbose module output .IP "\fB--quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Name of input raster map .IP "\fBdistance\fR=\fIname\fR" 4m .br Name for distance output map .IP "\fBvalue\fR=\fIname\fR" 4m .br Name for value output map .IP "\fBmetric\fR=\fIstring\fR" 4m .br Metric .br Options: \fIeuclidean,squared,maximum,manhattan\fR .br Default: \fIeuclidean\fR .PP .SH DESCRIPTION \fIr.grow.distance\fR generates raster maps representing the distance to the nearest non-null cell in the input map and/or the value of the nearest non-null cell. .SH NOTES The user has the option of specifying four different metrics which control the geometry in which grown cells are created, (controlled by the \fBmetric\fR parameter): \fIEuclidean\fR, \fISquared\fR, \fIManhattan\fR, and \fIMaximum\fR. .PP The \fIEuclidean distance\fR or \fIEuclidean metric\fR is the "ordinary" distance between two points that one would measure with a ruler, which can be proven by repeated application of the Pythagorean theorem. The formula is given by: \fC .DSd(dx,dy) = sqrt(dx^2 + dy^2) .DE \fR .br .br Cells grown using this metric would form isolines of distance that are .br circular from a given point, with the distance given by the \fBradius\fR. .br .br .PP .br The \fISquared\fR metric is the \fIEuclidean\fR distance squared, .br i.e. it simply omits the square-root calculation. This may be faster, .br and is sufficient if only relative values are required. .br .br .PP .br .br The \fIManhattan metric\fR, or \fITaxicab geometry\fR, is a form of geometry in .br which the usual metric of Euclidean geometry is replaced by a new .br metric in which the distance between two points is the sum of the (absolute) .br differences of their coordinates. The name alludes to the grid layout of .br most streets on the island of Manhattan, which causes the shortest path a .br car could take between two points in the city to have length equal to the .br points' distance in taxicab geometry. .br The formula is given by: .br .br \fC .DSd(dx,dy) = abs(dx) + abs(dy) .DE \fR .br .br where cells grown using this metric would form isolines of distance that are .br rhombus-shaped from a given point. .br .br .PP .br .br The \fIMaximum metric\fR is given by the formula .br .br \fC .DSd(dx,dy) = max(abs(dx),abs(dy)) .DE \fR .br .br where the isolines of distance from a point are squares. .br .br .br .SH EXAMPLE .br .br Spearfish sample dataset .br \fC .DS .br r.grow.distance input=roads distance=dist_from_roads .br .DE \fR .SH SEE ALSO \fI r.grow .br r.buffer .br r.cost .br r.patch \fR .PP \fI Wikipedia Entry: Euclidean Metric .br Wikipedia Entry: Manhattan Metric \fR .SH AUTHORS Glynn Clements .PP \fILast changed: $Date: 2008-11-20 11:59:22 +0100 (Thu, 20 Nov 2008) $\fR .PP Full index .PP © 2003-2011 GRASS Development Team