net.total.dist {stream.net}R Documentation

Calculate Distance Matrix for Stream Segments

Description

Compute the symmetric total distance matrix for stream segments as the sum of upstream and downstream distances.

Usage

  net.total.dist (dist)

Arguments

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

Value

A square matrix of dimension the number of segments.

Author(s)

Denis White, white.denis@epa.gov

See Also

net.dist net.dir net.prox

Examples

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

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

  # distance matrix
  net.map (net, segatt=round (net$segs$length, 2))
  dmat <- net.dist (net, ends=0.5, method="coordinate")

  # total distances
  tdmat <- net.total.dist (dmat)
  hist (tdmat, col="gray", main="Total Distances")

[Package stream.net version 1.0.6 Index]