| fillGrid | R Documentation |
Fill a LatticeMap's grid starting from one or more points
fillGrid(latticeMap, fillX, fillY, copyMap = TRUE, verbose = FALSE)
latticeMap |
The input LatticeMap |
fillX |
X coordinate of the fill points |
fillY |
Y coordinate of the fill points |
copyMap |
Optional. Copy the internal sala map |
verbose |
Optional. Show more information of the process. |
A new LatticeMap with filled 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.04
)
latticeMap <- blockLines(
latticeMap = latticeMap,
lineStringMap = lineStringMap[vector()]
)
fillGrid(
latticeMap = latticeMap,
fillX = 3.01,
fillY = 6.7
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.