Given a set of delineation parameters and input data, carry out corridor delineation, corridor segmentation and/or riverspace delineation as indicated by the user.
Usage
delineate(
aoi,
osm,
dem = NULL,
corridor_init = "valley",
max_iterations = 10,
capping_method = "shortest-path",
angle_threshold = 100,
corridor = TRUE,
segments = FALSE,
riverspace = FALSE
)Arguments
- aoi
A list of delineation parameters for an area of interest, namely
$city_name,$river_name,$crs,$network_buffer,$dem_buffer, and$buildings_buffer. For more info seedefine_aoi().- osm
A list with OpenStreetMap data sets within the
aoi, as objects of classsf::sfc- dem
Digital elevation model (DEM) of the region (only used if
corridor_initis"valley")- corridor_init
How to estimate the initial guess of the river corridor. It can take the following values:
"valley": use the river valley boundary, as estimated from a Digital Elevation Model (DEM) (for more info see
delineate_valley())numeric or integer: use a buffer region of the given size (in meters) around the river centerline
- max_iterations
Maximum number of iterations employed to refine the corridor edges (see
corridor_edge()).- capping_method
The method employed to connect the corridor edge end points (i.e., to "cap" the corridor), as character vector of length one. See
cap_corridor()for the available methods.- angle_threshold
Only network edges forming angles above this threshold (in degrees) are considered when forming segment edges. See
delineate_segments()andrcoins::stroke(). Only used ifsegmentsis TRUE.- corridor
Whether to carry out the corridor delineation
- segments
Whether to carry out the corridor segmentation
- riverspace
Whether to carry out the riverspace delineation
Value
A list object of class delineation containing zero or more of the
following elements: "valley", "corridor", "segments", and "riverspace",
each as an sf::sfc_POLYGON or sf::sfc_MULTIPOLYGON object
(depending on the geometry of the input data). The list contains only
the geometries corresponding to the delineation steps that were carried out
(e.g., if segments is FALSE, the list will not contain a "segments"
element). In any case, the returned object also contains the base layers
and a list aoi with the parameters used for delineation.
Details
The returned delineation class is a list wrapping objects of class
sf::sfc_POLYGON or sf::sfc_MULTIPOLYGON which can be retrieved
through subsetting and converted to other common spatial classes in typical
sf- or terra-based workflows.
Corridor delineation depends on the availability of OpenStreetMap street and railway data around the river. Sparse OSM data, especially too few river crossings, may lead to failed delineation.
Examples
if (FALSE) { # interactive()
# Define delineation parameters within area of interest
aoi <- define_aoi("Bucharest", "Dâmbovița")
# Get data
osm <- get_osm(aoi)
dem <- get_dem(aoi, osm)
# Delineate with defaults
delineate(aoi, osm, dem)
# Carry out all delineations
delineate(aoi, osm, dem, segments = TRUE, riverspace = TRUE)
}