net.dir {stream.net}R Documentation

Calculate Direction Matrix for Stream Segments

Description

Compute the upstream/downstream/mixed direction matrix for stream segments .

Usage

  net.dir (dist)

Arguments

dist an upstream/downstream distance matrix from net.dist.

Details

Directions are +1 for upstream, -1 for downstream, and 0 for both. The matrix is skew-symmetric and is read from rows to columns, i.e., row 1, column 3 is +1 if segment 3 is upstream of segment 1 and -1 if downstream. Upstream and downstream are defined as being in direct linkage; any pair that have mixed upstream and downstream directions have direction 0.

Value

A square matrix of dimension the number of segments.

Author(s)

Denis White, white.denis@epa.gov

See Also

net.dist

Examples

  # Q model random net
  net <- net.qmodel (10)

  # add segments
  net <- net.addsegs (net)

  # distance matrix
  dmat <- net.dist (net, ends=0.5, method="coordinate")

  # directions
  tdmat <- net.dir (dmat)
  net.map (net, segatt="sid")
  table (tdmat[5,]) # includes self in zero count

[Package stream.net version 1.0.6 Index]