add_zoi_layers: Create ZOI layer names as strings for data annotation

View source: R/add_zoi_layers.R

add_zoi_layersR Documentation

Create ZOI layer names as strings for data annotation

Description

This function uses a vector of variable names and a vector of ZOI radii to create a data.frame with all combinations of variable names and zoi radii, to ease listing or accessing them from GRASS GIS or for setting up a model formula.

Usage

add_zoi_layers(layers, zoi_radius, name = NULL, pattern = NULL)

Examples

# attaching zoi_radius to the end
name <- c("houses", "roads", "railways")
radii <- seq(100, 500, by = 100)
add_zoi_layers(name, radii)

# replacing a pattern by zoi_radius
themes <- c("houses_XXX", "private_cabins_XXX", "roads_XXX", "powerlines_XXX", "railways_XXX")
maps <- c("houses_XXX@my_mapset", "private_cabins_XXX@my_mapset", "roads_summer_XXX@my_mapset",
         "powerlines_XXX@my_mapset", "railway_XXX@my_mapset")

add_zoi_layers(layers = maps, zoi_radius = c(100, 500, 1000, 5000, 10000),
               name = themes, pattern = "XXX")


NINAnor/oneimpact documentation built on June 14, 2025, 12:27 a.m.