inst/doc/vig_04-valley-delineation.R

## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  message = FALSE
)

## ----setup--------------------------------------------------------------------
# Attach required packages
library(rcrisp)
library(sf)

bucharest_osm <- get_osm_example_data()
bucharest_dem <- get_dem_example_data()

# Load data for valley delineation
dem <- bucharest_dem
river_centerline <- st_geometry(bucharest_osm$river_centerline)
river_surface <- st_geometry(bucharest_osm$river_surface)
river <- c(river_centerline, river_surface)

## -----------------------------------------------------------------------------
terra::plot(dem)
plot(river, col = "white", border = NA, add = TRUE)

## -----------------------------------------------------------------------------
valley <- delineate_valley(dem, river)

## -----------------------------------------------------------------------------
terra::plot(dem)
plot(valley, border = "white", add = TRUE)

Try the rcrisp package in your browser

Any scripts or data that you put into this service are public.

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