vgvi_from_sf: Viewshed Greenness Visibility Index (VGVI) from sf

View source: R/vgvi_from_sf.R

vgvi_from_sfR Documentation

Viewshed Greenness Visibility Index (VGVI) from sf

Description

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.

Usage

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
)

Arguments

observer

object of class sf; Observer location(s) from where the VGVI should be computed. See ‘Details’ for valid sf geometry types

dsm_rast

object of class rast; rast of the DSM

dtm_rast

object of class rast; rast of the DTM

greenspace_rast

object of class rast; rast of the binary Greenspace mask. Values of the Greenspace mask must be 1 for Green and 0 for No-Green

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 observer is a linestring (or polygon), points on the line (or on a grid) will be generated. The spacing parameter sets the distance in between the points on the line/grid

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?

Details

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.

Value

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.


STBrinkmann/GVI documentation built on March 11, 2024, 3:39 p.m.