Create a graph between visible cells in the PointMap
Usage
makeVGAGraph(
pointMap,
boundaryGraph = FALSE,
maxVisibility = NA,
copyMap = TRUE,
verbose = FALSE
)
Examples
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)
pointMap <- createGrid(
minX = mapRegion[["xmin"]],
minY = mapRegion[["ymin"]],
maxX = mapRegion[["xmax"]],
maxY = mapRegion[["ymax"]],
gridSize = 0.5
)
pointMap <- blockLines(
pointMap = pointMap,
lineStringMap = lineStringMap[vector()]
)
pointMap <- fillGrid(
pointMap = pointMap,
fillX = 3.01,
fillY = 6.7
)
makeVGAGraph(
pointMap = pointMap,
boundaryGraph = FALSE,
maxVisibility = NA
)
#> stars object with 2 dimensions and 7 attributes
#> attribute(s):
#> Min. 1st Qu. Median Mean 3rd Qu.
#> Ref 0.00000 196610.7500 393221.500 3.932215e+05 589832.2500
#> blocked 0.00000 0.0000 0.000 3.205128e-01 1.0000
#> contextfilled 0.00000 0.0000 0.000 0.000000e+00 0.0000
#> filled 0.00000 0.0000 1.000 5.769231e-01 1.0000
#> Connectivity 39.00000 65.0000 75.000 7.106667e+01 81.0000
#> Point First Moment 92.03807 145.1355 173.267 1.750389e+02 202.1131
#> Point Second Moment 240.00000 388.5625 531.500 5.387111e+02 665.5625
#> Max. NA's
#> Ref 786443.0000 0
#> blocked 1.0000 0
#> contextfilled 0.0000 0
#> filled 1.0000 0
#> Connectivity 88.0000 66
#> Point First Moment 292.1885 66
#> Point Second Moment 1157.7500 66
#> dimension(s):
#> from to offset delta x/y
#> x 1 13 1.75 0.5 [x]
#> y 1 12 7.25 -0.5 [y]