Last chance! 50% off unlimited learning
Sale ends in
Takes a PointMap and a ShapeMap with lines and blocks the cells on the PointMap where the lines pass.
blockLines(pointMap, lineStringMap, copyMap = TRUE, verbose = FALSE)
A new PointMap with points as they have been blocked by the lines
The input PointMap
Map of lines, either a ShapeMap, or an sf lineString map
Optional. Copy the internal sala map
Optional. Show more information of the process.
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.04
)
blockLines(
pointMap = pointMap,
lineStringMap = lineStringMap[vector()]
)
Run the code above in your browser using DataLab