| rivernetwork {riverdist} | R 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 segmentiis connected to the beginning of segmentj.A value of 2 in element
[i,j]indicates that the beginning of segmentiis connected to the end of segmentj.A value of 3 in element
[i,j]indicates that the end of segmentiis connected to the beginning of segmentj.A value of 4 in element
[i,j]indicates that the end of segmentiis connected to the end of segmentj.A value of 5 in element
[i,j]indicates that segmentsiandjare connected at both beginning and end.A value of 6 in element
[i,j]indicates that the beginning of segmentiis connected to the end of segmentj, and the end of segmentiis connected to the beginning of segmentj.A value of NA in element
[i,j]indicates that segmentsiandjare 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. Elementmouth.seggives the segment number of the mouth (lowest point) of the river network, andmouth.vertgives 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 ofTRUEif checkbraidedTF has detected braiding,FALSEif no braiding has been detected, andNAif 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 segmentiandj. Thedistlookup$middistmatrix gives the total distance of the "middle" of each route (between the starting and ending segments"), and thedistlookup$starttopanddistlookup$endtopmatrices have valueTRUE,FALSE, orNAif 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