Geospatial Tools for Visibility Analysis

Provides tools for visibility analysis in geospatial data. It offers functionality to perform isovist calculations, using arbitrary geometries as both viewpoints and occluders.


visor visor website

R-CMD-check DOI CRAN-status

The goal of visor is to provide a set of tools for visibility analysis.

Installation

You can install the released version of visor from CRAN with:

install.packages("visor")

You can install the development version of visor from GitHub with:

# install.packages("pak")
pak::pak("CityRiverSpaces/visor")

Example

This is a basic example which shows you how to use visor to calculate the isovist for view points on an arbitrary geometry (a line) and a set of occluders:

library(visor)
library(sf)

# Define occluder geoemtries
occluders <- st_sfc(
  create_occluder(1, 1, 1, 0.5),
  create_occluder(4, 1, 1.5, 0.7),
  create_occluder(7, 1, 0.8, 0.8),
  create_occluder(2, 5, 2, 1),
  create_occluder(5, 5, 1, 1.5),
  create_occluder(1, 7, 1.2, 0.6),
  create_occluder(7, 7, 1.8, 0.9)
)

# Define the viewpoint source geometry
line <- st_sfc(
  st_linestring(matrix(c(0, 3, 9, 3), ncol = 2, byrow = TRUE))
)

# Generate viewpoints
vpoints <- get_viewpoints(line, density = 1)

# Calculate isovist
isovist <- get_isovist(vpoints, occluders, ray_num = 160, ray_length = 5,
                       remove_holes = FALSE)

plot(isovist, col = "blue")
plot(occluders, col = "grey", add = TRUE)
plot(line, col = "lightblue", add = TRUE)
plot(vpoints, col = "red", add = TRUE)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("visor")

0.1.1 by Claudiu Forgaci, 10 months ago


https://cityriverspaces.github.io/visor/, https://github.com/CityRiverSpaces/visor, https://doi.org/10.5281/zenodo.15133420


Report a bug at https://github.com/CityRiverSpaces/visor/issues


Browse source code at https://github.com/cran/visor


Authors: Claudiu Forgaci [aut, cre, cph] (ORCID: , Francesco Nattino [aut] (ORCID: , Netherlands eScience Center [fnd]


Documentation:   PDF Manual  


Apache License (>= 2) license


Imports sf, sfheaders

Suggests knitr, rmarkdown, testthat


Imported by rcrisp.


See at CRAN