Skip to contents

In this notebook we explore how to delineate an urban river corridor using river Dâmbovița in Bucharest, Romania’s capital, as the study area. We will use OpenStreetMap (OSM) data, first from the Overpass API and then from a local file.

city_name <- "Bucharest, Romania"   # Be specific and spell as in OSM
river_name <- "Dâmbovița"           # Spell as in OSM
bbox_buffer <- 2000                 # Buffer distance in meters

We start by demonstrating the use of the all-in-one delineate_corridor() function which does the following three steps:

  1. Fetches city boundary, street and rail network, as well as river centreline and surface data from the Overpass API as shown in vignette("getting-osm-data");

  2. Pre-processes the street and rail network for delineation as in vignette("network-preparation")

  3. Constructs the initial corridor based on the chosen method. If the method = "buffer" is chosen, the corridor is constructed by buffering the river centreline and surface data with a given buffer distance. If the method = "dem" is chosen instead, the Cost Distance Accumulation algorithm is used to delineate the corridor based on the digital elevation model (DEM) of the area retrieved from the Earth Search API.

  4. Delineates the corridor based on the pre-processed network and initial corridor. Optionally, the corridor is split into segments based on the network and the river space is delineated.

The delineate_corridor() function carries out the above steps in one and returns a list that by default contains the following output elements: corridor, segments, and riverspace.

# TODO remove eval=FALSE after segment and riverspace delineation are
# implemented and the delineate_corridor() function is updated to return a list
bucharest_dambovita <- delineate_corridor(
  city_name,
  river_name,
  bbox_buffer = bbox_buffer,
  initial_method = "buffer",
  capping_method = "direct",
  segments = TRUE,
  riverspace = TRUE
)

# `$corridor` of the resulting object is an sf polygon representing the corridor
bucharest_dambovita$corridor

# `$segments` is an sf polygon representing the segments of the corridor
bucharest_dambovita$segments

# `$riverspace` is an sf polygon representing the delineated river space
bucharest_dambovita$riverspace

# All three elements of delineation
plot(urc$riverspace, col = "green")
plot(urc$river, col = "blue")
plot(urc$segments, col = "lightblue", add = TRUE)
plot(urc$corridor, add = TRUE, col = "red", wt = 2, add = TRUE)