vvi_from_sf | R Documentation |
The VVI expresses the proportion of visible area to the total area based on a viewshed
.
The estimated VVI values range between 0 and 1, where 0 = no visible cells, and 1 = all of the cells are visible.
vvi_from_sf(
observer,
dsm_rast,
dtm_rast,
max_distance = 800,
observer_height = 1.7,
raster_res = NULL,
spacing = raster_res,
cores = 1,
folder_path = NULL,
progress = FALSE,
output_type = c("VVI", "viewshed", "cumulative"),
by_row = FALSE
)
observer |
object of class |
dsm_rast |
object of class |
dtm_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 |
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? |
output_type |
A string. One of '"VVI"', '"viewshed"' or '"cumulative"' |
by_row |
Logical. Default 'FALSE'. Whether or not to return the result separately for each row in 'observer'. Only useful for lines or polygons. |
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 VVI will be computed for every point.
The CRS (st_crs
) needs to have a metric unit!
If 'output_type' is '"VVI"', an sf_object containing the VVI values as POINT features, where 0 = no visible cells, and 1 = all of the cells are visible. If 'output_type' is '"viewshed"', a 'SpatRaster' where cell values are equal to the number of times they are visible from observers. These values range from 0 to the number of observer points (depending on spacing). If 'output_type' is '"cumulative"' and 'by_row' is FALSE, a single number indicating the cumulative proportion of cells that are visible from at least one observer point inside the area determined by the union of observer points buffered by 'max_distance'. In case 'by_row' is TRUE, this will be a data.frame with columns 'rowid' (identifying each row in 'observer') and 'cvvi' (the cumulative viewshed visibility index).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.