Provided by: grass-doc_6.4.3-3_all bug

NAME

       r.grow.distance  - Generates a raster map layer of distance to features in input layer.

KEYWORDS

       raster, geometry

SYNOPSIS

       r.grow.distance
       r.grow.distance help
       r.grow.distance   [-m]   input=name   [distance=name]    [value=name]    [metric=string]    [--overwrite]
       [--verbose]  [--quiet]

   Flags:
       -m
           Output distances in meters instead of map units

       --overwrite
           Allow output files to overwrite existing files

       --verbose
           Verbose module output

       --quiet
           Quiet module output

   Parameters:
       input=name
           Name of input raster map

       distance=name
           Name for distance output map

       value=name
           Name for value output map

       metric=string
           Metric
           Options: euclidean,squared,maximum,manhattan,geodesic
           Default: euclidean

DESCRIPTION

       r.grow.distance 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.

NOTES

       The user has the option of specifying four different metrics which control the geometry  in  which  grown
       cells are created, (controlled by the metric parameter): Euclidean, Squared, Manhattan, and Maximum.

       The  Euclidean  distance or Euclidean metric 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:
       d(dx,dy) = sqrt(dx^2 + dy^2)
        Cells grown using this metric would form isolines of distance that are circular from a given point, with
       the distance given by the radius.

       The  Squared  metric is the Euclidean distance squared, i.e. it simply omits the square-root calculation.
       This may be faster, and is sufficient if only relative values are required.

       The Manhattan metric, or Taxicab 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:
       d(dx,dy) = abs(dx) + abs(dy)
        where cells grown using this metric would form isolines of distance that are rhombus-shaped from a given
       point.

       The Maximum metric is given by the formula
       d(dx,dy) = max(abs(dx),abs(dy))
        where the isolines of distance from a point are squares.

EXAMPLE

       Distance from the streams network (North Carolina sample dataset):
       g.region rast=streams_derived -p
       r.grow.distance input=streams_derived distance=dist_from_streams

       Distance from sea in meters in latitude-longitude location:
       g.region rast=sea -p
       r.grow.distance -m input=sea distance=dist_from_sea_geodetic metric=geodesic

SEE ALSO

        r.grow, r.buffer, r.cost, r.patch

        Wikipedia Entry: Euclidean Metric
       Wikipedia Entry: Manhattan Metric

AUTHORS

       Glynn Clements

       Last changed: $Date: 2012-09-02 05:49:21 -0700 (Sun, 02 Sep 2012) $

       Full index

       © 2003-2013 GRASS Development Team

GRASS 6.4.3                                                                              r.grow.distance(1grass)