rivernetwork: The "rivernetwork" Class

rivernetworkR Documentation

The "rivernetwork" Class

Description

A class that holds spatial coordinates for river networks, as well as network topology and attributes.

Details

Created by line2network from an input line shapefile. Contains all information for network distance calculation, plotting, etc. in the 'riverdist' package.

Plotting methods are described in plot.rivernetwork.

Elements

sf:

Object of class "sf" from package 'sf'; see sf. This is the original object as read by read_sf, and is preserved to maintain plotting capability.

sf_current:

Object of class "sf" from package 'sf'; see sf. This is an updated sf object generated from the coordinates in the 'lines' element, incorporating any changes to geometry. Any corresponding data will be dropped.

lines:

Object of class "list". Each list element is a matrix of XY coordinates of the vertices of a single river segment.

connections:

Object of class "matrix", with "numeric" elements. Defined as a square matrix, with elements describing the type of connection detected between line segments.

  • A value of 1 in element [i,j] indicates that the beginning of segment i is connected to the beginning of segment j.

  • A value of 2 in element [i,j] indicates that the beginning of segment i is connected to the end of segment j.

  • A value of 3 in element [i,j] indicates that the end of segment i is connected to the beginning of segment j.

  • A value of 4 in element [i,j] indicates that the end of segment i is connected to the end of segment j.

  • A value of 5 in element [i,j] indicates that segments i and j are connected at both beginning and end.

  • A value of 6 in element [i,j] indicates that the beginning of segment i is connected to the end of segment j, and the end of segment i is connected to the beginning of segment j.

  • A value of NA in element [i,j] indicates that segments i and j are not connected.

lengths:

Vector of class "numeric". Defined as the calculated total lengths of each river segment.

names:

Vector of class "character". Defined as the names of each river segment.

mouth:

Object of class "list", with two elements. Element mouth.seg gives the segment number of the mouth (lowest point) of the river network, and mouth.vert gives the vertex number.

sequenced:

"logical": has value of TRUE if line vertices have been stored in upstream sequence using sequenceverts.

tolerance:

"numeric": the spatial tolerance that was used in determining river segment endpoint connectivity; see line2network, splitsegments.

units:

"character": the spatial units detected from the input shapefile.

braided:

"logical": Has value of TRUE if checkbraidedTF has detected braiding, FALSE if no braiding has been detected, and NA if braiding has not yet been checked.

cumuldist:

List of class "numeric": Each element is a vector of cumulative distances along each river segment, beginning with 0.

segroutes:

Object of class "list", with each element defined as a vector of class "numeric", describing the route from the mouth segment to the specific segment. This element only exists if buildsegroutes has been run, and can greatly speed up route and distance calculation.

distlookup:

List of three matrices, of class "numeric" or "logical". Element [i,j] of each matrix corresponds to the route between segment i and j. The distlookup$middist matrix gives the total distance of the "middle" of each route (between the starting and ending segments"), and the distlookup$starttop and distlookup$endtop matrices have value TRUE, FALSE, or NA if the segments at the beginning or end of the route are connected to the rest of the route at the top of the coordinate matrix, bottom of the coordinate matrix, or if the route is contained to just one segment, respectively.

Author(s)

Matt Tyers


riverdist documentation built on Aug. 22, 2023, 5:06 p.m.