calculate_viewmetrics {viewscape}R Documentation

calculate_viewmetrics

Description

The calculate_viewmetrics function is designed to compute a set of configuration metrics based on a given viewshed object and optionally, digital surface models (DSM) and digital terrain models (DTM) for terrain analysis. The function calculates various metrics that describe the visibility characteristics of a landscape from a specific viewpoint.The metrics include:

  1. Extent: The total area of the viewshed, calculated as the number of visible grid cells multiplied by the grid resolution

  2. Depth: The furthest visible distance within the viewshed from the viewpoint

  3. Vdepth: The standard deviation of distances to visible points, providing a measure of the variation in visible distances

  4. Horizontal: The total visible horizontal or terrestrial area within the viewshed

  5. Relief: The standard deviation of elevations of the visible ground surface

  6. Skyline: The standard deviation of the vertical viewscape, including visible canopy and buildings, when specified

  7. Number of patches: Visible fragmentation measured by total visible patches with the viewscape

  8. Mean shape index: Visible patchiness based on average perimeter-to-area ratio for all viewscape patches (vegetation and building)

  9. Edge density: A measure of visible complexity based on the length of patch edges per unit area

  10. Patch size: Total average size of a patches over the entire viewscape area

  11. Patch density: Visible landscape granularity based on measuring patch density

  12. Shannon diversity index: The abundance and evenness of land cover/use in a viewshed

  13. Proportion of object: Proportion of a single type of land use or cover in a viewshed

Usage

calculate_viewmetrics(viewshed, dsm, dtm, masks = list())

Arguments

viewshed

Viewshed object.

dsm

Raster, Digital Surface Model for the calculation of

dtm

Raster, Digital Terrain Model

masks

List, a list including rasters of canopy and building footprints. For example of canopy raster, the value for cells without canopy should be 0 and the value for cells with canopy can be any number.

Value

List

References

Tabrizian, P., Baran, P.K., Berkel, D.B., Mitásová, H., & Meentemeyer, R.K. (2020). Modeling restorative potential of urban environments by coupling viewscape analysis of lidar data with experiments in immersive virtual environments. Landscape and Urban Planning, 195, 103704.

Examples


# Load in DSM
test_dsm <- terra::rast(system.file("test_dsm.tif",
                                    package ="viewscape"))
# Load DTM
test_dtm <- terra::rast(system.file("test_dtm.tif",
                                    package ="viewscape"))

# Load canopy raster
test_canopy <- terra::rast(system.file("test_canopy.tif",
                                       package ="viewscape"))

# Load building footprints raster
test_building <- terra::rast(system.file("test_building.tif",
                                         package ="viewscape"))

# Load in the viewpoint
test_viewpoint <- sf::read_sf(system.file("test_viewpoint.shp",
                                          package = "viewscape"))

# Compute viewshed
output <- viewscape::compute_viewshed(dsm = test_dsm,
                                      viewpoints = test_viewpoint,
                                      offset_viewpoint = 6)

# calculate metrics given the viewshed, canopy, and building footprints
test_metrics <- viewscape::calculate_viewmetrics(output,
                                                 test_dsm,
                                                 test_dtm,
                                                 list(test_canopy, test_building))



[Package viewscape version 1.0.0 Index]