net.prox {stream.net}R Documentation

Calculate Proximity Relation for Stream Segments

Description

Calculate the segments that are in a specified neighborhood of a given segment.

Usage

  net.prox (dist, seg, lag=1, direction="both")

Arguments

dist an upstream/downstream distance matrix from net.dist.
seg index to a segment (row number in segment table). Not necessarily the segment identifier (sid), except that in networks generated by net.qmodel the index and the sid are always identical.
lag distance within which neighborhood is computed, either in coordinates or segments (depending on how dist was constructed.
direction "up", "down", or "both".

Details

This returns a vector of segments in proximity of seg in the direction "up", "down", or "both". Siblings that are in a combination of upstream and downstream directions are not included in "up" or "down". The distance matrix determines whether the neighborhood is defined by number of segments or by coordinates.

Value

A vector of segment indices.

Author(s)

Denis White, white.denis@epa.gov

See Also

net.total.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")

  # proximities
  net.prox (dmat, seg=2, lag=3)
  net.prox (dmat, seg=2, lag=3, direction="up")

[Package stream.net version 1.0.6 Index]