Apply the Continuity in Street Network (COINS) method to identify sequences of edges that form naturally continuous strokes in a network.
Arguments
- edges
An object of class
sfc
(or compatible), including the edge geometries (should be of type LINESTRING or MULTILINESTRING).- angle_threshold
Consecutive line segments can be considered part of the same stroke if the internal angle they form is larger than
angle_threshold
(in degrees). It should fall in the range \(0 \leq angle_threshold < 180\).- attributes
If
TRUE
, return a label for each edge, representing the groups each edge belongs to. Only possible forflow_mode = TRUE
.- flow_mode
If
TRUE
, line segments that belong to the same edge are not split across strokes (even if they form internal angles smaller thanangle_threshold
).- from_edge
Only look for the continuous strokes that include the provided edges or line segments.
Value
An object of class sfc
(if
attributes = FALSE
), a vector with the same length as edges
otherwise.