View source: R/allToAllTraverse.R
allToAllTraverse | R Documentation |
Runs all-to-all traversal on a map with a graph. This is applicable to:
PointMaps (Visibility Graph Analysis)
Axial ShapeGraphs (Axial analysis)
Segment ShapeGraphs (Segment analysis)
allToAllTraverse(
map,
traversalType,
radii,
radiusTraversalType,
weightByAttribute = NULL,
includeBetweenness = FALSE,
quantizationWidth = NA,
gatesOnly = FALSE,
nthreads = 1L,
copyMap = TRUE,
verbose = FALSE,
progress = FALSE
)
map |
A PointMap, Axial ShapeGraph or Segment ShapeGraph |
traversalType |
The traversal type. See TraversalType |
radii |
A list of radii |
radiusTraversalType |
The traversal type to keep track of whether the analysis is within the each radius limit. See TraversalType |
weightByAttribute |
The attribute to weigh the analysis with |
includeBetweenness |
Set to TRUE to also calculate betweenness (known as Choice in the Space Syntax domain) |
quantizationWidth |
Set this to use chunks of this width instead of continuous values for the cost of traversal. This is equivalent to the "tulip bins" for depthmapX's tulip analysis (1024 tulip bins = pi/1024 quantizationWidth). Only works for Segment ShapeGraphs |
gatesOnly |
Optional. Only calculate results at particular gate pixels. Only works for PointMaps |
nthreads |
Optional. Use more than one threads. 1 by default, set to 0 to use all available. Only available for PointMaps. |
copyMap |
Optional. Copy the internal sala map |
verbose |
Optional. Show more information of the process. |
progress |
Optional. Enable progress display |
A new map with the results included
# Pointmap analysis (VGA)
mifFile <- system.file(
"extdata", "testdata", "simple",
"simple_interior.mif",
package = "alcyon"
)
sfMap <- st_read(mifFile,
geometry_column = 1L, quiet = TRUE
)
pointMap <- makeVGAPointMap(
sfMap,
gridSize = 0.5,
fillX = 3.0,
fillY = 6.0,
maxVisibility = NA,
boundaryGraph = FALSE,
verbose = FALSE
)
allToAllTraverse(pointMap,
traversalType = TraversalType$Angular,
radii = -1L,
radiusTraversalType = TraversalType$None
)
# Axial analysis
mifFile <- system.file(
"extdata", "testdata", "barnsbury",
"barnsbury_small_axial_original.mif",
package = "alcyon"
)
sfMap <- st_read(mifFile,
geometry_column = 1L, quiet = TRUE
)
shapeGraph <- as(sfMap, "AxialShapeGraph")
allToAllTraverse(
shapeGraph,
traversalType = TraversalType$Topological,
radii = c("n", "3"),
includeBetweenness = TRUE
)
# Segment analysis
mifFile <- system.file(
"extdata", "testdata", "barnsbury",
"barnsbury_small_segment_original.mif",
package = "alcyon"
)
sfMap <- st_read(mifFile,
geometry_column = 1L, quiet = TRUE
)
shapeGraph <- as(sfMap, "SegmentShapeGraph")
allToAllTraverse(
shapeGraph,
radii = c("n", "100"),
radiusTraversalType = TraversalType$Metric,
traversalType = TraversalType$Angular,
weightByAttribute = "Segment Length",
includeBetweenness = TRUE,
quantizationWidth = pi / 1024L,
verbose = FALSE,
progress = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.