# find all routes going North-South
a = angle_diff(flowlines, angle = 0, bidirectional = TRUE, absolute = TRUE)
plot(flowlines)
plot(flowlines[a < 15,], add = TRUE, lwd = 3, col = "red")
# East-West
plot(flowlines[a > 75,], add = TRUE, lwd = 3, col = "green")
Run the code above in your browser using DataLab