oneToAllTraverse {alcyon} | R Documentation |
One-to-all traversal
Description
Runs one-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)
Usage
oneToAllTraverse(
map,
traversalType,
fromX,
fromY,
quantizationWidth = NA,
copyMap = TRUE,
verbose = FALSE
)
Arguments
map |
A PointMap, Axial ShapeGraph or Segment ShapeGraph |
traversalType |
The traversal type. See TraversalType |
fromX |
X coordinate of the point to start the traversal from |
fromY |
X coordinate of the point to start the traversal from |
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 |
copyMap |
Optional. Copy the internal sala map |
verbose |
Optional. Show more information of the process. |
Value
Returns a list with:
completed: Whether the analysis completed
newAttributes: The new attributes that were created during the process
Examples
# 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
)
oneToAllTraverse(
pointMap,
traversalType = TraversalType$Metric,
fromX = 3.01,
fromY = 6.7
)
# 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")
oneToAllTraverse(
shapeGraph,
traversalType = TraversalType$Topological,
fromX = 1217.1,
fromY = -1977.3
)
# 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")
oneToAllTraverse(
shapeGraph,
traversalType = TraversalType$Topological,
fromX = 1217.1,
fromY = -1977.3
)