Skip to contents

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_centerline, angle_threshold = 90)

Arguments

corridor

The river corridor as a simple feature geometry

network

The spatial network to be used for the segmentation

river_centerline

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

if (!requireNamespace("CRiSpData", quietly = TRUE)) {
  message("Install CRiSpData from GitHub to run this example.")
} else {
  corridor <- bucharest_delineation$corridor
  network <- rbind(CRiSpData::bucharest_osm$streets,
                   CRiSpData::bucharest_osm$railways) |>
    as_network()
  river_centerline <- CRiSpData::bucharest_osm$river_centerline
  delineate_segments(corridor, network, river_centerline)
}
#> Warning: to_spatial_subdivision assumes attributes are constant over geometries
#> Geometry set for 11 features 
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 418298.9 ymin: 4914017 xmax: 438435.1 ymax: 4925645
#> Projected CRS: WGS 84 / UTM zone 35N
#> First 5 geometries:
#> POLYGON ((418298.9 4923448, 418385.7 4924063, 4...
#> POLYGON ((425296.7 4922838, 425353.4 4922781, 4...
#> POLYGON ((425875.6 4922234, 425890.3 4922219, 4...
#> POLYGON ((426699 4921438, 426712.5 4921425, 426...
#> POLYGON ((426881.9 4921233, 426900.1 4921176, 4...