rivernet-package: Read, Analyse and Plot River Networks

Description Details Author(s) Examples

Description

Functions for reading, analysing and plotting river networks.

For this package, river networks consist of sections and nodes with associated attributes, e.g. to characterise their morphological, chemical and biological state. The package provides functions to read this data from text files, to analyse the network structure and network paths and regions consisting of sections and nodes that fulfill prescribed criteria, and to plot the river network and associated properties.

Important functions:

rivernet.read: Read river network and attribute data from text files.
rivernet.write: Write river network and attribute data to text files.
plot.rivernet: Plot a river network and visualize properties.
analyze.rivernet: Analyse the network structure and calculate network properties.
prune.rivernet: Prune a river network at given points.
getreachind.rivernet: Find the reach that is closest to a given point.
getnodeind.rivernet: Find the node that is closest to a given point.
mean.rivernet: Calculate the length and stream order weighted mean of a property.
upstreamconnectivity.rivernet: Find flow paths that fulfill given properties, e.g. that can be reached by fish from downstream.
adjacentreaches.rivernet: Find regions of river sections that fulfill given properties and are (nearly) adjacent to each other.

Details

Package: rivernet
Type: Package
Version: 1.1
Date: 2017-05-11
License: GPL (>= 2)

Author(s)

Peter Reichert

Maintainer: Peter Reichert <[email protected]>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
coord <- data.frame(Reach_ID=c(1,1,2,2,2,2,2,3,3,4,4),
                    X=c(5,5,5,7,8,9,10,5,0,0,2),
                    Y=c(0,2,2,4,7,6, 8,2,6,6,7),
                    Z=c(0,1,1,2,3,4, 5,1,2,2,3))
attrib.reach <- data.frame(Reach_ID=c(1,2,3,4),
                           State   =c(0,0.2,0.8,0.8),
                           Flow    =c(4,2,2,2))
attrib.node  <- data.frame(X=c(5,5,0,10,2),
                           Y=c(0,2,6, 8,7),
                           Height=c(0,0,1,0,0))
write.table(coord       ,"rivernet_example_coord.csv",sep=";",col.names=TRUE,row.names=FALSE)
write.table(attrib.reach,"rivernet_example_reach.csv",sep=";",col.names=TRUE,row.names=FALSE)
write.table(attrib.node ,"rivernet_example_node.csv" ,sep=";",col.names=TRUE,row.names=FALSE)
net <- rivernet.read("rivernet_example_coord.csv",
                     "rivernet_example_reach.csv",
                     "rivernet_example_node.csv",
                     sep=";")
plot(net,col=ifelse(net$attrib.reach$State<0.5,"red","blue"),lwd=2,
     col.nodes=ifelse(net$attrib.node$Height<0.1,"black","red"),pch=19,cex.nodes=1.5)

rivernet documentation built on May 29, 2017, 6:41 p.m.