stroke.Rd
Apply the Continuity in Street Network (COINS) method to identify sequences of edges that form naturally continuous strokes in a network.
stroke(
edges,
angle_threshold = 0,
attributes = FALSE,
flow_mode = FALSE,
from_edge = NULL
)
An object of class sfc
(or compatible),
including the edge geometries (should be of type LINESTRING or
MULTILINESTRING).
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\).
If TRUE
, return a label for each edge, representing
the groups each edge belongs to. Only possible for flow_mode = TRUE
.
If TRUE
, line segments that belong to the same edge
are not split across strokes (even if they form internal angles smaller than
angle_threshold
).
Only look for the continuous strokes that include the provided edges or line segments.
An object of class sfc
(if
attributes = FALSE
), a vector with the same length as edges
otherwise.