GRASS logo
     __________________________________________________________________

ÐÐÐÐÐÐÐÐ

   r.terraflow - computation of flow direction, flow accumulation and
   other basic topographic terrain indices from a raster digital elevation
   model (DEM).

   (GRASS Raster Program)

SYNOPSIS

   r.terraflow
   r.terraflow help
   r.terraflow [ -sq ] elev=name filled=name direction=name
   swatershed=name accumulation=name tci=name [d8cut=value] [memory=value]
   [STREAM_DIR=name] [stats=name]

ÐÐÐСÐÐÐÐ

   r.terraflow takes as input a raster digital elevation model (DEM) and
   computes the flow direction raster and the flow accumulation raster, as
   well as the flooded elevation raster, sink-watershed raster (partition
   into watersheds around sinks) and tci (topographic convergence index)
   raster.

   r.terraflow computes these rasters using well-known approaches, with
   the difference that its emphasis is on the computational complexity of
   the algorithms, rather than on modeling realistic flow. r.terraflow
   emerged from the necessity of having scalable software able to process
   efficiently very large terrains. It is based on theoretically optimal
   algorithms developed in the framework of I/O-efficient algorithms.
   r.terraflow was designed and optimized especially for massive grids and
   is able to process terrains which were impractical with similar
   functions existing in other GIS systems.

   Flow directions are computed using either the MFD (Multiple Flow
   Direction) model or the SFD (Single Flow Direction, or D8) model,
   illustrated below. Both methods compute downslope flow directions by
   inspecting the 3-by-3 window around the current cell. The SFD method
   assigns a unique flow direction towards the steepest downslope
   neighbor. The MFD method assigns multiple flow directions towards all
   downslope neighbors.

                                       [SFD]           [MFD]
   Flow direction to steepest
   downslope neighbor (SFD). Flow direction to all
   downslope neighbors (MFD).

   The SFD and the MFD method cannot compute flow directions for cells
   which have the same height as all their neighbors (flat areas) or cells
   which do not have downslope neighbors (one-cell pits).
     * On plateaus (flat areas that spill out) r.terraflow routes flow so
       that globally the flow goes towards the spill cells of the
       plateaus.
     * On sinks (flat areas that do not spill out, including one-cell
       pits) r.terraflow assigns flow by flooding the terrain until all
       the sinks are filled and assigning flow directions on the filled
       terrain.

   In order to flood the terrain, r.terraflow identifies all sinks and
   partitions the terrain into sink-watersheds (a sink-watershed contains
   all the cells that flow into that sink), builds a graph representing
   the adjacency information of the sink-watersheds, and uses this
   sink-watershed graph to merge watersheds into each other along their
   lowest common boundary until all watersheds have a flow path outside
   the terrain. Flooding produces a sink-less terrain in which every cell
   has a downslope flow path leading outside the terrain and therefore
   every cell in the terrain can be assigned SFD/MFD flow directions as
   above.

   Once flow directions are computed for every cell in the terrain,
   r.terraflow computes flow accumulation by routing water using the flow
   directions and keeping track of how much water flows through each cell.
   r.terraflow also computes the tci raster (topographic convergence
   index, defined as the logarithm of the ratio of flow accumulation and
   local slope).

   For more details on the algorithms see [1,2,3].

ÐÐÐ ÐÐÐТРЫ

   The program will run non-interactively if the user specifies program
   arguments and flag settings on the command line using the following
   form:

   r.terraflow [ -sq ] elev=name filled=name direction=name
   swatershed=name accumulation=name tci=name [d8cut=value] [memory=value]
   [STREAM_DIR=name] [stats=name]

   Alternatively, the user can simply type r.terraflow on the command line
   and the program will ask for parameter values and flag settings
   interactively, using the standard GRASS parser interface.

  Flags:

   -s
          Use SFD (D8) flow. By default MFD flow is used.

   -q
          Run quietly (do not display status messages). By default
          r.terraflow is run verbosely.

  Parameters:

   elev=name
          Input elevation raster. Required.

   filled=name
          Output filled (flooded) elevation raster. Required.

   direction =name
          Output flow direction raster. Required.

   swatershed =name
          Output sink-watershed raster. Required.

   accumulation =name
          Output flow accumulation raster. Required.

   tci =name
          Output topographic convergence index (tci) raster. Required.

   [d8cut =value]
          If flow accumulation of a cell is larger than this value, then
          the flow of this cell is routed to its neighbors using the SFD
          (D8) model. This option affects only the flow accumulation
          raster and is meaningful only for MFD flow (i.e. if the -s flag
          is not used); If this option is used for SFD flow it is ignored.
          The default value of d8cut is infinity.

   [memory =value (in MB)]
          The main memory size (in MB) to be used by r.terraflow. In
          practice value should be an underestimate of the amount of
          available (free) main memory on the machine. r.terraflow will
          use at all times at most this much memory, and the virtual
          memory system will never be in use. The default value is 300 MB.

   [STREAM_DIR =path name]
          Location of the intermediate files generated by r.terraflow. The
          default location is /var/tmp.

   [stats =name]
          The name of the file that contains the statistics (stats) of the
          run. The default name is stats.out (in the current directory).

  Examples

     * r.terraflow elev=spearfish filled=spearfish-filled
       dir=spearfish-mfdir swatershed=spearfish-watershed
       accumulation=spearfish-accu tci=spearfish-tci
     * r.terraflow elev=spearfish filled=spearfish-filled
       dir=spearfish-mfdir swatershed=spearfish-watershed
       accumulation=spearfish-accu tci=spearfish-tci d8cut=500 memory=800
       STREAM-DIR=/var/tmp/ stats=spearfish-stats.txt

