R/identify_outlet_segment.R

Defines functions identify_outlet_segment

identify_outlet_segment <- function(relationship_table, edges) {
  # Not defensively programmed yet...
  if (is.character(relationship_table)) relationship_table <- read.csv(relationship_table)
  if (is.character(edges)) edges <- st_read(edges)

  # Search for segments that don't flow anywhere
  all_rids <- edges$rid
  outlet <- all_rids[!all_rids %in% relationship_table$fromedge]
  return(outlet)
}

Try the SSNbler package in your browser

Any scripts or data that you put into this service are public.

SSNbler documentation built on Sept. 30, 2024, 9:44 a.m.