Clip lines to the extent of the corridor, and filter valid segment edges
Source:R/segments.R
clip_and_filter.Rd
Lines that intersect the river only once and that cross the corridor from side to side are considered valid segment edges. We group valid segment edges that cross the river in nearby locations, and select the shortest line per cluster.