xs_regions: Cross Section Region Area

Description Usage Arguments Details Value Examples

View source: R/xs.r

Description

Compute cross section area by region.

Usage

1
2
3
4
xs_regions(d, time.col = "Time", station.col = "Station",
  distance.col = "Distance", elevation.col = "Elevation", bank.stations,
  extent.stations = NULL, reference.elevation = NULL,
  bottom.elevation = NULL, region = c("LOB", "Channel", "ROB"))

Arguments

d

The cross section data, i.e. output of read_xs.

time.col

The column containing time stamps.

station.col

The column containing cross section station IDs.

distance.col

The column containing cross section distances.

elevation.col

The column containing cross section elevations.

bank.stations

A table defining the bank station distances to use when computing cross section area. If NULL, the full extent of each cross section will be used. See details for more information.

extent.stations

The maximum extents of each station. Expects a three-column table with column names "Station", "LE" and "RE, where "LE" and "RE" define the left extent and right extent of each station, respectively. Can also accept a two-element numeric vector specifying constant left and right edges. If NULL, the minimum and maximum coincident distances of each cross section will be used.

reference.elevation

Use predefined reference elevations when computing cross section area. Can be a constant or a two column station of cross section labels and associated reference elevation. If NULL, the maximum elevation of each cross section will be used.

bottom.elevation

Use predefined bottom elevations when computing cross section area. Can be a constant or a two column station of cross section labels and associated bottom elevation. If NULL, the minimum elevation of each cross section will be used.

region

The region(s) to compute area for. Can be any combination of "channel", "LOB", "ROB". See details for more information.

Details

The extent.stations argument is similar to the bank.stations argument, but instead defines the coincident extent of each cross section. Unlike bank.stations, cross section extents are not allowed to vary through time.

The region argument is used to separate cross section area computations based on bank and extent definitions. The "LOB" region is bounded by the left extent and the left bank station; the "Channel" is bounded by the left and right bank stations; and the "ROB" region is bounded by the right bank station and the right extent.

Value

A wide-format table with additional column "Region" specifying the region for which area was computed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
simple.quasi = system.file("sample-data/SampleQuasiUnsteady.hdf",
  package = "RAStestR")

quasi.xs = read_xs(simple.quasi)
quasi.banks = read_bank_stations(simple.quasi)
quasi.extents = xs_extents(quasi.xs)
xs_regions(quasi.xs, bank.stations = quasi.banks, 
 extent.stations = quasi.extents)
xs_regions(quasi.xs, bank.stations = quasi.banks, 
  extent.stations = quasi.extents, reference.elevation = 1200, 
  region = "LOB")

mkoohafkan/RAStestR documentation built on July 14, 2019, 11:41 p.m.