vgvi_from_sf | R Documentation |
The VGVI expresses the proportion of visible greenness to the total visible area based on a viewshed
.
The estimated VGVI values range between 0 and 1, where 0 = no green cells are visible, and 1 = all of the visible cells are green.
A distance decay function is applied, to account for the reducing visual prominence of an object in space with increasing distance from the observer.
vgvi_from_sf(
observer,
dsm_rast,
dtm_rast,
greenspace_rast,
max_distance = 800,
observer_height = 1.7,
raster_res = NULL,
spacing = raster_res,
m = 0.5,
b = 8,
mode = c("logit", "exponential"),
cores = 1,
folder_path = NULL,
progress = FALSE
)
observer |
object of class |
dsm_rast |
object of class |
dtm_rast |
object of class |
greenspace_rast |
object of class |
max_distance |
numeric; Buffer distance to calculate the viewshed |
observer_height |
numeric > 0; Height of the observer (e.g. 1.7 meters) |
raster_res |
optional; NULL or numeric > 0; Resolution that the GVI raster should be aggregated to. Needs to be a multible of the dsm_rast resolution |
spacing |
optional; numeric > 0; Only if |
m |
numeric; See ‘Details’ |
b |
numeric; See ‘Details’ |
mode |
character; 'logit' or 'exponential'. See ‘Details’ |
cores |
numeric; The number of cores to use, i.e. at most how many child processes will be run simultaneously |
folder_path |
optional; Folder path to where the output should be saved continuously. Must not inklude a filename extension (e.g. '.shp', '.gpkg'). |
progress |
logical; Show progress bar and computation time? |
observer needs to be a geometry of type POINT, LINESTRING, MULTILINESTRING, POLYGON or MULTIPOLYGON. If observer is a LINESTRING or MULTILINESTRING,
points will be generated along the line(s) every "resolution" meters. If observer is a POLYGON or MULTIPOLYGON, a grid with resolution = "resolution"
will be generated, and VGVI will be computed for every point.
The CRS (st_crs
) needs to have a metric unit!
The type of function, used for calculating the distance decay weights, can be defined with the mode
parameter.
The argument 'logit' uses the logistic function, d = 1 / (1 + e^(b * (x - m))) and 'exponential' the exponential function d = 1 / (1 + (b * x^m)).
The decay function can be visualized using the visualizeWeights
function.
sf_object containing the weighted VGVI values as POINT features, where 0 = no green cells are visible, and 1 = all of the visible cells are green.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.