| makeVGAGraph | R Documentation |
Create a graph between visible cells in the LatticeMap
makeVGAGraph(
latticeMap,
boundaryGraph = FALSE,
maxVisibility = NA,
copyMap = TRUE,
verbose = FALSE
)
latticeMap |
The input LatticeMap |
boundaryGraph |
Only create a graph on the boundary cells |
maxVisibility |
Limit how far two cells can be to be connected |
copyMap |
Optional. Copy the internal sala map |
verbose |
Optional. Show more information of the process. |
A new LatticeMap with a graph between points
mifFile <- system.file(
"extdata", "testdata", "simple",
"simple_interior.mif",
package = "alcyon"
)
sfMap <- st_read(mifFile,
geometry_column = 1L, quiet = TRUE
)
shapeMap <- as(sfMap[, vector()], "ShapeMap")
lineStringMap <- as(sfMap, "sf")
mapRegion <- sf::st_bbox(lineStringMap)
latticeMap <- createGrid(
minX = mapRegion[["xmin"]],
minY = mapRegion[["ymin"]],
maxX = mapRegion[["xmax"]],
maxY = mapRegion[["ymax"]],
gridSize = 0.5
)
latticeMap <- blockLines(
latticeMap = latticeMap,
lineStringMap = lineStringMap[vector()]
)
latticeMap <- fillGrid(
latticeMap = latticeMap,
fillX = 3.01,
fillY = 6.7
)
makeVGAGraph(
latticeMap = latticeMap,
boundaryGraph = FALSE,
maxVisibility = NA
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.