delineate_segments: Split a river corridor into segments

View source: R/segments.R

delineate_segmentsR Documentation

Split a river corridor into segments

Description

Segments are defined as corridor subregions separated by river-crossing transversal lines that form continuous strokes in the network.

Usage

delineate_segments(corridor, network, river, angle_threshold = 100)

Arguments

corridor

The river corridor as a simple feature geometry

network

The spatial network to be used for the segmentation

river

The river centerline as a simple feature geometry

angle_threshold

Only consider angles above this threshold (in degrees) to form continuous strokes in the network. See rcoins::stroke() for more details.

Value

Segment polygons as a simple feature geometry

Examples


bucharest_osm <- get_osm_example_data()
corridor <- bucharest_dambovita$corridor
network <- rbind(bucharest_osm$streets, bucharest_osm$railways) |>
  as_network()
river <- bucharest_osm$river_centerline |> sf::st_geometry()
delineate_segments(corridor, network, river)


rcrisp documentation built on Aug. 8, 2025, 6:42 p.m.