R/channel_preprocess.R
check_channel.RdPerforms chacks on the values and properties of a channel then checks connnections to outlets if given
check_channel(chn, outlets = NULL, check_connectivity = TRUE)TRUE if completes else failure message
The processing follows the follwoing sequence: - Checks of the required properties of the channel netowrk for use in dynatopGIS - checks on the connectivity for loops - If outlets provided comparision of identified and known outlets
depth and width are only checked is present
chnFile <- system.file("extdata", "gis", "SwindaleRiverNetwork.gpkg",
package="dynatop", mustWork = TRUE)
chn <- terra::vect(chnFile)
chn$slope <- 1e-3
chn$class <- 1
chn$width <- 1
chn$depth <- 0.1
chn <- convert_channel(chn,
property_names=c(uid = "identifier",
startNode = "startNode",
endNode = "endNode",
slope = "slope",
class = "class",
width="width",
depth="depth"))
check_channel(chn)