Performs chacks on the values and properties of a channel then checks connnections to outlets if given

check_channel(chn, outlets = NULL, check_connectivity = TRUE)

Arguments

chn

a SpatVect object representing the channel newtork as returned by convert_channel

outlets

uid values of the outlets of the channel network

check_connectivity

check the connectivity of the channel network

Value

TRUE if completes else failure message

Details

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

Examples

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)