Detects and removes segments that are not connected to the river mouth.

removeunconnected(rivers)

Arguments

rivers

The river network object to use.

Note

This function is called within cleanup, which is recommended in most cases.

Examples

data(Koyukuk2) Koy_subset <- trimriver(trimto=c(30,28,29,3,19,27,4),rivers=Koyukuk2)
#> Note: any point data already using the input river network must be re-transformed to river coordinates using xy2segvert() or ptshp2segvert().
Koy_subset <- setmouth(seg=1,vert=427,rivers=Koy_subset) plot(Koy_subset)
Koy_subset_trim <- removeunconnected(Koy_subset)
#> Note: any point data already using the input river network must be re-transformed to river coordinates using xy2segvert() or ptshp2segvert().
plot(Koy_subset_trim)