Returns the domain_id of the domain that owns a given catchment in
a decomposition. Accepts a scalar or vector of catchment ids.
See also
domain_decomposition for the wrapper object,
decompose_network().
Examples
g <- sf::read_sf(system.file("extdata/walker.gpkg", package = "hydroloom"))
h <- hy(g) |>
add_toids() |>
add_levelpaths(name_attribute = "GNIS_ID",
weight_attribute = "arbolate_sum")
d <- decompose_network(h)
get_domain_for_catchment(d, h$id[1])
#> [1] "domain_5329303_5329303"