ÐÐ ÐÐÐЧÐÐÐЯ

   One of the techniques used by r.terraflow is the space-time trade-off.
   In particular, in order to avoid searches, which are I/O-expensive,
   r.terraflow computes and works with an augmented elevation raster in
   which each cell stores relevant information about its 8 neighbors, in
   total up to 80B per cell. As a result r.terraflow works with
   intermediate temporary files that may be up to 80N bytes, where N is
   the number of cells (rows x columns) in the elevation raster (more
   precisely, 80K bytes, where K is the number of valid (not nodata) cells
   in the input elevation raster). All this intermediate temporary files
   are stored in the path specified by STREAM_DIR. Note: STREAM_DIR must
   contain enough free disk space in order to store up to 2 x 80N bytes.

   The internal type used by r.terraflow to store elevations can be
   defined at compile-time. By default, r.terraflow is compiled to store
   elevations internally as floats. A version which is compiled to store
   elevations internally as shorts is available as r.terraflow.short.
   Other versions can be created by the user if needed.

   r.terraflow.short uses less space (up to 60B per cell, up to 60N
   intermediate file) and therefore is more space and time efficient.
   r.terraflow is intended for use with floating point raster data
   (FCELL), and r.terraflow.short with integer raster data (CELL) in which
   the maximum elevation does not exceed the value of a short
   SHRT_MAX=32767 (this is not a constraint for any terrain data of the
   Earth, if elevation is stored in meters).

   Both r.terraflow and r.terraflow.short work with input elevation
   rasters which can be either integer, floating point or double (CELL,
   FCELL, DCELL). If the input raster contains a value that exceeds the
   allowed internal range (short for r.terraflow.short, float for
   r.terraflow), the program exits with a warning message. Otherwise, if
   all values in the input elevation raster are in range, they will be
   converted (truncated) to the internal elevation type (short for
   r.terraflow.short, float for r.terraflow). In this case precision may
   be lost and artificial flat areas may be created.

   For instance, if r.terraflow.short is used with floating point raster
   data (FCELL or DCELL), the values of the elevation will be truncated as
   shorts. This may create artificial flat areas, and the outpus of
   r.terraflow.short may be less realistic than those of r.terraflow on
   floating point raster data. The outputs of r.terraflow.short and
   r.terraflow are identical on integer raster data (CELL).

СÐ. ТÐÐÐÐ

     * The [1]TerraFlow project at Duke University
     * [2]r.flow, [3]r.basins.fill, [4]r.drain, [5]r.topmodel,
       [6]r.water.outlet, [7]r.watershed

ÐÐТÐРЫ

   Original version of program: The [8]TerraFlow project, 1999, Duke
          University.
          [9]Lars Arge, [10]Jeff Chase, [11]Pat Halpin, [12]Laura Toma,
          [13]Dean Urban, [14]Jeff Vitter, Rajiv Wickremesinghe.

   Porting for GRASS, 2002:
          [15]Lars Arge, [16]Helena Mitasova, [17]Laura Toma.

   Contact: [18]Laura Toma

ССЫÐÐÐ

    1. [19]I/O-efficient algorithms for problems on grid-based terrains.
       Lars Arge, Laura Toma, and Jeffrey S. Vitter. In Proc. Workshop on
       Algorithm Engineering and Experimentation, 2000. To appear in
       Journal of Experimental Algorithms.
    2. [20]Flow computation on massive grids. Lars Arge, Jeffrey S. Chase,
       Patrick N. Halpin, Laura Toma, Jeffrey S. Vitter, Dean Urban and
       Rajiv Wickremesinghe. In Proc. ACM Symposium on Advances in
       Geographic Information Systems, 2001.
    3. [21]Flow computation on massive grid terrains. Lars Arge, Jeffrey
       S. Chase, Patrick N. Halpin, Laura Toma, Jeffrey S. Vitter, Dean
       Urban and Rajiv Wickremesinghe. In GeoInformatica, International
       Journal on Advances of Computer Science for Geographic Information
       Systems, 7(4):283-313, December 2003.

   Last changed: $Date: 2008-08-19 16:28:59 -0500 (ÐÑ, 19 авг 2008) $

ÐвÑÐ¾Ñ Ð¿ÐµÑевода

References

   1. http://www.cs.duke.edu/geo*/terraflow/
   2. file://localhost/root/tmp/2/fin/r.flow.html
   3. file://localhost/root/tmp/2/fin/r.basins.fill.html
   4. file://localhost/root/tmp/2/fin/r.drain.html
   5. file://localhost/root/tmp/2/fin/r.topidx.html>r.topidx</a>,<ahref=
   6. file://localhost/root/tmp/2/fin/r.water.outlet.html
   7. file://localhost/root/tmp/2/fin/r.watershed.html
   8. http://www.cs.duke.edu/geo*/terraflow/
   9. http://www.daimi.au.dk/~large/
  10. http://www.cs.duke.edu/~chase/
  11. http://www.env.duke.edu/faculty/bios/halpin.html
  12. http://www.bowdoin.edu/~ltoma/
  13. http://www.env.duke.edu/faculty/bios/urban.html
  14. http://www.science.purdue.edu/jsv/
  15. http://www.daimi.au.dk/~large/
  16. http://skagit.meas.ncsu.edu/~helena/index.html
  17. http://www.bowdoin.edu/~ltoma/
  18. mailto:ltoma@bowdoin.edu
  19. http://www.cs.duke.edu/geo*/terraflow/papers/alenex00_drainage.ps.gz
  20. http://www.cs.duke.edu/geo*/terraflow/papers/acmgis01_terraflow.pdf
  21. http://www.cs.duke.edu/geo*/terraflow/papers/journal_terraflow.pdf