Homepage > Man Pages > Category > General Commands

Homepage > Man Pages > Name > R# r.grow

## man page of r.grow

### r.grow: Generates a raster map layer with contiguous areas grown by one cell.

Homepage > Man Pages > Name > R

## NAME

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

raster## SYNOPSIS

r.grow r.grow help r.grow[-q]input=name output=name[radius=float] [metric=string] [old=integer] [new=integer] [--overwrite] [--verbose] [--quiet]Flags: -qQuiet--overwriteAllow output files to overwrite existing files--verboseVerbose module output--quietQuiet module outputParameters: input=nameName of input raster mapoutput=nameName for output raster mapradius=floatRadius of buffer in raster cells Default:1.01 metric=stringMetric Options:euclidean,maximum,manhattanDefault:euclidean old=integerValue to write for input cells which are non-NULL (-1 => NULL)new=integerValue to write for "grown" cells## DESCRIPTION

r.growadds cells around the perimeters of all areas in a user- specified raster map layer and stores the output in a new raster map layer. The user can use it to grow by one or more than one cell (by varying the size of theradiusparameter), or liker.buffer, but with the option of preserving the original cells (similar to combiningr.bufferandr.patch).## NOTES

The user has the option of specifying three different metrics which control the geometry in which grown cells are created, (controlled by themetricparameter):Euclidean,Manhattan, andMaximum. TheEuclidean distanceorEuclidean metricis 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: </div> Cells grown using this metric would form isolines of distance that are circular from a given point, with the distance given by theradius. TheManhattan metric, orTaxicab geometry, is a form of geometry in which the usual metric of Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the (absolute) differences of their coordinates. The name alludes to the grid layout of most streets on the island of Manhattan, which causes the shortest path a car could take between two points in the city to have length equal to the points' distance in taxicab geometry. The formula is given by: </div> where cells grown using this metric would form isolines of distance that are rhombus-shaped from a given point. TheMaximum metricis given by the formula </div> where the isolines of distance from a point are squares. If there are two cells which are equal candidates to grow into an empty space,r.growwill choose the northernmost candidate; if there are multiple candidates with the same northing, the westernmost is chosen.## EXAMPLE

You can shrink inwards by preparing an inverse map first, and then inverting the resulting grown map. For example: # Spearfish sample dataset MAP=fields g.region rast=$MAP r.mapcalc "inverse = if(isnull($MAP), 1, null())" r.grow in=inverse out=inverse.grown r.mapcalc "$MAP.shrunken = if(isnull(inverse.grown), $MAP, null())" r.colors $MAP.shrunken rast=$MAP g.remove inverse,inverse.grown## SEE ALSO

r.buffer, r.grow.distance, r.patch Wikipedia Entry: Euclidean Metric Wikipedia Entry: Manhattan MetricAUTHORS

Marjorie Larson, U.S. Army Construction Engineering Research Laboratory Glynn Clements Last changed: $Date: 2010-03-30 01:24:01 +0200 (Tue, 30 Mar 2010) $ Full index (C) 2003-2010 GRASS Development Team R.GROW(1)

Copyright © 2011–2018 by topics-of-interest.com . All rights reserved. Hosted by all-inkl.

Contact · Imprint · Privacy

Page generated in 28.06ms.

backbar.es | uhren.name | generiere.de